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