diff options
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/ether_aton.3 | 6 | ||||
-rw-r--r-- | lib/libc/net/getaddrinfo.3 | 30 | ||||
-rw-r--r-- | lib/libc/net/getnameinfo.3 | 12 | ||||
-rw-r--r-- | lib/libc/net/getpeereid.3 | 8 | ||||
-rw-r--r-- | lib/libc/net/getrrsetbyname.3 | 18 | ||||
-rw-r--r-- | lib/libc/net/htonl.3 | 13 | ||||
-rw-r--r-- | lib/libc/net/inet_addr.3 | 6 | ||||
-rw-r--r-- | lib/libc/net/inet_net_ntop.3 | 8 | ||||
-rw-r--r-- | lib/libc/net/inet_ntop.3 | 6 |
9 files changed, 52 insertions, 55 deletions
diff --git a/lib/libc/net/ether_aton.3 b/lib/libc/net/ether_aton.3 index 358d7eed034..98562dc44c1 100644 --- a/lib/libc/net/ether_aton.3 +++ b/lib/libc/net/ether_aton.3 @@ -1,8 +1,8 @@ -.\" $OpenBSD: ether_aton.3,v 1.2 2022/03/29 18:15:52 naddy Exp $ +.\" $OpenBSD: ether_aton.3,v 1.3 2022/09/11 06:38:10 jmc Exp $ .\" .\" Written by roland@frob.com. Public domain. .\" -.Dd $Mdocdate: March 29 2022 $ +.Dd $Mdocdate: September 11 2022 $ .Dt ETHER_ATON 3 .Os .Sh NAME @@ -86,7 +86,7 @@ The function parses a line from the .Pa /etc/ethers file and fills in the passed -.Li struct ether_addr +.Vt struct ether_addr and character buffer with the Ethernet address and host name on the line. It returns zero if the line was successfully parsed and \-1 if not. The character buffer should be diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 035db2780b5..780c7a409f5 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getaddrinfo.3,v 1.60 2022/03/31 17:27:16 naddy Exp $ +.\" $OpenBSD: getaddrinfo.3,v 1.61 2022/09/11 06:38:10 jmc Exp $ .\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $ .\" .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") @@ -16,7 +16,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 31 2022 $ +.Dd $Mdocdate: September 11 2022 $ .Dt GETADDRINFO 3 .Os .Sh NAME @@ -68,7 +68,7 @@ must be non-null. .Pp .Fa hints is an optional pointer to a -.Li struct addrinfo , +.Vt struct addrinfo , as defined by .In netdb.h : .Bd -literal @@ -139,7 +139,7 @@ will return a NUL-terminated string containing the canonical name of the specified host name in the .Fa ai_canonname element of the first -.Li addrinfo +.Vt addrinfo structure returned. .It Dv AI_FQDN If the @@ -150,7 +150,7 @@ will return a NUL-terminated string containing the fully qualified domain name of the specified host name in the .Fa ai_canonname element of the first -.Li addrinfo +.Vt addrinfo structure returned. .Pp This is different from the @@ -215,7 +215,7 @@ is not set. .El .Pp All other elements of the -.Li addrinfo +.Vt addrinfo structure passed via .Fa hints must be zero or the null pointer. @@ -225,7 +225,7 @@ If is the null pointer, .Fn getaddrinfo behaves as if the caller provided a -.Li struct addrinfo +.Vt struct addrinfo with .Fa ai_family set to @@ -240,12 +240,12 @@ After a successful call to .Fn getaddrinfo , .Fa *res is a pointer to a linked list of one or more -.Li addrinfo +.Vt addrinfo structures. The list can be traversed by following the .Fa ai_next pointer in each -.Li addrinfo +.Vt addrinfo structure until a null pointer is encountered. The three members .Fa ai_family , @@ -253,11 +253,11 @@ The three members and .Fa ai_protocol in each returned -.Li addrinfo +.Vt addrinfo structure are suitable for a call to .Xr socket 2 . For each -.Li addrinfo +.Vt addrinfo structure in the list, the .Fa ai_addr member points to a filled-in socket address structure of length @@ -298,10 +298,10 @@ the interface and link, which is not necessarily true from the specification. All of the information returned by .Fn getaddrinfo is dynamically allocated: the -.Li addrinfo +.Vt addrinfo structures themselves as well as the socket address structures and the canonical host name strings included in the -.Li addrinfo +.Vt addrinfo structures. .Pp Memory allocated for the dynamically allocated structures created by @@ -313,7 +313,7 @@ function. The .Fa ai pointer should be an -.Li addrinfo +.Vt addrinfo structure created by a call to .Fn getaddrinfo . .Sh RETURN VALUES @@ -324,7 +324,7 @@ if an error occurs. If an error occurs, no memory is allocated by .Fn getaddrinfo , therefore it is not necessary to release the -.Li addrinfo +.Vt addrinfo structure(s). .Sh EXAMPLES The following code tries to connect to diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3 index 18c2cdc0754..4e97b5d07b9 100644 --- a/lib/libc/net/getnameinfo.3 +++ b/lib/libc/net/getnameinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getnameinfo.3,v 1.48 2019/08/30 20:20:51 jmc Exp $ +.\" $OpenBSD: getnameinfo.3,v 1.49 2022/09/11 06:38:10 jmc Exp $ .\" $KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $ .\" .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") @@ -16,7 +16,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 30 2019 $ +.Dd $Mdocdate: September 11 2022 $ .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -33,7 +33,7 @@ The .Fn getnameinfo function is used to convert a -.Li sockaddr +.Vt sockaddr structure to a pair of host name and service strings. It is a replacement for and provides more flexibility than the .Xr gethostbyaddr 3 @@ -44,13 +44,13 @@ functions and is the converse of the function. .Pp The -.Li sockaddr +.Vt sockaddr structure .Fa sa should point to either a -.Li sockaddr_in +.Vt sockaddr_in or -.Li sockaddr_in6 +.Vt sockaddr_in6 structure (for IPv4 or IPv6 respectively) that is .Fa salen bytes long. diff --git a/lib/libc/net/getpeereid.3 b/lib/libc/net/getpeereid.3 index 9c5742a245f..4475bbd77d4 100644 --- a/lib/libc/net/getpeereid.3 +++ b/lib/libc/net/getpeereid.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpeereid.3,v 1.3 2013/06/05 03:39:23 tedu Exp $ +.\" $OpenBSD: getpeereid.3,v 1.4 2022/09/11 06:38:10 jmc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -26,7 +26,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd $Mdocdate: June 5 2013 $ +.Dd $Mdocdate: September 11 2022 $ .Dt GETPEEREID 3 .Os .Sh NAME @@ -65,13 +65,13 @@ should be looked up. .It .Fa euid points to a -.Li uid_t +.Vt uid_t variable into which the effective user ID for the connected peer will be stored. .It .Fa egid points to a -.Li gid_t +.Vt gid_t variable into which the effective group ID for the connected peer will be stored. .El diff --git a/lib/libc/net/getrrsetbyname.3 b/lib/libc/net/getrrsetbyname.3 index d0acb60238f..314f31665c5 100644 --- a/lib/libc/net/getrrsetbyname.3 +++ b/lib/libc/net/getrrsetbyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getrrsetbyname.3,v 1.21 2019/08/30 20:20:51 jmc Exp $ +.\" $OpenBSD: getrrsetbyname.3,v 1.22 2022/09/11 06:38:10 jmc Exp $ .\" .\" Copyright (C) 2000, 2001 Internet Software Consortium. .\" @@ -15,7 +15,7 @@ .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 30 2019 $ +.Dd $Mdocdate: September 11 2022 $ .Dt GETRRSETBYNAME 3 .Os .Sh NAME @@ -46,11 +46,11 @@ After a successful call to .Fn getrrsetbyname , .Fa *res is a pointer to an -.Li rrsetinfo +.Vt rrsetinfo structure, containing a list of one or more -.Li rdatainfo +.Vt rdatainfo structures containing resource records and potentially another list of -.Li rdatainfo +.Vt rdatainfo structures containing SIG resource records associated with those records. The members .Li rri_rdclass @@ -97,12 +97,12 @@ struct rrsetinfo { All of the information returned by .Fn getrrsetbyname is dynamically allocated: the -.Li rrsetinfo +.Vt rrsetinfo and -.Li rdatainfo +.Vt rdatainfo structures, and the canonical host name strings pointed to by the -.Li rrsetinfo +.Vt rrsetinfo structure. Memory allocated for the dynamically allocated structures created by a successful call to @@ -111,7 +111,7 @@ is released by .Fn freerrset . .Li rrset is a pointer to a -.Li struct rrsetinfo +.Vt struct rrsetinfo created by a call to .Fn getrrsetbyname . .\" .Pp diff --git a/lib/libc/net/htonl.3 b/lib/libc/net/htonl.3 index a63959717a4..65fa9a53b57 100644 --- a/lib/libc/net/htonl.3 +++ b/lib/libc/net/htonl.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: htonl.3,v 1.5 2019/02/13 07:02:09 jmc Exp $ +.\" $OpenBSD: htonl.3,v 1.6 2022/09/11 06:38:10 jmc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: February 13 2019 $ +.Dd $Mdocdate: September 11 2022 $ .Dt HTONL 3 .Os .Sh NAME @@ -66,14 +66,11 @@ or .Sq l ) is a mnemonic for the traditional names for such quantities, -.Li short -and -.Li long , -respectively. +short and long, respectively. Today, the C concept of -.Li short +.Vt short and -.Li long +.Vt long integers need not coincide with this traditional misunderstanding. On machines which have a byte order which is the same as the network order, routines are defined as null macros. diff --git a/lib/libc/net/inet_addr.3 b/lib/libc/net/inet_addr.3 index 129b08d2771..dec5a2ec16a 100644 --- a/lib/libc/net/inet_addr.3 +++ b/lib/libc/net/inet_addr.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inet_addr.3,v 1.5 2019/08/30 20:06:07 jmc Exp $ +.\" $OpenBSD: inet_addr.3,v 1.6 2022/09/11 06:38:10 jmc Exp $ .\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)inet.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: August 30 2019 $ +.Dd $Mdocdate: September 11 2022 $ .Dt INET_ADDR 3 .Os .Sh NAME @@ -179,7 +179,7 @@ cannot return that value without indicating failure. Also, .Fn inet_addr should have been designed to return a -.Li struct in_addr . +.Vt struct in_addr . The newer .Fn inet_aton function does not share these problems, and almost all existing code diff --git a/lib/libc/net/inet_net_ntop.3 b/lib/libc/net/inet_net_ntop.3 index cac234be42c..4212af3bb6e 100644 --- a/lib/libc/net/inet_net_ntop.3 +++ b/lib/libc/net/inet_net_ntop.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inet_net_ntop.3,v 1.3 2022/03/31 17:27:16 naddy Exp $ +.\" $OpenBSD: inet_net_ntop.3,v 1.4 2022/09/11 06:38:10 jmc Exp $ .\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 31 2022 $ +.Dd $Mdocdate: September 11 2022 $ .Dt INET_NET_NTOP 3 .Os .Sh NAME @@ -46,7 +46,7 @@ The .Fn inet_net_ntop function converts an Internet network number from network format (usually a -.Li struct in_addr +.Vt struct in_addr or some other binary form, in network byte order) to CIDR presentation format (suitable for external display purposes). .Fa bits @@ -63,7 +63,7 @@ The .Fn inet_net_pton function converts a presentation format Internet network number (that is, printable form as held in a character string) to network format (usually a -.Li struct in_addr +.Vt struct in_addr or some other internal binary representation, in network byte order). It returns the number of bits (either computed based on the class, or specified with /CIDR), or \-1 if a failure occurred diff --git a/lib/libc/net/inet_ntop.3 b/lib/libc/net/inet_ntop.3 index c80b0c47766..e5c1c574f87 100644 --- a/lib/libc/net/inet_ntop.3 +++ b/lib/libc/net/inet_ntop.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inet_ntop.3,v 1.5 2021/09/01 15:59:22 claudio Exp $ +.\" $OpenBSD: inet_ntop.3,v 1.6 2022/09/11 06:38:10 jmc Exp $ .\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)inet.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: September 1 2021 $ +.Dd $Mdocdate: September 11 2022 $ .Dt INET_NTOP 3 .Os .Sh NAME @@ -49,7 +49,7 @@ The .Fn inet_pton function converts a presentation format address (that is, printable form as held in a character string) to network format (usually a -.Li struct in_addr +.Vt struct in_addr or some other internal binary representation, in network byte order). It returns 1 if the address was valid for the specified address family; 0 if the address wasn't parseable in the specified address family; or \-1 |