Go to the previous, next section.

getsockname

SYNOPSIS

int getsockname(int s, struct sockaddr *name, int * namelen);

PARAMETERS

s: [in] the socket accessed.

name: [out] the buffer where to put the name in.

namelen: [in out] on entry, the maximum length of name. On return, it contains the actual length of the name.

DESCRIPTION

Gets the local socket name.

RETURN VALUE

On success zero is returned. On error, -1 is returned and errno is set to one of the following values:

Go to the previous, next section.