1 .\" Copyright 2004 The Aerospace Corporation. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions, and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions, and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. The name of The Aerospace Corporation may not be used to endorse or
13 .\" promote products derived from this software.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" Copyright (c) 1995
28 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
30 .\" Redistribution and use in source and binary forms, with or without
31 .\" modification, are permitted provided that the following conditions
33 .\" 1. Redistributions of source code must retain the above copyright
34 .\" notice, this list of conditions and the following disclaimer.
35 .\" 2. Redistributions in binary form must reproduce the above copyright
36 .\" notice, this list of conditions and the following disclaimer in the
37 .\" documentation and/or other materials provided with the distribution.
38 .\" 3. All advertising materials mentioning features or use of this software
39 .\" must display the following acknowledgement:
40 .\" This product includes software developed by Bill Paul.
41 .\" 4. Neither the name of the author nor the names of any co-contributors
42 .\" may be used to endorse or promote products derived from this software
43 .\" without specific prior written permission.
45 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
46 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 .\" $FreeBSD: src/lib/libc/net/eui64.3,v 1.4 2005/01/20 09:17:03 ru Exp $
58 .\" $DragonFly: src/lib/libc/net/eui64.3,v 1.4 2006/05/26 19:39:37 swildner Exp $
70 .Nd IEEE EUI-64 conversion and lookup routines
77 .\" .Fn eui64_line "const char *l" "struct eui64 *e" "char *hostname" "size_t len"
79 .Fn eui64_aton "const char *a" "struct eui64 *e"
81 .Fn eui64_ntoa "const struct eui64 *id" "char *a" "size_t len"
83 .Fn eui64_ntohost "char *hostname" "size_t len" "const struct eui64 *id"
85 .Fn eui64_hostton "const char *hostname" "struct eui64 *id"
87 These functions operate on IEEE EUI-64s using an
89 structure, which is defined in the header file
91 .Bd -literal -offset indent
93 * The number of bytes in an EUI-64.
98 * Structure of an IEEE EUI-64.
101 u_char octet[EUI64_LEN];
115 .\" to the EUI-64 specified in the string and
118 .\" This function is used to parse lines from
120 .\" into their component parts.
126 representation of an EUI-64 into an
131 converts an EUI-64 specified as an
141 functions map EUI-64s to their corresponding hostnames
148 converts from EUI-64 to hostname, and
150 converts from hostname to EUI-64.
155 .\" returns zero on success and non-zero if it was unable to parse
156 .\" any part of the supplied line
158 .\" It returns the extracted EUI-64 in the supplied
162 .\" and the hostname in the supplied string
167 returns a pointer to a string containing an
169 representation of an EUI-64.
170 If it is unable to convert
173 structure, it returns a
178 returns a pointer to an
180 structure on success and a
188 functions both return zero on success or non-zero if they were
189 unable to find a match in the
193 The user must insure that the hostname strings passed to the
198 functions are large enough to contain the returned hostnames.
202 contains a line with a single
208 functions will attempt to consult the NIS
212 maps in addition to the data in the
220 These functions first appears in
222 They are derived from the
230 functions returns values that are stored in static memory areas
231 which may be overwritten the next time they are called.