xref: /original-bsd/lib/libc/net/iso_addr.3 (revision c3e32dec)
1.\" Copyright (c) 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)iso_addr.3	8.1 (Berkeley) 06/04/93
7.\"
8.Dd
9.Dt ISO_ADDR 3
10.Os
11.Sh NAME
12.Nm iso_addr ,
13.Nm iso_ntoa
14.Nd "elementary network address conversion routines for Open System Interconnection
15.Sh SYNOPSIS
16.Fd #include <sys/types.h>
17.Fd #include <netiso/iso.h>
18.Ft struct iso_addr *
19.Fn iso_addr "char *cp"
20.Ft char *
21.Fn iso_ntoa "struct iso_addr *isoa"
22.Sh DESCRIPTION
23The routine
24.Fn iso_addr
25interprets character strings representing
26.Tn OSI
27addresses, returning binary information suitable
28for use in system calls.
29The routine
30.Fn iso_ntoa
31takes
32.Tn OSI
33addresses and returns
34.Tn ASCII
35strings representing NSAPs (network service
36access points) in a
37notation inverse to that accepted by
38.Fn iso_addr .
39.Pp
40Unfortunately, no universal standard exists for representing
41.Tn OSI
42network addresses.
43.Pp
44The format employed by
45.Fn iso_addr
46is a sequence of hexadecimal
47.Dq digits
48(optionally separated by periods),
49of the form:
50.Bd -filled -offset indent
51<hex digits>.<hex digits>.<hex digits>
52.Ed
53.Pp
54Each pair of hexadecimal digits represents a byte
55with the leading digit indicating the higher-ordered bits.
56A period following an even number of bytes has no
57effect (but may be used to increase legibility).
58A period following an odd number of bytes has the
59effect of causing the byte of address being translated
60to have its higher order bits filled with zeros.
61.Sh RETURN VALUES
62.Fn iso_ntoa
63always returns a null terminated string.
64.Fn iso_addr
65always returns a pointer to a struct iso_addr.
66(See
67.Sx BUGS . )
68.Sh SEE ALSO
69.Xr iso 4
70.Sh HISTORY
71The
72.Fn iso_addr
73and
74.Fn iso_ntoa
75functions appeared in
76.Bx 4.3 Reno .
77.Sh BUGS
78The returned values
79reside in a static memory area.
80.Pp
81The function
82.Fn iso_addr
83should diagnose improperly formed input, and there should be an unambiguous
84way to recognize this.
85