![]() |
Wireshark
4.3.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Macros | |
#define | PREFIX_LEN_OK 0 |
#define | PREFIX_LEN_TOO_LONG 1 |
#define | PREFIX_LEN_ZERO 2 |
Functions | |
int | tvb_get_ipv4_addr_with_prefix_len (tvbuff_t *tvb, int offset, ws_in4_addr *addr, guint32 prefix_len) |
int | tvb_get_ipv6_addr_with_prefix_len (tvbuff_t *tvb, int offset, ws_in6_addr *addr, guint32 prefix_len) |
guint32 | ip_get_subnet_mask (const guint32 mask_length) |
Declarations of routines to fetch IPv4 and IPv6 addresses from a tvbuff and then mask out bits other than those covered by a prefix length
Wireshark - Network traffic analyzer By Gerald Combs geral Copyright 1998 Gerald Combs d@wi resha rk.o rg
SPDX-License-Identifier: GPL-2.0-or-later
guint32 ip_get_subnet_mask | ( | const guint32 | mask_length | ) |
Returns the IPv4 subnet mask of the specified length
mask_length | the number of bits in the subnet mask (max of 32) |
int tvb_get_ipv4_addr_with_prefix_len | ( | tvbuff_t * | tvb, |
int | offset, | ||
ws_in4_addr * | addr, | ||
guint32 | prefix_len | ||
) |
Fetches an IPv4 address from a tvbuff and masks out bits other than those covered by a prefix length
tvb | tvbuff to read an IPv4 address from |
offset | offset in the tvbuff to read the IPv4 address from |
addr | memory location where the IPv4 address read should be stored |
prefix_len | the length of the prefix (in bits) |
int tvb_get_ipv6_addr_with_prefix_len | ( | tvbuff_t * | tvb, |
int | offset, | ||
ws_in6_addr * | addr, | ||
guint32 | prefix_len | ||
) |
Fetches an IPv6 address from a tvbuff and masks out bits other than those covered by a prefix length
tvb | tvbuff to read an IPv6 address from |
offset | offset in the tvbuff to read the IPv6 address from |
addr | memory location where the IPv6 address read should be stored |
prefix_len | the length of the prefix (in bits) |