diff options
Diffstat (limited to 'src/lib/libc/net/ipx.3')
-rw-r--r-- | src/lib/libc/net/ipx.3 | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/src/lib/libc/net/ipx.3 b/src/lib/libc/net/ipx.3 new file mode 100644 index 0000000000..503483bfab --- /dev/null +++ b/src/lib/libc/net/ipx.3 | |||
@@ -0,0 +1,122 @@ | |||
1 | .\" $OpenBSD: ipx.3,v 1.11 2005/06/09 08:40:49 jmc Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 1986, 1991, 1993 | ||
4 | .\" The Regents of the University of California. All rights reserved. | ||
5 | .\" | ||
6 | .\" Redistribution and use in source and binary forms, with or without | ||
7 | .\" modification, are permitted provided that the following conditions | ||
8 | .\" are met: | ||
9 | .\" 1. Redistributions of source code must retain the above copyright | ||
10 | .\" notice, this list of conditions and the following disclaimer. | ||
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer in the | ||
13 | .\" documentation and/or other materials provided with the distribution. | ||
14 | .\" 3. Neither the name of the University nor the names of its contributors | ||
15 | .\" may be used to endorse or promote products derived from this software | ||
16 | .\" without specific prior written permission. | ||
17 | .\" | ||
18 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
19 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
20 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
21 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
22 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
23 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
24 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
25 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
26 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
28 | .\" SUCH DAMAGE. | ||
29 | .\" | ||
30 | .Dd June 4, 1993 | ||
31 | .Dt IPX 3 | ||
32 | .Os | ||
33 | .Sh NAME | ||
34 | .Nm ipx_addr , | ||
35 | .Nm ipx_ntoa | ||
36 | .Nd IPX address conversion routines | ||
37 | .Sh SYNOPSIS | ||
38 | .Fd #include <sys/types.h> | ||
39 | .Fd #include <netipx/ipx.h> | ||
40 | .Ft struct ipx_addr | ||
41 | .Fn ipx_addr "const char *cp" | ||
42 | .Ft char * | ||
43 | .Fn ipx_ntoa "struct ipx_addr ipx" | ||
44 | .Sh DESCRIPTION | ||
45 | The routine | ||
46 | .Fn ipx_addr | ||
47 | interprets character strings representing | ||
48 | .Tn IPX | ||
49 | addresses, returning binary information suitable | ||
50 | for use in system calls. | ||
51 | The routine | ||
52 | .Fn ipx_ntoa | ||
53 | takes | ||
54 | .Tn IPX | ||
55 | addresses and returns | ||
56 | .Tn ASCII | ||
57 | strings representing the address in a | ||
58 | notation in common use: | ||
59 | .Bd -filled -offset indent | ||
60 | <network number>.<host number>.<port number> | ||
61 | .Ed | ||
62 | .Pp | ||
63 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, | ||
64 | in a format suitable for input to | ||
65 | .Fn ipx_addr . | ||
66 | Any fields lacking super-decimal digits will have a | ||
67 | trailing | ||
68 | .Sq H | ||
69 | appended. | ||
70 | .Pp | ||
71 | An effort has been made to ensure that | ||
72 | .Fn ipx_addr | ||
73 | be compatible with most formats in common use. | ||
74 | It will first separate an address into 1 to 3 fields using a single delimiter | ||
75 | chosen from | ||
76 | period | ||
77 | .Pq Ql \&. , | ||
78 | colon | ||
79 | .Pq Ql \&: , | ||
80 | or pound-sign | ||
81 | .Pq Ql # . | ||
82 | Each field is then examined for byte separators (colon or period). | ||
83 | If there are byte separators, each subfield separated is taken to be | ||
84 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered | ||
85 | quantity to be zero extended in the high-network-order bytes. | ||
86 | Next, the field is inspected for hyphens, in which case | ||
87 | the field is assumed to be a number in decimal notation | ||
88 | with hyphens separating the millenia. | ||
89 | Next, the field is assumed to be a number: | ||
90 | It is interpreted | ||
91 | as hexadecimal if there is a leading | ||
92 | .Ql 0x | ||
93 | (as in C), | ||
94 | a trailing | ||
95 | .Sq H | ||
96 | (as in Mesa), or there are any super-decimal digits present. | ||
97 | It is interpreted as octal if there is a leading | ||
98 | .Ql 0 | ||
99 | and there are no super-octal digits. | ||
100 | Otherwise, it is converted as a decimal number. | ||
101 | .Sh RETURN VALUES | ||
102 | None. | ||
103 | (See | ||
104 | .Sx BUGS . ) | ||
105 | .Sh SEE ALSO | ||
106 | .Xr hosts 5 , | ||
107 | .Xr networks 5 | ||
108 | .Sh HISTORY | ||
109 | The precursor | ||
110 | .Fn ns_addr | ||
111 | and | ||
112 | .Fn ns_ntoa | ||
113 | functions appeared in | ||
114 | .Bx 4.3 . | ||
115 | .Sh BUGS | ||
116 | The string returned by | ||
117 | .Fn ipx_ntoa | ||
118 | resides in a static memory area. | ||
119 | The function | ||
120 | .Fn ipx_addr | ||
121 | should diagnose improperly formed input, and there should be an unambiguous | ||
122 | way to recognize this. | ||