summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/addr2ascii.333
-rw-r--r--lib/libc/net/byteorder.33
-rw-r--r--lib/libc/net/gethostbyname.32
-rw-r--r--lib/libc/net/getifaddrs.33
-rw-r--r--lib/libc/net/getipnodebyname.312
-rw-r--r--lib/libc/net/getnetent.39
-rw-r--r--lib/libc/net/getprotoent.33
-rw-r--r--lib/libc/net/getservent.33
-rw-r--r--lib/libc/net/inet.312
-rw-r--r--lib/libc/net/inet6_opt_init.36
-rw-r--r--lib/libc/net/inet6_rthdr_space.36
-rw-r--r--lib/libc/net/resolver.39
12 files changed, 66 insertions, 35 deletions
diff --git a/lib/libc/net/addr2ascii.3 b/lib/libc/net/addr2ascii.3
index fc9373d..b24c44e 100644
--- a/lib/libc/net/addr2ascii.3
+++ b/lib/libc/net/addr2ascii.3
@@ -52,7 +52,8 @@ The routines
and
.Fn ascii2addr
are used to convert network addresses between binary form and a
-printable form appropriate to the address family. Both functions take
+printable form appropriate to the address family.
+Both functions take
an
.Fa af
argument, specifying the address family to be used in the conversion
@@ -67,14 +68,17 @@ The
.Fn addr2ascii
function
is used to convert binary, network-format addresses into printable
-form. In addition to
+form.
+In addition to
.Fa af ,
-there are three other arguments. The
+there are three other arguments.
+The
.Fa addrp
argument is a pointer to the network address to be converted.
The
.Fa len
-argument is the length of the address. The
+argument is the length of the address.
+The
.Fa buf
argument is an optional pointer to a caller-allocated buffer to hold
the result; if a null pointer is passed,
@@ -94,7 +98,8 @@ and
The
.Fa ascii
argument is a pointer to the string which is to be converted into
-binary. The
+binary.
+The
.Fa result
argument is a pointer to an appropriate network address structure for
the specified family.
@@ -192,7 +197,8 @@ was improperly formatted for address family
.Xr inet 4
.Sh HISTORY
An interface close to this one was originally suggested by Craig
-Partridge. This particular interface originally appeared in the
+Partridge.
+This particular interface originally appeared in the
.Tn INRIA
.Tn IPv6
implementation.
@@ -201,8 +207,10 @@ Code and documentation by
.An Garrett A. Wollman ,
MIT Laboratory for Computer Science.
.Sh BUGS
-The original implementations supported IPv6. This support should
-eventually be resurrected. The
+The original implementations supported IPv6.
+This support should
+eventually be resurrected.
+The
.Tn NRL
implementation also included support for the
.Dv AF_ISO
@@ -210,13 +218,16 @@ and
.Dv AF_NS
address families.
.Pp
-The genericity of this interface is somewhat questionable. A truly
+The genericity of this interface is somewhat questionable.
+A truly
generic interface would provide a means for determining the length of
the buffer to be used so that it could be dynamically allocated, and
would always require a
.Dq Li "struct sockaddr"
-to hold the binary address. Unfortunately, this is incompatible with existing
-practice. This limitation means that a routine for printing network
+to hold the binary address.
+Unfortunately, this is incompatible with existing
+practice.
+This limitation means that a routine for printing network
addresses from arbitrary address families must still have internal
knowledge of the maximum buffer length needed and the appropriate part
of the address to use as the binary address.
diff --git a/lib/libc/net/byteorder.3 b/lib/libc/net/byteorder.3
index 21c105f..e10613d 100644
--- a/lib/libc/net/byteorder.3
+++ b/lib/libc/net/byteorder.3
@@ -85,4 +85,5 @@ functions appeared in
On the
.Tn VAX
bytes are handled backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.
+the world.
+This is not expected to be fixed in the near future.
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index a4486bc..8fb1e96 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -107,7 +107,7 @@ should point to an address which is
.Fa len
bytes long,
in binary form
-(i.e. not an IP address in human readable
+(i.e., not an IP address in human readable
.Tn ASCII
form).
The
diff --git a/lib/libc/net/getifaddrs.3 b/lib/libc/net/getifaddrs.3
index 3d7ea42..8387723 100644
--- a/lib/libc/net/getifaddrs.3
+++ b/lib/libc/net/getifaddrs.3
@@ -110,7 +110,8 @@ if one exists, otherwise it is NULL.
.Pp
The
.Li ifa_data
-field references address family specific data. For
+field references address family specific data.
+For
.Dv AF_LINK
addresses it contains a pointer to the
.Fa struct if_data
diff --git a/lib/libc/net/getipnodebyname.3 b/lib/libc/net/getipnodebyname.3
index c5e65a3..d0b1839 100644
--- a/lib/libc/net/getipnodebyname.3
+++ b/lib/libc/net/getipnodebyname.3
@@ -217,15 +217,19 @@ flag then the caller wants all addresses: IPv6 and IPv4-mapped IPv6.
A query is first made for
.Li AAAA
records and if successful, the
-IPv6 addresses are returned. Another query is then made for
+IPv6 addresses are returned.
+Another query is then made for
.Li A
records and any found are returned as IPv4-mapped IPv6 addresses.
.Li h_length
-will be 16. Only if both queries fail does the function
+will be 16.
+Only if both queries fail does the function
return a
.Dv NULL
-pointer. This flag is ignored unless af equals
-AF_INET6. If both
+pointer.
+This flag is ignored unless af equals
+AF_INET6.
+If both
.Dv AI_ALL
and
.Dv AI_V4MAPPED
diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3
index f05df36..b6cd944 100644
--- a/lib/libc/net/getnetent.3
+++ b/lib/libc/net/getnetent.3
@@ -72,7 +72,8 @@ broken-out fields of a line in the network data base
.Pa /etc/networks ,
or entries supplied by the
.Xr yp 8
-system. The order of the lookups is controlled by the
+system.
+The order of the lookups is controlled by the
`networks' entry in
.Xr nsswitch.conf 5 .
.Pp
@@ -94,7 +95,8 @@ A zero terminated list of alternate names for the network.
.It Fa n_addrtype
The type of the network number returned; currently only AF_INET.
.It Fa n_net
-The network number. Network numbers are returned in machine byte
+The network number.
+Network numbers are returned in machine byte
order.
.El
.Pp
@@ -106,7 +108,8 @@ reads the next line of the file, opening the file if necessary.
The
.Fn setnetent
function
-opens and rewinds the file. If the
+opens and rewinds the file.
+If the
.Fa stayopen
flag is non-zero,
the net data base will not be closed after each call to
diff --git a/lib/libc/net/getprotoent.3 b/lib/libc/net/getprotoent.3
index 8f48481..7811c78 100644
--- a/lib/libc/net/getprotoent.3
+++ b/lib/libc/net/getprotoent.3
@@ -95,7 +95,8 @@ reads the next line of the file, opening the file if necessary.
The
.Fn setprotoent
function
-opens and rewinds the file. If the
+opens and rewinds the file.
+If the
.Fa stayopen
flag is non-zero,
the net data base will not be closed after each call to
diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3
index 19cdfdf..26399b5 100644
--- a/lib/libc/net/getservent.3
+++ b/lib/libc/net/getservent.3
@@ -99,7 +99,8 @@ reads the next line of the file, opening the file if necessary.
The
.Fn setservent
function
-opens and rewinds the file. If the
+opens and rewinds the file.
+If the
.Fa stayopen
flag is non-zero,
the net data base will not be closed after each call to
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3
index 39b60be..21d0d71 100644
--- a/lib/libc/net/inet.3
+++ b/lib/libc/net/inet.3
@@ -144,11 +144,13 @@ takes an Internet address and returns an
.Tn ASCII
string representing the address in
.Ql .\&
-notation. The routine
+notation.
+The routine
.Fn inet_makeaddr
takes an Internet network number and a local
network address and constructs an Internet address
-from it. The routines
+from it.
+The routines
.Fn inet_netof
and
.Fn inet_lnaof
@@ -174,7 +176,8 @@ a
.Pp
When four parts are specified, each is interpreted
as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address. Note
+to the four bytes of an Internet address.
+Note
that when an Internet address is viewed as a 32-bit
integer quantity on the
.Tn VAX
@@ -220,7 +223,8 @@ and
.Fn inet_ntoa
functions are semi-deprecated in favor of the
.Xr addr2ascii 3
-family. However, since those functions are not yet widely implemented,
+family.
+However, since those functions are not yet widely implemented,
portable programs cannot rely on their presence and will continue
to use the
.Xr inet 3
diff --git a/lib/libc/net/inet6_opt_init.3 b/lib/libc/net/inet6_opt_init.3
index 8f68380..4102414 100644
--- a/lib/libc/net/inet6_opt_init.3
+++ b/lib/libc/net/inet6_opt_init.3
@@ -66,7 +66,7 @@ complicated.
The advanced API therefore defines a set
of functions to help applications.
These functions assume the
-formatting rules specified in Appendix B in RFC2460 i.e. that the
+formatting rules specified in Appendix B in RFC2460 i.e., that the
largest field is placed last in the option.
The function prototypes for
these functions are all in the
@@ -76,7 +76,7 @@ header.
.Ss inet6_opt_init
.Fn inet6_opt_init
returns the number of bytes needed for the empty
-extension header i.e. without any options.
+extension header i.e., without any options.
If
.Li extbuf
is not NULL it also initializes the extension header to have the correct length
@@ -115,7 +115,7 @@ is the 8-bit option type.
.Li len
is the length of the option data
.Po
-i.e. excluding the option type and option length fields.
+i.e., excluding the option type and option length fields.
.Pc
.Pp
Once
diff --git a/lib/libc/net/inet6_rthdr_space.3 b/lib/libc/net/inet6_rthdr_space.3
index 055a290..9c3e5be 100644
--- a/lib/libc/net/inet6_rthdr_space.3
+++ b/lib/libc/net/inet6_rthdr_space.3
@@ -72,7 +72,8 @@
.Sh DESCRIPTION
RFC2292 IPv6 advanced API defines eight
functions that the application calls to build and examine a Routing
-header. Four functions build a Routing header:
+header.
+Four functions build a Routing header:
.Bl -hang
.It Fn inet6_rthdr_space
return #bytes required for ancillary data
@@ -108,7 +109,8 @@ containing the specified number of
.Fa segments
(addresses).
For an IPv6 Type 0 Routing header, the number
-of segments must be between 1 and 23, inclusive. The return value
+of segments must be between 1 and 23, inclusive.
+The return value
includes the size of the cmsghdr structure that precedes the Routing
header, and any required padding.
.Pp
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index 235898c..49257bf 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -191,7 +191,8 @@ This option is enabled by default.
.It Dv RES_NOALIASES
This option turns off the user level aliasing feature controlled by the
.Dq Ev HOSTALIASES
-environment variable. Network daemons should set this option.
+environment variable.
+Network daemons should set this option.
.It Dv RES_USE_INET6
Enables support for IPv6-only applications.
This causes IPv4 addresses to be returned as an IPv4 mapped address.
@@ -227,7 +228,8 @@ it can be overridden by the environment variable
This environment variable may contain several blank-separated
tokens if you wish to override the
.Em "search list"
-on a per-process basis. This is similar to the
+on a per-process basis.
+This is similar to the
.Ic search
command in the configuration file.
Another environment variable
@@ -238,7 +240,8 @@ set by changing fields in the
.Va _res
structure or are inherited from the configuration file's
.Ic options
-command. The syntax of the
+command.
+The syntax of the
.Dq Ev RES_OPTIONS
environment variable is explained in
.Xr resolver 5 .
OpenPOWER on IntegriCloud