diff options
Diffstat (limited to 'src/lib/libc/net/ns.3')
| -rw-r--r-- | src/lib/libc/net/ns.3 | 31 |
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 |
| 71 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, | 69 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, |
| 72 | in a format suitable for input to | 70 | in a format suitable for input to |
| 73 | .Fn ns_addr . | 71 | .Fn ns_addr . |
| 74 | Any fields lacking super-decimal digits will have a | 72 | Any fields lacking super-decimal digits will have a |
| 75 | trailing | 73 | trailing |
| 76 | .Ql H | 74 | .Sq H |
| 77 | appended. | 75 | appended. |
| 78 | .Pp | 76 | .Pp |
| 79 | Unfortunately, no universal standard exists for representing | 77 | Unfortunately, no universal standard exists for representing |
| 80 | .Tn XNS | 78 | .Tn XNS |
| 81 | addresses. | 79 | addresses. |
| 82 | An effort has been made to insure that | 80 | An effort has been made to ensure that |
| 83 | .Fn ns_addr | 81 | .Fn ns_addr |
| 84 | be compatible with most formats in common use. | 82 | be compatible with most formats in common use. |
| 85 | It will first separate an address into 1 to 3 fields using a single delimiter | 83 | It will first separate an address into 1 to 3 fields using a single delimiter |
| 86 | chosen from | 84 | chosen from |
| 87 | period | 85 | period |
| 88 | .Ql \&. , | 86 | .Pq Ql \&. , |
| 89 | colon | 87 | colon |
| 90 | .Ql \&: | 88 | .Pq Ql \&: , |
| 91 | or pound-sign | 89 | or pound-sign |
| 92 | .Ql \&# . | 90 | .Ql # . |
| 93 | Each field is then examined for byte separators (colon or period). | 91 | Each field is then examined for byte separators (colon or period). |
| 94 | If there are byte separators, each subfield separated is taken to be | 92 | If there are byte separators, each subfield separated is taken to be |
| 95 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered | 93 | a 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), |
| 105 | a trailing | 103 | a 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. |
| 108 | It is interpreted as octal is there is a leading | 106 | It is interpreted as octal if there is a leading |
| 109 | .Ql 0 | 107 | .Ql 0 |
| 110 | and there are no super-octal digits. | 108 | and there are no super-octal digits. |
| 111 | Otherwise, it is converted as a decimal number. | 109 | Otherwise, it is converted as a decimal number. |
| 112 | .Sh RETURN VALUES | 110 | .Sh RETURN VALUES |
| 113 | None. (See | 111 | None. |
| 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 |
| 119 | The | 118 | The |
| 120 | .Fn ns_addr | 119 | .Fn ns_addr |
| 121 | and | 120 | and |
| 122 | .Fn ns_toa | 121 | .Fn ns_toa |
| 123 | functions appeared in | 122 | functions appeared in |
| 124 | .Bx 4.3 . | 123 | .Bx 4.3 . |
| 125 | .Sh BUGS | 124 | .Sh BUGS |
| 126 | The string returned by | 125 | The string returned by |
