Deleted Added
full compact
getpeername.2 (108028) getpeername.2 (108087)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)getpeername.2 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)getpeername.2 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: head/lib/libc/sys/getpeername.2 108028 2002-12-18 09:22:32Z ru $
33.\" $FreeBSD: head/lib/libc/sys/getpeername.2 108087 2002-12-19 09:40:28Z ru $
34.\"
35.Dd June 4, 1993
36.Dt GETPEERNAME 2
37.Os
38.Sh NAME
39.Nm getpeername
40.Nd get name of connected peer
41.Sh LIBRARY

--- 7 unchanged lines hidden (view full) ---

49The
50.Fn getpeername
51system call
52returns the name of the peer connected to
53socket
54.Fa s .
55The
56.Fa namelen
34.\"
35.Dd June 4, 1993
36.Dt GETPEERNAME 2
37.Os
38.Sh NAME
39.Nm getpeername
40.Nd get name of connected peer
41.Sh LIBRARY

--- 7 unchanged lines hidden (view full) ---

49The
50.Fn getpeername
51system call
52returns the name of the peer connected to
53socket
54.Fa s .
55The
56.Fa namelen
57parameter should be initialized to indicate
57argument should be initialized to indicate
58the amount of space pointed to by
59.Fa name .
60On return it contains the actual size of the name
61returned (in bytes).
62The name is truncated if the buffer provided is too small.
63.Sh RETURN VALUES
64.Rv -std getpeername
65.Sh ERRORS

--- 12 unchanged lines hidden (view full) ---

78.It Bq Er ENOTCONN
79The socket is not connected.
80.It Bq Er ENOBUFS
81Insufficient resources were available in the system
82to perform the operation.
83.It Bq Er EFAULT
84The
85.Fa name
58the amount of space pointed to by
59.Fa name .
60On return it contains the actual size of the name
61returned (in bytes).
62The name is truncated if the buffer provided is too small.
63.Sh RETURN VALUES
64.Rv -std getpeername
65.Sh ERRORS

--- 12 unchanged lines hidden (view full) ---

78.It Bq Er ENOTCONN
79The socket is not connected.
80.It Bq Er ENOBUFS
81Insufficient resources were available in the system
82to perform the operation.
83.It Bq Er EFAULT
84The
85.Fa name
86parameter points to memory not in a valid part of the
86argument points to memory not in a valid part of the
87process address space.
88.El
89.Sh SEE ALSO
90.Xr accept 2 ,
91.Xr bind 2 ,
92.Xr getsockname 2 ,
93.Xr socket 2
94.Sh HISTORY
95The
96.Fn getpeername
97system call appeared in
98.Bx 4.2 .
87process address space.
88.El
89.Sh SEE ALSO
90.Xr accept 2 ,
91.Xr bind 2 ,
92.Xr getsockname 2 ,
93.Xr socket 2
94.Sh HISTORY
95The
96.Fn getpeername
97system call appeared in
98.Bx 4.2 .