| manpages.info - online man pages | ![]() |
|||
|
getsockname (2) Table of Contents
Namegetsockname - get socket name
Synopsis#include <sys/socket.h>
int
DescriptionGetsockname() returns the current name for the specified socket. The namelen parameter should be initialized to indicate the amount of space pointed to by name. On return it contains the actual size of the name returned (in bytes).
DiagnosticsA 0 is returned if the call succeeds, -1 if it fails.
ErrorsThe call succeeds unless:
See Also
BugsNames bound to sockets in the UNIX domain are inaccessible; getsockname returns a zero length name.
HistoryThe getsockname() function call appeared in 4.2BSD.
|