Wireshark  4.3.0
The Wireshark network protocol analyzer
iana-ip.h
1 /* iana-ip.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 #ifndef __IANA_IP_H__
10 #define __IANA_IP_H__
11 
12 #include <wireshark.h>
13 #include <wsutil/inet_cidr.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif /* __cplusplus */
18 
19 enum iana_ip {
20  WS_IANA_IPv4 = 4,
21  WS_IANA_IPv6 = 6,
22 };
23 
25  enum iana_ip type;
26  union {
27  ipv4_addr_and_mask ipv4;
29  } u_ip;
30  const char *name;
31  /* true = 1; false = 0; n/a = -1 */
32  int source, destination, forwardable, global, reserved;
33 };
34 
35 WS_DLL_PUBLIC
36 const struct ws_iana_ip_special_block *
37 ws_iana_ipv4_special_block_lookup(uint32_t ipnum);
38 
39 WS_DLL_PUBLIC
40 const struct ws_iana_ip_special_block *
41 ws_iana_ipv6_special_block_lookup(const ws_in6_addr *addr);
42 
43 #ifdef __cplusplus
44 }
45 #endif /* __cplusplus */
46 
47 #endif
Definition: inet_addr.h:21
Definition: inet_cidr.h:22
Definition: inet_cidr.h:27
Definition: iana-ip.h:24