Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bind(2)

socket(2)

getsockname(2)



GETPEERNAME(2)          COMMAND REFERENCE          GETPEERNAME(2)



NAME
     getpeername - get name of connected peer

SYNOPSIS
     getpeername(s, name, namelen)
     int s;
     struct sockaddr *name;
     int *namelen;

DESCRIPTION
     Getpeername returns the name of the peer connected to socket
     s.  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.

     [ENOTCONN]   The socket is not connected.

     [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]  Sucessful call.

     [-1] Unsucessful call.

CAVEATS
     Names bound to sockets in the UTek domain are inaccessible;
     getpeername returns a zero length name.

SEE ALSO
     bind(2), socket(2), and getsockname(2).














Printed 4/6/89                                                  1



%%index%%
na:408,92;
sy:500,824;
de:1324,510;
di:1834,572;
rv:2406,179;
ca:2585,299;
se:2884,183;
%%index%%000000000121

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