17typedef int (*AddrValueToString)(
const address* addr,
char *buf,
int buf_len);
18typedef int (*AddrValueToStringLen)(
const address* addr);
19typedef unsigned (*AddrValueToByte)(
const address* addr, uint8_t *buf,
unsigned buf_len);
20typedef int (*AddrFixedLen)(void);
21typedef const char* (*AddrColFilterString)(
const address* addr,
bool src);
22typedef int (*AddrNameResolutionLen)(void);
23typedef const char* (*AddrNameResolutionToString)(
const address* addr);
43 AddrValueToString to_str_func, AddrValueToStringLen str_len_func,
44 AddrValueToByte to_bytes_func, AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
45 AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func);
int ether_len(void)
Get the length of an Ethernet address.
Definition address_types.c:210
int ipv4_to_str(const address *addr, char *buf, int buf_len)
Convert an IPv4 address to a string.
Definition address_types.c:228
WS_DLL_PUBLIC int address_type_dissector_register(const char *name, const char *pretty_name, AddrValueToString to_str_func, AddrValueToStringLen str_len_func, AddrValueToByte to_bytes_func, AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func, AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func)
Registers a new address type with various associated functions.
Definition address_types.c:103
const char * ether_name_resolution_str(const address *addr)
Get a string representation of an Ethernet address for name resolution.
Definition address_types.c:215
const char * address_type_column_filter_string(const address *addr, bool src)
Return a display‑filter string for the given address and direction.
Definition address_types.c:1181
WS_DLL_PUBLIC int ether_to_str(const address *addr, char *buf, int buf_len)
Convert an Ethernet address to a string representation.
Definition address_types.c:188
int none_addr_str_len(const address *addr)
Calculates the length of a string representation for an address with no type.
WS_DLL_PUBLIC int address_type_get_by_name(const char *name)
Retrieves the address type by its name.
Definition address_types.c:141
int none_addr_len(void)
Returns the length of a none address.
Definition address_types.c:170
int ether_name_resolution_len(void)
Returns the length of the Ethernet name resolution.
Definition address_types.c:220
void address_types_initialize(void)
Initialize the address types system.
Definition address_types.c:694
int none_addr_to_str(const address *addr, char *buf, int buf_len)
Converts a none address to a string.
int ether_str_len(const address *addr)
Calculates the length of a string representation for an Ethernet address.
Definition address_types.c:26