Rechercher une page de manuel
getsockname.2freebsd
Langue: en
Version: 266145 (debian - 07/07/09)
Section: 2 (Appels système)
BSD mandoc
NAME
getsockname - get socket nameLIBRARY
Lb libcSYNOPSIS
In sys/types.h In sys/socket.h Ft int Fn getsockname int s struct sockaddr * restrict name socklen_t * restrict namelenDESCRIPTION
The Fn getsockname system call returns the current Fa name for the specified socket. The Fa namelen argument should be initialized to indicate the amount of space pointed to by Fa name . On return it contains the actual size of the name returned (in bytes).RETURN VALUES
Rv -std getsocknameERRORS
The call succeeds unless:- Bq Er EBADF
- The argument Fa s is not a valid descriptor.
- Bq Er ECONNRESET
- The connection has been reset by the peer.
- Bq Er ENOTSOCK
- The argument Fa s is a file, not a socket.
- Bq Er ENOBUFS
- Insufficient resources were available in the system to perform the operation.
- Bq Er EFAULT
- The Fa name argument points to memory not in a valid part of the process address space.
SEE ALSO
bind(2), getpeername(2), socket(2)HISTORY
The Fn getsockname system call appeared in BSD 4.2BUGS
Names bound to sockets in the UNIX domain are inaccessible; Fn getsockname returns a zero length name.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre