summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ns.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/ns.3')
-rw-r--r--src/lib/libc/net/ns.331
1 files changed, 15 insertions, 16 deletions
diff --git a/src/lib/libc/net/ns.3 b/src/lib/libc/net/ns.3
index f89b4fe042..883b079db2 100644
--- a/src/lib/libc/net/ns.3
+++ b/src/lib/libc/net/ns.3
@@ -1,4 +1,4 @@
1.\" $NetBSD: ns.3,v 1.3 1995/02/25 06:20:50 cgd Exp $ 1.\" $OpenBSD: ns.3,v 1.8 2003/05/01 19:17:37 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 1986, 1991, 1993 3.\" Copyright (c) 1986, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -31,11 +31,9 @@
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
33.\" 33.\"
34.\" @(#)ns.3 8.1 (Berkeley) 6/4/93
35.\"
36.Dd June 4, 1993 34.Dd June 4, 1993
37.Dt NS 3 35.Dt NS 3
38.Os BSD 4.3 36.Os
39.Sh NAME 37.Sh NAME
40.Nm ns_addr , 38.Nm ns_addr ,
41.Nm ns_ntoa 39.Nm ns_ntoa
@@ -45,7 +43,7 @@ address conversion routines
45.Sh SYNOPSIS 43.Sh SYNOPSIS
46.Fd #include <sys/types.h> 44.Fd #include <sys/types.h>
47.Fd #include <netns/ns.h> 45.Fd #include <netns/ns.h>
48.Ft struct ns_addr 46.Ft struct ns_addr
49.Fn ns_addr "char *cp" 47.Fn ns_addr "char *cp"
50.Ft char * 48.Ft char *
51.Fn ns_ntoa "struct ns_addr ns" 49.Fn ns_ntoa "struct ns_addr ns"
@@ -69,27 +67,27 @@ notation in common use in the Xerox Development Environment:
69.Ed 67.Ed
70.Pp 68.Pp
71Trailing zero fields are suppressed, and each number is printed in hexadecimal, 69Trailing zero fields are suppressed, and each number is printed in hexadecimal,
72in a format suitable for input to 70in a format suitable for input to
73.Fn ns_addr . 71.Fn ns_addr .
74Any fields lacking super-decimal digits will have a 72Any fields lacking super-decimal digits will have a
75trailing 73trailing
76.Ql H 74.Sq H
77appended. 75appended.
78.Pp 76.Pp
79Unfortunately, no universal standard exists for representing 77Unfortunately, no universal standard exists for representing
80.Tn XNS 78.Tn XNS
81addresses. 79addresses.
82An effort has been made to insure that 80An effort has been made to ensure that
83.Fn ns_addr 81.Fn ns_addr
84be compatible with most formats in common use. 82be compatible with most formats in common use.
85It will first separate an address into 1 to 3 fields using a single delimiter 83It will first separate an address into 1 to 3 fields using a single delimiter
86chosen from 84chosen from
87period 85period
88.Ql \&. , 86.Pq Ql \&. ,
89colon 87colon
90.Ql \&: 88.Pq Ql \&: ,
91or pound-sign 89or pound-sign
92.Ql \&# . 90.Ql # .
93Each field is then examined for byte separators (colon or period). 91Each field is then examined for byte separators (colon or period).
94If there are byte separators, each subfield separated is taken to be 92If there are byte separators, each subfield separated is taken to be
95a small hexadecimal number, and the entirety is taken as a network-byte-ordered 93a small hexadecimal number, and the entirety is taken as a network-byte-ordered
@@ -103,24 +101,25 @@ as hexadecimal if there is a leading
103.Ql 0x 101.Ql 0x
104(as in C), 102(as in C),
105a trailing 103a trailing
106.Ql H 104.Sq H
107(as in Mesa), or there are any super-decimal digits present. 105(as in Mesa), or there are any super-decimal digits present.
108It is interpreted as octal is there is a leading 106It is interpreted as octal if there is a leading
109.Ql 0 107.Ql 0
110and there are no super-octal digits. 108and there are no super-octal digits.
111Otherwise, it is converted as a decimal number. 109Otherwise, it is converted as a decimal number.
112.Sh RETURN VALUES 110.Sh RETURN VALUES
113None. (See 111None.
112(See
114.Sx BUGS . ) 113.Sx BUGS . )
115.Sh SEE ALSO 114.Sh SEE ALSO
116.Xr hosts 5 , 115.Xr hosts 5 ,
117.Xr networks 5 , 116.Xr networks 5
118.Sh HISTORY 117.Sh HISTORY
119The 118The
120.Fn ns_addr 119.Fn ns_addr
121and 120and
122.Fn ns_toa 121.Fn ns_toa
123functions appeared in 122functions appeared in
124.Bx 4.3 . 123.Bx 4.3 .
125.Sh BUGS 124.Sh BUGS
126The string returned by 125The string returned by