GETSOCKNAME(2) COMMAND REFERENCE GETSOCKNAME(2)
NAME
getsockname - get socket name
SYNOPSIS
getsockname(s, name, namelen)
int s;
struct sockaddr *name;
int *namelen;
DESCRIPTION
Getsockname 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).
DIAGNOSTICS
The call succeeds unless:
[EBADF]
The argument s is not a valid descriptor.
[ENOTSOCK]
The argument s is a file, not a socket.
[ENOBUFS]
Insufficient resources were available in the system to
perform the operation.
[EFAULT]
The name parameter points to memory not in a valid part
of the process address space.
RETURN VALUE
[0] Getsockname was successful.
[-1]
Getsockname was unsuccessful.
CAVEATS
Names bound to sockets in the UTek domain are inaccessible;
getsockname returns a zero length name.
SEE ALSO
bind(2), socket(2).
Printed 10/17/86 1
%%index%%
na:72,65;
sy:137,536;
de:673,427;
di:1100,484;
rv:1584,299;
ca:1883,227;
se:2110,108;
%%index%%000000000119