diff options
Diffstat (limited to 'share/man/man4/netintro.4')
| -rw-r--r-- | share/man/man4/netintro.4 | 109 |
1 files changed, 59 insertions, 50 deletions
diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4 index d7a07f7d216..94aea70a7f8 100644 --- a/share/man/man4/netintro.4 +++ b/share/man/man4/netintro.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: netintro.4,v 1.17 2001/03/01 16:11:18 aaron Exp $ +.\" $OpenBSD: netintro.4,v 1.18 2001/10/05 14:45:53 mpech Exp $ .\" $NetBSD: netintro.4,v 1.4 1995/10/19 08:03:40 jtc Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -59,16 +59,17 @@ All network protocols are associated with a specific .Em protocol family . A protocol family provides basic services to the protocol implementation to allow it to function within a specific -network environment. These services may include -packet fragmentation and reassembly, routing, addressing, and -basic transport. A protocol family may support multiple -methods of addressing, though the current protocol implementations -do not. A protocol family is normally comprised of a number -of protocols, one per +network environment. +These services may include packet fragmentation and reassembly, routing, +addressing, and basic transport. +A protocol family may support multiple methods of addressing, though +the current protocol implementations do not. +A protocol family is normally comprised of a number of protocols, one per .Xr socket 2 -type. It is not required that a protocol family support -all socket types. A protocol family may contain multiple -protocols supporting the same socket abstraction. +type. +It is not required that a protocol family support all socket types. +A protocol family may contain multiple protocols supporting the same socket +abstraction. .Pp A protocol supports one of the socket abstractions detailed in .Xr socket 2 . @@ -79,10 +80,11 @@ Protocols normally accept only one type of address format, usually determined by the addressing structure inherent in the design of the protocol family/network architecture. Certain semantics of the basic socket abstractions are -protocol specific. All protocols are expected to support -the basic model for their particular socket type, but may, -in addition, provide non-standard facilities or extensions -to a mechanism. For example, a protocol supporting the +protocol specific. +All protocols are expected to support the basic model for their particular +socket type, but may, in addition, provide non-standard facilities or +extensions to a mechanism. +For example, a protocol supporting the .Dv SOCK_STREAM abstraction may allow more than one byte of out-of-band data to be transmitted per out-of-band message. @@ -90,12 +92,11 @@ data to be transmitted per out-of-band message. A network interface is similar to a device interface. Network interfaces comprise the lowest layer of the networking subsystem, interacting with the actual transport -hardware. An interface may support one or more protocol -families and/or address formats. -The SYNOPSIS section of each network interface -entry gives a sample specification -of the related drivers for use in providing -a system description to the +hardware. +An interface may support one or more protocol families and/or address formats. +The SYNOPSIS section of each network interface entry gives a sample +specification of the related drivers for use in providing a system description +to the .Xr config 8 program. The DIAGNOSTICS section lists messages which may appear on the console @@ -123,10 +124,11 @@ Consult the appropriate manual pages in this section for more information regarding the support for each protocol family. .Sh ADDRESSING Associated with each protocol family is an address -format. All network addresses adhere to a general structure, -called a sockaddr, described below. However, each protocol -imposes a finer, more specific structure, generally renaming -the variant, which is discussed in the protocol family manual +format. +All network addresses adhere to a general structure, called a sockaddr, +described below. +However, each protocol imposes a finer, more specific structure, generally +renaming the variant, which is discussed in the protocol family manual page alluded to above. .Bd -literal -offset indent struct sockaddr { @@ -174,9 +176,9 @@ This facility is described in .Xr route 4 . .Sh INTERFACES Each network interface in a system corresponds to a -path through which messages may be sent and received. A network -interface usually has a hardware device associated with it, though -certain interfaces such as the loopback interface, +path through which messages may be sent and received. +A network interface usually has a hardware device associated with it, +though certain interfaces such as the loopback interface, .Xr lo 4 , do not. .Pp @@ -191,7 +193,8 @@ in the desired domain. Most of the requests supported in earlier releases take an .Ar ifreq -structure as its parameter. This structure has the form +structure as its parameter. +This structure has the form .Bd -literal struct ifreq { #define IFNAMSIZ 16 @@ -217,9 +220,9 @@ struct ifreq { Calls which are now deprecated are: .Bl -tag -width SIOCGIFBRDADDR .It Dv SIOCSIFADDR -Set interface address for protocol family. Following the address -assignment, the ``initialization'' routine for -the interface is called. +Set interface address for protocol family. +Following the address assignment, the ``initialization'' routine for the +interface is called. .It Dv SIOCSIFDSTADDR Set point to point address for protocol family and interface. .It Dv SIOCSIFBRDADDR @@ -240,19 +243,21 @@ Get point to point address for protocol family and interface. .It Dv SIOCGIFBRDADDR Get broadcast address for protocol family and interface. .It Dv SIOCSIFFLAGS -Set interface flags field. If the interface is marked down, -any processes currently routing packets through the interface -are notified; -some interfaces may be reset so that incoming packets are no longer received. +Set interface flags field. +If the interface is marked down, any processes currently routing packets +through the interface are notified; some interfaces may be reset so that +incoming packets are no longer received. When marked up again, the interface is reinitialized. .It Dv SIOCGIFFLAGS Get interface flags. .It Dv SIOCSIFMEDIA -Set interface media. See +Set interface media. +See .Xr ifmedia 4 for possible values. .It Dv SIOCGIFMEDIA -Get interface media. See +Get interface media. +See .Xr ifmedia 4 for interpreting this value. .It Dv SIOCSIFMETRIC @@ -266,14 +271,13 @@ There are two requests that make use of a new structure: .Bl -tag -width SIOCGIFBRDADDR .It Dv SIOCAIFADDR An interface may have more than one address associated with it -in some protocols. This request provides a means to -add additional addresses (or modify characteristics of the -primary address if the default address for the address family -is specified). Rather than making separate calls to -set destination or broadcast addresses, or network masks -(now an integral feature of multiple protocols) -a separate structure is used to specify all three facets simultaneously -(see below). +in some protocols. +This request provides a means to add additional addresses (or modify +characteristics of the primary address if the default address for the +address family is specified). +Rather than making separate calls to set destination or broadcast addresses, +or network masks (now an integral feature of multiple protocols) a separate +structure is used to specify all three facets simultaneously (see below). One would use a slightly tailored version of this struct specific to each family (replacing each sockaddr by one of the family-specific type). @@ -284,7 +288,8 @@ identifier itself to include the total size, as described in .Xr ioctl . .It Dv SIOCDIFADDR This request deletes the specified address from the list -associated with an interface. It also uses the +associated with an interface. +It also uses the .Ar if_aliasreq structure to allow for the possibility of protocols allowing multiple masks or destination addresses, and also adopts the @@ -292,15 +297,18 @@ convention that specification of the default address means to delete the first address for the interface belonging to the address family in which the original socket was opened. .It Dv SIOCGIFCONF -Get interface configuration list. This request takes an +Get interface configuration list. +This request takes an .Ar ifconf -structure (see below) as a value-result parameter. The +structure (see below) as a value-result parameter. +The .Ar ifc_len field should be initially set to the size of the buffer pointed to by .Ar ifc_buf . On return it will contain the length, in bytes, of the -configuration list. Alternately, if the +configuration list. +Alternately, if the .Ar ifc_len passed in is set to 0, .Dv SIOCGIFCONF @@ -312,7 +320,8 @@ needs to be to fit the entire configuration list and not fill in the other parameters. This is useful for determining the exact size that .Ar ifc_buf -needs to be in advance. Note, however, that this is an extension +needs to be in advance. +Note, however, that this is an extension that not all operating systems support. .El .Bd -literal |
