View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000355 | 1003.1(2008)/Issue 7 | Base Definitions and Headers | public | 2010-11-13 15:38 | 2013-04-16 13:06 |
Reporter | jilles | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Error |
Status | Closed | Resolution | Accepted | ||
Name | Jilles Tjoelker | ||||
Organization | |||||
User Reference | |||||
Section | <netinet/in.h>, <sys/socket.h>, <sys/un.h> | ||||
Page Number | 303, 382, 403 | ||||
Line Number | 10141, 12813-12817, 13517 | ||||
Interp Status | --- | ||||
Final Accepted Text | |||||
Summary | 0000355: header descriptions say sockaddr structures must be cast (instead of pointers) | ||||
Description | The descriptions of <netinet/in.h>, <sys/socket.h>, <sys/un.h> say that protocol-specific sockaddr structures must be cast to sockaddr, and sockaddr_storage structures may be cast to protocol-specific sockaddr structures or sockaddr. C does not allow casting structures to other structures. Although it is clear to me that pointers should be cast, it would be better if it said so explicitly. The sentence about sockaddr_storage alignment is already correct. | ||||
Desired Action | In the descriptions of <netinet/in.h> and <sys/un.h>, change: Values of this type shall be cast by applications to struct sockaddr for use with socket functions. to: Pointers to this type shall be cast by applications to struct sockaddr * for use with socket functions. In the descriptions of <sys/socket.h>, change: When a sockaddr_storage structure is cast as a sockaddr structure, the ss_family field of the sockaddr_storage structure shall map onto the sa_family field of the sockaddr structure. When a sockaddr_storage structure is cast as a protocol-specific address structure, the ss_family field shall map onto a field of that structure that is of type sa_family_t and that identifies the protocol's address family. to: When a pointer to a sockaddr_storage structure is cast as a pointer to a sockaddr structure, the ss_family field of the sockaddr_storage structure shall map onto the sa_family field of the sockaddr structure. When a pointer to a sockaddr_storage structure is cast as a pointer to a protocol-specific address structure, the ss_family field shall map onto a field of that structure that is of type sa_family_t and that identifies the protocol's address family. | ||||
Tags | tc1-2008 |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-11-13 15:38 | jilles | New Issue | |
2010-11-13 15:39 | jilles | Status | New => Under Review |
2010-11-13 15:39 | jilles | Assigned To | => ajosey |
2010-11-13 15:39 | jilles | Name | => Jilles Tjoelker |
2010-11-13 15:40 | jilles | Section | => <netinet/in.h>, <sys/socket.h>, <sys/un.h> |
2010-11-13 15:40 | jilles | Page Number | => 303, 382, 403 |
2010-11-13 15:41 | jilles | Line Number | => 10141, 12813-12817, 13517 |
2010-12-02 16:31 | Don Cragun | Interp Status | => --- |
2010-12-02 16:31 | Don Cragun | Status | Under Review => Resolved |
2010-12-02 16:31 | Don Cragun | Resolution | Open => Accepted |
2010-12-02 16:32 | Don Cragun | Tag Attached: tc1-2008 | |
2013-04-16 13:06 | ajosey | Status | Resolved => Closed |