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