]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/eui64_aton.h
Merged from trunk
[thirdparty/squid.git] / compat / eui64_aton.h
1 #ifndef SQUID_CONFIG_H
2 #include "config.h"
3 #endif
4
5 /* If we have this system file use it. Otherwise use the below definitions. */
6 #if HAVE_SYS_EUI64_H
7 #include <sys/eui64.h>
8 #else
9
10 /*
11 * Squid Change History:
12 *
13 * 2009-10-16 : import from NetBSD eui64.c.
14 * strip definitions not required by eui64_aton()
15 */
16
17 /* $NetBSD: eui64.h,v 1.1 2005/07/11 15:35:25 kiyohara Exp $ */
18 /*-
19 * Copyright 2004 The Aerospace Corporation. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 *
25 * 1. Redistributions of source code must retain the above copyright
26 * notice, this list of conditions, and the following disclaimer.
27 * 2. Redistributions in binary form must reproduce the above copyright
28 * notice, this list of conditions, and the following disclaimer in the
29 * documentation and/or other materials provided with the distribution.
30 * 3. The name of The Aerospace Corporation may not be used to endorse or
31 * promote products derived from this software.
32 *
33 * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * $FreeBSD: /repoman/r/ncvs/src/sys/sys/eui64.h,v 1.2 2005/01/07 02:29:23 imp Exp $
46 */
47 #ifndef _SYS_EUI64_H
48 #define _SYS_EUI64_H
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52
53 /**
54 * Size of the ASCII representation of an EUI-64.
55 */
56 #define EUI64_SIZ 24
57
58 /**
59 * The number of bytes in an EUI-64.
60 */
61 #define EUI64_LEN 8
62
63 /**
64 * Structure of an IEEE EUI-64.
65 */
66 struct eui64 {
67 u_char octet[EUI64_LEN];
68 };
69
70 int eui64_aton(const char *a, struct eui64 *e);
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* !_SYS_EUI64_H */
76 #endif /* HAVE_SYS_EUI64_H */