diff options
Diffstat (limited to 'src/lib/libc/net/iso_addr.3')
-rw-r--r-- | src/lib/libc/net/iso_addr.3 | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/src/lib/libc/net/iso_addr.3 b/src/lib/libc/net/iso_addr.3 new file mode 100644 index 0000000000..896f769482 --- /dev/null +++ b/src/lib/libc/net/iso_addr.3 | |||
@@ -0,0 +1,107 @@ | |||
1 | .\" $OpenBSD: iso_addr.3,v 1.5 2003/06/02 20:18:35 millert Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 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 ISO_ADDR 3 | ||
32 | .Os | ||
33 | .Sh NAME | ||
34 | .Nm iso_addr , | ||
35 | .Nm iso_ntoa | ||
36 | .Nd "network address conversion routines for Open System Interconnection" | ||
37 | .Sh SYNOPSIS | ||
38 | .Fd #include <sys/types.h> | ||
39 | .Fd #include <netiso/iso.h> | ||
40 | .Ft struct iso_addr * | ||
41 | .Fn iso_addr "char *cp" | ||
42 | .Ft char * | ||
43 | .Fn iso_ntoa "struct iso_addr *isoa" | ||
44 | .Sh DESCRIPTION | ||
45 | The routine | ||
46 | .Fn iso_addr | ||
47 | interprets character strings representing | ||
48 | .Tn OSI | ||
49 | addresses, returning binary information suitable | ||
50 | for use in system calls. | ||
51 | The routine | ||
52 | .Fn iso_ntoa | ||
53 | takes | ||
54 | .Tn OSI | ||
55 | addresses and returns | ||
56 | .Tn ASCII | ||
57 | strings representing NSAPs (network service | ||
58 | access points) in a | ||
59 | notation inverse to that accepted by | ||
60 | .Fn iso_addr . | ||
61 | .Pp | ||
62 | Unfortunately, no universal standard exists for representing | ||
63 | .Tn OSI | ||
64 | network addresses. | ||
65 | .Pp | ||
66 | The format employed by | ||
67 | .Fn iso_addr | ||
68 | is a sequence of hexadecimal | ||
69 | .Dq digits | ||
70 | (optionally separated by periods), | ||
71 | of the form: | ||
72 | .Bd -filled -offset indent | ||
73 | <hex digits>.<hex digits>.<hex digits> | ||
74 | .Ed | ||
75 | .Pp | ||
76 | Each pair of hexadecimal digits represents a byte | ||
77 | with the leading digit indicating the higher-ordered bits. | ||
78 | A period following an even number of bytes has no | ||
79 | effect (but may be used to increase legibility). | ||
80 | A period following an odd number of bytes has the | ||
81 | effect of causing the byte of address being translated | ||
82 | to have its higher order bits filled with zeros. | ||
83 | .Sh RETURN VALUES | ||
84 | .Fn iso_ntoa | ||
85 | always returns a null terminated string. | ||
86 | .Fn iso_addr | ||
87 | always returns a pointer to a | ||
88 | .Li struct iso_addr . | ||
89 | (See | ||
90 | .Sx BUGS . ) | ||
91 | .Sh SEE ALSO | ||
92 | .Xr iso 4 | ||
93 | .Sh HISTORY | ||
94 | The | ||
95 | .Fn iso_addr | ||
96 | and | ||
97 | .Fn iso_ntoa | ||
98 | functions appeared in | ||
99 | .Bx 4.3 Reno . | ||
100 | .Sh BUGS | ||
101 | The returned values | ||
102 | reside in a static memory area. | ||
103 | .Pp | ||
104 | The function | ||
105 | .Fn iso_addr | ||
106 | should diagnose improperly formed input, and there should be an unambiguous | ||
107 | way to recognize this. | ||