connect.2, getpeername.2, getsockname.2: Use consistent argument names

Most other sockets pages are using the names 'addr'
and 'addrlen'; make these pages do the same.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-12-03 15:36:34 -05:00
parent f7c494fb23
commit a2b8b6d657
3 changed files with 23 additions and 23 deletions

View File

@ -62,7 +62,7 @@
.\" Modified 1998, 1999 by Andi Kleen .\" Modified 1998, 1999 by Andi Kleen
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com> .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" .\"
.TH CONNECT 2 2008-11-20 "Linux" "Linux Programmer's Manual" .TH CONNECT 2 2008-12-03 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
connect \- initiate a connection on a socket connect \- initiate a connection on a socket
.SH SYNOPSIS .SH SYNOPSIS
@ -71,7 +71,7 @@ connect \- initiate a connection on a socket
.br .br
.B #include <sys/socket.h> .B #include <sys/socket.h>
.sp .sp
.BI "int connect(int " sockfd ", const struct sockaddr *" serv_addr , .BI "int connect(int " sockfd ", const struct sockaddr *" addr ,
.BI " socklen_t " addrlen ); .BI " socklen_t " addrlen );
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
@ -80,13 +80,13 @@ The
system call connects the socket referred to by the file descriptor system call connects the socket referred to by the file descriptor
.I sockfd .I sockfd
to the address specified by to the address specified by
.IR serv_addr . .IR addr .
The The
.I addrlen .I addrlen
argument specifies the size of argument specifies the size of
.IR serv_addr . .IR addr .
The format of the address in The format of the address in
.I serv_addr .I addr
is determined by the address space of the socket is determined by the address space of the socket
.IR sockfd ; .IR sockfd ;
see see
@ -98,7 +98,7 @@ If the socket
is of type is of type
.B SOCK_DGRAM .B SOCK_DGRAM
then then
.I serv_addr .I addr
is the address to which datagrams are sent by default, and the only is the address to which datagrams are sent by default, and the only
address from which datagrams are received. address from which datagrams are received.
If the socket is of type If the socket is of type
@ -107,7 +107,7 @@ or
.BR SOCK_SEQPACKET , .BR SOCK_SEQPACKET ,
this call attempts to make a connection to the socket that is bound this call attempts to make a connection to the socket that is bound
to the address specified by to the address specified by
.IR serv_addr . .IR addr .
.PP .PP
Generally, connection-based protocol sockets may successfully Generally, connection-based protocol sockets may successfully
.BR connect () .BR connect ()

View File

@ -43,25 +43,25 @@ getpeername \- get name of connected peer socket
.SH SYNOPSIS .SH SYNOPSIS
.B #include <sys/socket.h> .B #include <sys/socket.h>
.sp .sp
.BI "int getpeername(int " sockfd ", struct sockaddr *" name \ .BI "int getpeername(int " sockfd ", struct sockaddr *" addr \
", socklen_t *" namelen ); ", socklen_t *" addrlen );
.SH DESCRIPTION .SH DESCRIPTION
.BR getpeername () .BR getpeername ()
returns the address of the peer connected to the socket returns the address of the peer connected to the socket
.IR sockfd , .IR sockfd ,
in the buffer pointed to by in the buffer pointed to by
.IR name . .IR addr .
The The
.I namelen .I addrlen
argument should be initialized to indicate the amount of space pointed to argument should be initialized to indicate the amount of space pointed to
by by
.IR name . .IR addr .
On return it contains the actual size of the name returned (in bytes). On return it contains the actual size of the name returned (in bytes).
The name is truncated if the buffer provided is too small. The name is truncated if the buffer provided is too small.
The returned address is truncated if the buffer provided is too small; The returned address is truncated if the buffer provided is too small;
in this case, in this case,
.I namelen .I addrlen
will return a value greater than was supplied to the call. will return a value greater than was supplied to the call.
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, zero is returned. On success, zero is returned.
@ -77,12 +77,12 @@ is not a valid descriptor.
.TP .TP
.B EFAULT .B EFAULT
The The
.I name .I addr
argument points to memory not in a valid part of the argument points to memory not in a valid part of the
process address space. process address space.
.TP .TP
.B EINVAL .B EINVAL
.I namelen .I addrlen
is invalid (e.g., is negative). is invalid (e.g., is negative).
.TP .TP
.B ENOBUFS .B ENOBUFS

View File

@ -42,25 +42,25 @@ getsockname \- get socket name
.nf .nf
.B #include <sys/socket.h> .B #include <sys/socket.h>
.sp .sp
.BI "int getsockname(int " sockfd ", struct sockaddr *" name \ .BI "int getsockname(int " sockfd ", struct sockaddr *" addr \
", socklen_t *" namelen ); ", socklen_t *" addrlen );
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.BR getsockname () .BR getsockname ()
returns the current address to which the socket returns the current address to which the socket
.I sockfd .I sockfd
is bound, in the buffer pointed to by is bound, in the buffer pointed to by
.IR name . .IR addr .
The The
.I namelen .I addrlen
argument should be initialized to indicate argument should be initialized to indicate
the amount of space (in bytes) pointed to by the amount of space (in bytes) pointed to by
.IR name . .IR addr .
On return it contains the actual size of the socket address. On return it contains the actual size of the socket address.
The returned address is truncated if the buffer provided is too small; The returned address is truncated if the buffer provided is too small;
in this case, in this case,
.I namelen .I addrlen
will return a value greater than was supplied to the call. will return a value greater than was supplied to the call.
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, zero is returned. On success, zero is returned.
@ -76,12 +76,12 @@ is not a valid descriptor.
.TP .TP
.B EFAULT .B EFAULT
The The
.I name .I addr
argument points to memory not in a valid part of the argument points to memory not in a valid part of the
process address space. process address space.
.TP .TP
.B EINVAL .B EINVAL
.I namelen .I addrlen
is invalid (e.g., is negative). is invalid (e.g., is negative).
.TP .TP
.B ENOBUFS .B ENOBUFS