macro and text revision (-mdoc version 3)
[unix-history] / usr / src / share / man / man4 / inet.4
index af35656..d6e7a09 100644 (file)
-.\" Copyright (c) 1983 The Regents of the University of California.
+.\" Copyright (c) 1983, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\" All rights reserved.
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)inet.4      6.5 (Berkeley) %G%
+.\"     @(#)inet.4     6.6 (Berkeley) %G%
 .\"
 .\"
-.TH INET 4 ""
-.UC 5
-.SH NAME
-inet \- Internet protocol family
-.SH SYNOPSIS
-.B #include <sys/types.h>
-.br
-.B #include <netinet/in.h>
-.SH DESCRIPTION
-.de _d
-.if t .ta .6i 2.1i 2.6i
-.\" 2.94 went to 2.6, 3.64 to 3.30
-.if n .ta .84i 2.6i 3.30i
-..
-.de _f
-.if t .ta .5i 1.25i 2.5i
-.\" 3.5i went to 3.8i
-.if n .ta .7i 1.75i 3.8i
-..
+.Dd 
+.Dt INET 4
+.Os BSD 4.2
+.Sh NAME
+.Nm inet
+.Nd Internet protocol family
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <netinet/in.h>
+.Sh DESCRIPTION
 The Internet protocol family is a collection of protocols
 layered atop the
 The Internet protocol family is a collection of protocols
 layered atop the
-.I Internet Protocol
-(IP) transport layer, and utilizing the Internet address format.
+.Em Internet  Protocol
+.Pq Tn IP
+transport layer, and utilizing the Internet address format.
 The Internet family provides protocol support for the
 The Internet family provides protocol support for the
-SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the
-SOCK_RAW interface provides access to the IP protocol.
-.SH ADDRESSING
+.Dv SOCK_STREAM , SOCK_DGRAM ,
+and
+.Dv SOCK_RAW
+socket types; the
+.Dv SOCK_RAW
+interface provides access to the
+.Tn IP
+protocol.
+.Sh ADDRESSING
 Internet addresses are four byte quantities, stored in
 Internet addresses are four byte quantities, stored in
-network standard format (on the VAX these are word and byte
+network standard format (on the
+.Tn VAX
+these are word and byte
 reversed).  The include file
 reversed).  The include file
-.RI < netinet/in.h >
+.Aq Pa netinet/in.h
 defines this address
 as a discriminated union.
 defines this address
 as a discriminated union.
-.PP
+.Pp
 Sockets bound to the Internet protocol family utilize
 the following addressing structure,
 Sockets bound to the Internet protocol family utilize
 the following addressing structure,
-.sp 1
-.nf
-._f
+.Bd -literal -offset indent
 struct sockaddr_in {
        short   sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
 };
 struct sockaddr_in {
        short   sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
 };
-.sp 1
-.fi
-Sockets may be created with the local address INADDR_ANY
-to effect \*(lqwildcard\*(rq matching on incoming messages. 
+.Ed
+.Pp
+Sockets may be created with the local address
+.Dv INADDR_ANY
+to effect
+.Dq wildcard
+matching on incoming messages. 
 The address in a
 The address in a
-.IR connect (2)
+.Xr connect 2
 or
 or
-.IR sendto (2)
-call may be given as INADDR_ANY to mean ``this host.''
-The distinguished address INADDR_BROADCAST
+.Xr sendto 2
+call may be given as
+.Dv INADDR_ANY
+to mean
+.Dq this host .
+The distinguished address
+.Dv INADDR_BROADCAST
 is allowed as a shorthand for the broadcast address on the primary
 network if the first network configured supports broadcast.
 is allowed as a shorthand for the broadcast address on the primary
 network if the first network configured supports broadcast.
-.SH PROTOCOLS
+.Sh PROTOCOLS
 The Internet protocol family is comprised of
 The Internet protocol family is comprised of
-the IP transport protocol, Internet Control
-Message Protocol (ICMP), Transmission Control
-Protocol (TCP), and User Datagram Protocol (UDP).
-TCP is used to support the SOCK_STREAM
-abstraction while UDP is used to support the SOCK_DGRAM
-abstraction.  A raw interface to IP is available
-by creating an Internet socket of type SOCK_RAW.
-The ICMP message protocol is accessible from a raw socket.
-.PP
+the
+.Tn IP
+transport protocol, Internet Control
+Message Protocol
+.Pq Tn ICMP ,
+Transmission Control
+Protocol
+.Pq Tn TCP ,
+and User Datagram Protocol
+.Pq Tn UDP .
+.Tn TCP
+is used to support the
+.Dv SOCK_STREAM
+abstraction while
+.Tn UDP
+is used to support the
+.Dv SOCK_DGRAM
+abstraction.  A raw interface to
+.Tn IP
+is available
+by creating an Internet socket of type
+.Dv SOCK_RAW .
+The
+.Tn ICMP
+message protocol is accessible from a raw socket.
+.Pp
 The 32-bit Internet address contains both network and host parts.
 It is frequency-encoded; the most-significant bit is clear
 in Class A addresses, in which the high-order 8 bits are the network
 number.
 Class B addresses use the high-order 16 bits as the network field,
 and Class C addresses have a 24-bit network part.
 The 32-bit Internet address contains both network and host parts.
 It is frequency-encoded; the most-significant bit is clear
 in Class A addresses, in which the high-order 8 bits are the network
 number.
 Class B addresses use the high-order 16 bits as the network field,
 and Class C addresses have a 24-bit network part.
-Sites with a cluster of local networks and a connection to the DARPA
+Sites with a cluster of local networks and a connection to the
+.Tn DARPA
 Internet may chose to use a single network number for the cluster;
 this is done by using subnet addressing.
 The local (host) portion of the address is further subdivided
 Internet may chose to use a single network number for the cluster;
 this is done by using subnet addressing.
 The local (host) portion of the address is further subdivided
@@ -88,29 +111,47 @@ Within a subnet, each subnet appears to be an individual network;
 externally, the entire cluster appears to be a single, uniform
 network requiring only a single routing entry.
 Subnet addressing is enabled and examined by the following
 externally, the entire cluster appears to be a single, uniform
 network requiring only a single routing entry.
 Subnet addressing is enabled and examined by the following
-.IR ioctl (2)
+.Xr ioctl 2
 commands on a datagram socket in the Internet domain;
 they have the same form as the
 commands on a datagram socket in the Internet domain;
 they have the same form as the
-SIOCIFADDR command (see
-.IR intro (4)).
-.PP
-.TP 20
-SIOCSIFNETMASK
+.Dv SIOCIFADDR
+command (see
+.Xr intro 4 ) .
+.Pp
+.Bl -tag -width SIOCSIFNETMASK
+.It Dv SIOCSIFNETMASK
 Set interface network mask.
 The network mask defines the network part of the address;
 if it contains more of the address than the address type would indicate,
 then subnets are in use.
 Set interface network mask.
 The network mask defines the network part of the address;
 if it contains more of the address than the address type would indicate,
 then subnets are in use.
-.TP 20
-SIOCGIFNETMASK
+.It Dv SIOCGIFNETMASK
 Get interface network mask.
 Get interface network mask.
-.SH SEE ALSO
-ioctl(2), socket(2), intro(4), tcp(4), udp(4), ip(4), icmp(4)
-.PP
-An Introductory 4.3BSD Interprocess Communication Tutorial (PS1:7).
-.PP
-An Advanced 4.3BSD Interprocess Communication Tutorial (PS1:8).
-.SH CAVEAT
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr socket 2 ,
+.Xr intro 4 ,
+.Xr tcp 4 ,
+.Xr udp 4 ,
+.Xr ip 4 ,
+.Xr icmp 4
+.Rs
+.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 7
+.Re
+.Rs
+.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 8
+.Re
+.Sh CAVEAT
 The Internet protocol support is subject to change as
 the Internet protocols develop.  Users should not depend
 on details of the current implementation, but rather
 the services exported.
 The Internet protocol support is subject to change as
 the Internet protocols develop.  Users should not depend
 on details of the current implementation, but rather
 the services exported.
+.Sh HISTORY
+The
+.Nm
+protocol interface appeared in
+.Bx 4.2 .