Wireshark
4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wsutil
inet_cidr.h
Go to the documentation of this file.
1
16
#ifndef __IPV4_H__
17
#define __IPV4_H__
18
19
#include <wireshark.h>
20
#include <
wsutil/inet_addr.h
>
21
22
typedef
struct
{
23
uint32_t addr;
/* stored in host order */
24
uint32_t nmask;
/* stored in host order */
25
}
ipv4_addr_and_mask
;
26
27
typedef
struct
{
28
ws_in6_addr
addr;
29
uint32_t prefix;
30
}
ipv6_addr_and_prefix
;
31
32
/*
33
********** IPv4 *********
34
*/
35
42
WS_DLL_PUBLIC
43
uint32_t
44
ws_ipv4_get_subnet_mask
(
const
uint32_t mask_length);
45
46
WS_DLL_PUBLIC
47
void
48
ws_ipv4_addr_and_mask_init(
ipv4_addr_and_mask
*dst,
ws_in4_addr
src_addr,
int
src_bits);
49
50
WS_DLL_PUBLIC
51
bool
52
ws_ipv4_addr_and_mask_contains(
const
ipv4_addr_and_mask
*ipv4,
const
ws_in4_addr
*addr);
53
54
/*
55
********** IPv6 *********
56
*/
57
58
WS_DLL_PUBLIC
59
bool
60
ws_ipv6_addr_and_prefix_contains(
const
ipv6_addr_and_prefix
*ipv6,
const
ws_in6_addr
*addr);
61
62
#endif
inet_addr.h
ws_in4_addr
uint32_t ws_in4_addr
Definition
inet_addr.h:22
ws_ipv4_get_subnet_mask
WS_DLL_PUBLIC uint32_t ws_ipv4_get_subnet_mask(const uint32_t mask_length)
Definition
inet_cidr.c:14
e_in6_addr
Definition
inet_addr.h:27
ipv4_addr_and_mask
Definition
inet_cidr.h:22
ipv6_addr_and_prefix
Definition
inet_cidr.h:27
Generated by
1.9.8