Deleted Added
full compact
getsockname.2 (108028) getsockname.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.\" @(#)getsockname.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.\" @(#)getsockname.2 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: head/lib/libc/sys/getsockname.2 108028 2002-12-18 09:22:32Z ru $
33.\" $FreeBSD: head/lib/libc/sys/getsockname.2 108087 2002-12-19 09:40:28Z ru $
34.\"
35.Dd June 4, 1993
36.Dt GETSOCKNAME 2
37.Os
38.Sh NAME
39.Nm getsockname
40.Nd get socket name
41.Sh LIBRARY

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

48.Sh DESCRIPTION
49The
50.Fn getsockname
51system call
52returns the current
53.Fa name
54for the specified socket. The
55.Fa namelen
34.\"
35.Dd June 4, 1993
36.Dt GETSOCKNAME 2
37.Os
38.Sh NAME
39.Nm getsockname
40.Nd get socket name
41.Sh LIBRARY

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

48.Sh DESCRIPTION
49The
50.Fn getsockname
51system call
52returns the current
53.Fa name
54for the specified socket. The
55.Fa namelen
56parameter should be initialized to indicate
56argument should be initialized to indicate
57the amount of space pointed to by
58.Fa name .
59On return it contains the actual size of the name
60returned (in bytes).
61.Sh RETURN VALUES
62.Rv -std getsockname
63.Sh ERRORS
64The call succeeds unless:

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

74.Fa s
75is a file, not a socket.
76.It Bq Er ENOBUFS
77Insufficient resources were available in the system
78to perform the operation.
79.It Bq Er EFAULT
80The
81.Fa name
57the amount of space pointed to by
58.Fa name .
59On return it contains the actual size of the name
60returned (in bytes).
61.Sh RETURN VALUES
62.Rv -std getsockname
63.Sh ERRORS
64The call succeeds unless:

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

74.Fa s
75is a file, not a socket.
76.It Bq Er ENOBUFS
77Insufficient resources were available in the system
78to perform the operation.
79.It Bq Er EFAULT
80The
81.Fa name
82parameter points to memory not in a valid part of the
82argument points to memory not in a valid part of the
83process address space.
84.El
85.Sh SEE ALSO
86.Xr bind 2 ,
87.Xr getpeername 2 ,
88.Xr socket 2
89.Sh BUGS
90Names bound to sockets in the UNIX domain are inaccessible;
91.Xr getsockname
92returns a zero length name.
93.Sh HISTORY
94The
95.Fn getsockname
96system call appeared in
97.Bx 4.2 .
83process address space.
84.El
85.Sh SEE ALSO
86.Xr bind 2 ,
87.Xr getpeername 2 ,
88.Xr socket 2
89.Sh BUGS
90Names bound to sockets in the UNIX domain are inaccessible;
91.Xr getsockname
92returns a zero length name.
93.Sh HISTORY
94The
95.Fn getsockname
96system call appeared in
97.Bx 4.2 .