Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getsockname(2) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bind(2)

socket(2)

inet(3N)



getsockname(2)                 DG/UX R4.11MU05                getsockname(2)


NAME
       getsockname - get socket name

SYNOPSIS
       #include <sys/socket.h>

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

   where:
       s         File descriptor of socket whose name is requested

       name      Structure to receive the socket name

       namelen   On input contains the number of bytes available for the
                 name; updated to indicate the number of bytes returned

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).

ACCESS CONTROL
       None.  See domain specific information [unixipc(6F) and inet(3N)]
       for restrictions per domain.

RETURN VALUE
       0      Completed successfully.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EBADF     The argument s is not an active valid descriptor.

       ENOTSOCK  The argument s is not a file of type S_IFSOCK (socket
                 special).

       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, or the namelen parameter is < 0.

SEE ALSO
       bind(2), socket(2), inet(3N), unixipc(6F).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026