From a86c5f7cae7ec9a3398300555a0b644689d946a1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 19 Sep 2024 06:14:53 +0200 Subject: Merging upstream version 4.4.0. Signed-off-by: Daniel Baumann --- epan/iana-ip.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 epan/iana-ip.h (limited to 'epan/iana-ip.h') diff --git a/epan/iana-ip.h b/epan/iana-ip.h new file mode 100644 index 00000000..3f3efb92 --- /dev/null +++ b/epan/iana-ip.h @@ -0,0 +1,47 @@ +/* iana-ip.h + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef __IANA_IP_H__ +#define __IANA_IP_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +enum iana_ip { + WS_IANA_IPv4 = 4, + WS_IANA_IPv6 = 6, +}; + +struct ws_iana_ip_special_block { + enum iana_ip type; + union { + ipv4_addr_and_mask ipv4; + ipv6_addr_and_prefix ipv6; + } u_ip; + const char *name; + /* true = 1; false = 0; n/a = -1 */ + int source, destination, forwardable, global, reserved; +}; + +WS_DLL_PUBLIC +const struct ws_iana_ip_special_block * +ws_iana_ipv4_special_block_lookup(uint32_t ipnum); + +WS_DLL_PUBLIC +const struct ws_iana_ip_special_block * +ws_iana_ipv6_special_block_lookup(const ws_in6_addr *addr); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif -- cgit v1.2.3