|
|
1.1 ! root 1: .TH GETSOCKNAME 2 "1 April 1983" ! 2: .UC 4 ! 3: .SH NAME ! 4: getsockname \- get socket name ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .PP ! 8: .ft B ! 9: getsockname(s, name, namelen) ! 10: int s; ! 11: struct sockaddr *name; ! 12: int *namelen; ! 13: .fi ! 14: .SH DESCRIPTION ! 15: .I Getsockname ! 16: returns the current ! 17: .I name ! 18: for the specified socket. The ! 19: .I namelen ! 20: parameter should be initialized to indicate ! 21: the amount of space pointed to by ! 22: .IR name . ! 23: On return it contains the actual size of the name ! 24: returned (in bytes). ! 25: .SH DIAGNOSTICS ! 26: A 0 is returned if the call succeeds, \-1 if it fails. ! 27: .SH ERRORS ! 28: The call succeeds unless: ! 29: .TP 15 ! 30: [EBADF] ! 31: The argument \fIs\fP is not a valid descriptor. ! 32: .TP 15 ! 33: [ENOTSOCK] ! 34: The argument \fIs\fP is a file, not a socket. ! 35: .TP 15 ! 36: [ENOBUFS] ! 37: Insufficient resources were available in the system ! 38: to perform the operation. ! 39: .TP 15 ! 40: [EFAULT] ! 41: The ! 42: .I name ! 43: parameter points to memory not in a valid part of the ! 44: process address space. ! 45: .SH "SEE ALSO" ! 46: bind(2), socket(2) ! 47: .SH BUGS ! 48: Names bound to sockets in the UNIX domain are inaccessible; ! 49: .I getsockname ! 50: returns a zero length name.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.