Update for use of uint{16,32}_t.
This commit is contained in:
parent
006b843d0e
commit
79d01decfe
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: byteorder.3,v 1.11 2003/08/07 16:43:07 agc Exp $
|
.\" $NetBSD: byteorder.3,v 1.12 2004/06/10 11:37:35 kleink Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1983, 1991, 1993
|
.\" Copyright (c) 1983, 1991, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
.\"
|
.\"
|
||||||
.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
|
.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
|
||||||
.\"
|
.\"
|
||||||
.Dd June 4, 1993
|
.Dd June 10, 2004
|
||||||
.Dt BYTEORDER 3
|
.Dt BYTEORDER 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -41,26 +41,18 @@
|
||||||
.Sh LIBRARY
|
.Sh LIBRARY
|
||||||
.Lb libc
|
.Lb libc
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In sys/types.h
|
.In arpa/inet.h
|
||||||
.Ft in_addr_t
|
.Ft uint32_t
|
||||||
.Fn htonl "in_addr_t host32"
|
.Fn htonl "uint32_t host32"
|
||||||
.Ft in_port_t
|
.Ft uint16_t
|
||||||
.Fn htons "in_port_t host16"
|
.Fn htons "uint16_t host16"
|
||||||
.Ft in_addr_t
|
.Ft uint32_t
|
||||||
.Fn ntohl "in_addr_t net32"
|
.Fn ntohl "uint32_t net32"
|
||||||
.Ft in_port_t
|
.Ft uint16_t
|
||||||
.Fn ntohs "in_port_t net16"
|
.Fn ntohs "uint16_t net16"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
These routines convert 16 and 32 bit quantities between network
|
These routines convert 16 and 32 bit quantities between network
|
||||||
byte order and host byte order. The types
|
byte order and host byte order.
|
||||||
.Ft in_addr_t
|
|
||||||
and
|
|
||||||
.Ft in_port_t
|
|
||||||
are defined by X/Open as:
|
|
||||||
.Bd -literal -offset indent
|
|
||||||
typedef u_int32_t in_addr_t;
|
|
||||||
typedef u_int16_t in_port_t;
|
|
||||||
.Ed
|
|
||||||
.Pp
|
.Pp
|
||||||
On machines which have a byte order which is the same as the network
|
On machines which have a byte order which is the same as the network
|
||||||
order, routines are defined as null macros.
|
order, routines are defined as null macros.
|
||||||
|
@ -73,6 +65,21 @@ and
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr gethostbyname 3 ,
|
.Xr gethostbyname 3 ,
|
||||||
.Xr getservent 3
|
.Xr getservent 3
|
||||||
|
.Sh STANDARDS
|
||||||
|
The
|
||||||
|
.Fn htonl ,
|
||||||
|
.Fn htons ,
|
||||||
|
.Fn ntohl ,
|
||||||
|
and
|
||||||
|
.Fn ntohs
|
||||||
|
functions conform to
|
||||||
|
.St -p1003.1-2001 .
|
||||||
|
Their use of the fixed-width intger types
|
||||||
|
.Fa uint16_t
|
||||||
|
and
|
||||||
|
.Fa uint32_t
|
||||||
|
first appeared in
|
||||||
|
.St -xns5 .
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
The
|
The
|
||||||
.Nm byteorder
|
.Nm byteorder
|
||||||
|
|
Loading…
Reference in New Issue