5 getsockname - get socket name
8 #include <network.h>
10 int getsockname(int s , struct sockaddr * name ,
14 Getsockname returns the current name for the specified
15 socket. The namelen parameter should be initialized to
16 indicate the amount of space pointed to by name. On
17 return it contains the actual size of the name returned
21 On success, zero is returned. On error, -1 is returned,
22 and errno is set appropriately. A 0 is returned if the
23 call succeeds, -1 if it fails.
26 EBADF The argument s is not a valid descriptor.
29 The argument s is a file, not a socket.
31 ENOBUFS Insufficient resources were available in the sys-
32 tem to perform the operation.