Diff: getsockname(2)

Differences between current version and predecessor to the previous major change of getsockname(2).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 4 Last edited on Thursday, December 23, 2004 8:13:47 pm by NickJohnson
Older page: version 2 Last edited on Tuesday, December 31, 2002 2:10:03 am by PerryLorier Revert
@@ -21,7 +21,9 @@
 SVr4, 4.4BSD (the getsockname(2) function call appeared in 4.2BSD). SVr4 documents additional [ENOMEM] and [ENOSR] error codes. 
 The third argument of getsockname(2) is in reality an `int *' (and this is what BSD 4.* and libc4 and libc5 have). Some POSIX confusion resulted in the present socklen_t. The draft standard has not been adopted yet, but glibc2 already follows it and also has socklen_t. See also accept(2). 
+[NickJohnson] adds: If getsockname is called on an unbound inet socket, ((struct sockaddr_in *)name)->sin_family will be AF_INET, and ((struct sockaddr_in *)name)->sin_addr.s_addr will be INADDR_ANY.  
 bind(2), socket(2) 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.