| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
addr_resolv.h
Go to the documentation of this file.
1
12/* The buffers returned by these functions are all allocated with a
13 * packet lifetime and does not have to be freed.
14 * However, take into account that when the packet dissection
15 * completes, these buffers will be automatically reclaimed/freed.
16 * If you need the buffer to remain for a longer scope than packet lifetime
17 * you must copy the content to an wmem_file_scope() buffer.
18 */
19#pragma once
20#include <epan/address.h>
21#include <epan/tvbuff.h>
22#include <wsutil/inet_cidr.h>
23#include <epan/to_str.h>
24#include <wiretap/wtap.h>
25#include "ws_symbol_export.h"
26
27#ifdef __cplusplus
28 extern "C" {
29#endif /* __cplusplus */
30
31#ifndef MAXNAMELEN
32#define MAXNAMELEN 64 /* max name length (most names: DNS labels, services, eth) */
33#endif
34
35#ifndef MAXVLANNAMELEN
36#define MAXVLANNAMELEN 128 /* max vlan name length */
37#endif
38
39#ifndef MAXDNSNAMELEN
40#define MAXDNSNAMELEN 256 /* max total length of a domain name in the DNS */
41#endif
42
43#define BASE_ENTERPRISES BASE_CUSTOM
44#define STRINGS_ENTERPRISES CF_FUNC(enterprises_base_custom)
45
49 typedef struct _e_addr_resolve {
50 bool mac_name;
51 bool network_name;
52 bool transport_name;
53 bool dns_pkt_addr_resolution;
54 bool handshake_sni_addr_resolution;
55 bool use_external_net_name_resolver;
56 bool vlan_name;
57 bool ss7pc_name;
58 bool maxmind_geoip;
59 bool tac_name;
60} e_addr_resolve;
61
62#define ADDR_RESOLV_MACADDR(at) \
63 (((at)->type == AT_ETHER) || ((at)->type == AT_EUI64))
64
65#define ADDR_RESOLV_NETADDR(at) \
66 (((at)->type == AT_IPv4) || ((at)->type == AT_IPv6) || ((at)->type == AT_IPX))
67
68 struct hashether;
69 typedef struct hashether hashether_t;
70
71 struct hasheui64;
72 typedef struct hasheui64 hasheui64_t;
73
74 struct hashwka;
75 typedef struct hashwka hashwka_t;
76
77 struct hashmanuf;
78 typedef struct hashmanuf hashmanuf_t;
79
83 typedef struct _serv_port_key {
84 uint16_t port;
85 port_type type;
86} serv_port_key_t;
87
91 typedef struct _resolved_name {
92 char name[MAXDNSNAMELEN];
93} resolved_name_t;
94
95/*
96 * Flags for various resolved name hash table entries.
97 */
98#define TRIED_RESOLVE_ADDRESS (1U<<0) /* name resolution is being/has been tried */
99#define NAME_RESOLVED (1U<<1) /* the name field contains a host name, not a printable address */
100#define RESOLVED_ADDRESS_USED (1U<<2) /* a get_hostname* call returned the host name */
101#define STATIC_HOSTNAME (1U<<3) /* do not update entries from hosts file with DNS responses */
102#define NAME_RESOLVED_PREFIX (1U<<4) /* name was generated from a prefix (e.g., OUI) instead of the entire address */
103
104#define TRIED_OR_RESOLVED_MASK (TRIED_RESOLVE_ADDRESS | NAME_RESOLVED)
105#define USED_AND_RESOLVED_MASK (NAME_RESOLVED | RESOLVED_ADDRESS_USED)
106
107/*
108 * Flag controlling what names to resolve.
109 */
110WS_DLL_PUBLIC e_addr_resolve gbl_resolv_flags;
111
112/* Functions in addr_resolv.c */
113
124WS_DLL_PUBLIC hashipv4_t * new_ipv4(const unsigned addr);
125
138WS_DLL_PUBLIC bool fill_dummy_ip4(const unsigned addr, hashipv4_t* volatile tp);
139
151WS_DLL_PUBLIC char *udp_port_to_display(wmem_allocator_t *allocator, unsigned port);
152
153
165WS_DLL_PUBLIC char *tcp_port_to_display(wmem_allocator_t *allocator, unsigned port);
166
178WS_DLL_PUBLIC char *dccp_port_to_display(wmem_allocator_t *allocator, unsigned port);
179
191WS_DLL_PUBLIC char *sctp_port_to_display(wmem_allocator_t *allocator, unsigned port);
192
205WS_DLL_PUBLIC const char *serv_name_lookup(port_type proto, unsigned port);
206
221WS_DLL_PUBLIC const char *enterprises_lookup(uint32_t value, const char *unknown_str);
222
233WS_DLL_PUBLIC const char *try_enterprises_lookup(uint32_t value);
234
245WS_DLL_PUBLIC void enterprises_base_custom(char *buf, uint32_t value);
246
258WS_DLL_PUBLIC const char *try_serv_name_lookup(port_type proto, unsigned port);
259
273WS_DLL_PUBLIC char *port_with_resolution_to_str(wmem_allocator_t *scope,
274 port_type proto, unsigned port);
275
294WS_DLL_PUBLIC int port_with_resolution_to_str_buf(char *buf, unsigned long buf_size,
295 port_type proto, unsigned port);
296
297/*
298 * Asynchronous host name lookup initialization, processing, and cleanup
299 */
300
301/* Setup name resolution preferences */
302 struct pref_module;
303
314 extern void addr_resolve_pref_init(struct pref_module *nameres);
315
319 extern void addr_resolve_pref_apply(void);
320
329WS_DLL_PUBLIC void disable_name_resolution(void);
330
342WS_DLL_PUBLIC bool host_name_lookup_process(void);
343
360WS_DLL_PUBLIC const char *get_hostname(const unsigned addr);
361
377WS_DLL_PUBLIC char *get_hostname_wmem(wmem_allocator_t *allocator, const unsigned addr);
378
393WS_DLL_PUBLIC const char *get_hostname6(const ws_in6_addr *ad);
394
405WS_DLL_PUBLIC char *get_hostname6_wmem(wmem_allocator_t *allocator, const ws_in6_addr *ad);
406
422WS_DLL_PUBLIC const char *get_ether_name(const uint8_t *addr);
423
434WS_DLL_PUBLIC const char *get_hostname_ss7pc(const uint8_t ni, const uint32_t pc);
435
445WS_DLL_PUBLIC void fill_unresolved_ss7pc(const char * pc_addr, const uint8_t ni, const uint32_t pc);
446
458WS_DLL_PUBLIC const char *tvb_get_ether_name(tvbuff_t *tvb, unsigned offset);
459
472WS_DLL_PUBLIC const char *get_ether_name_if_known(const uint8_t *addr);
473
490 extern const char *get_manuf_name(const uint8_t *addr, size_t size);
491
508WS_DLL_PUBLIC const char *get_manuf_name_if_known(const uint8_t *addr, size_t size);
509
521WS_DLL_PUBLIC const char *uint_get_manuf_name_if_known(const uint32_t oid);
522
538WS_DLL_PUBLIC const char *tvb_get_manuf_name(tvbuff_t *tvb, unsigned offset);
539
553WS_DLL_PUBLIC const char *tvb_get_manuf_name_if_known(tvbuff_t *tvb, unsigned offset);
554
567 extern const char *get_eui64_name(const uint8_t *addr);
568
584WS_DLL_PUBLIC char *eui64_to_display(wmem_allocator_t *allocator, const uint64_t addr);
585
598WS_DLL_PUBLIC char *get_ipxnet_name(wmem_allocator_t *allocator, const uint32_t addr);
599
612WS_DLL_PUBLIC char *get_vlan_name(wmem_allocator_t *allocator, const uint16_t id);
613
620WS_DLL_PUBLIC unsigned get_hash_ether_status(hashether_t* ether);
621
628WS_DLL_PUBLIC bool get_hash_ether_used(hashether_t* ether);
629
636WS_DLL_PUBLIC char* get_hash_ether_hexaddr(hashether_t* ether);
637
644WS_DLL_PUBLIC char* get_hash_ether_resolved_name(hashether_t* ether);
645
652WS_DLL_PUBLIC bool get_hash_manuf_used(hashmanuf_t* manuf);
653
660WS_DLL_PUBLIC char* get_hash_manuf_resolved_name(hashmanuf_t* manuf);
661
668WS_DLL_PUBLIC bool get_hash_wka_used(hashwka_t* wka);
669
676WS_DLL_PUBLIC char* get_hash_wka_resolved_name(hashwka_t* wka);
677
687WS_DLL_PUBLIC void add_ipv4_name(const unsigned addr, const char *name, const bool static_entry);
688
698WS_DLL_PUBLIC void add_ipv6_name(const ws_in6_addr *addr, const char *name, const bool static_entry);
699
710WS_DLL_PUBLIC bool add_hosts_file(const char *hosts_file);
711
722WS_DLL_PUBLIC bool add_ip_name_from_string(const char *addr, const char *name);
723
733WS_DLL_PUBLIC resolved_name_t* get_edited_resolved_name(const char* addr);
734
743WS_DLL_PUBLIC addrinfo_lists_t *get_addrinfo_list(void);
744
754WS_DLL_PUBLIC void add_ether_byip(const unsigned ip, const uint8_t *eth);
755
770WS_DLL_PUBLIC
771 bool get_host_ipaddr(const char *host, uint32_t *addrp);
772
787WS_DLL_PUBLIC
788 bool get_host_ipaddr6(const char *host, ws_in6_addr *addrp);
789
797WS_DLL_PUBLIC
798 wmem_map_t *get_manuf_hashtable(void);
799
807WS_DLL_PUBLIC
808 wmem_map_t *get_wka_hashtable(void);
809
817WS_DLL_PUBLIC
818 wmem_map_t *get_eth_hashtable(void);
819
827WS_DLL_PUBLIC
828 wmem_map_t *get_serv_port_hashtable(void);
829
837WS_DLL_PUBLIC
838 wmem_map_t *get_ipxnet_hash_table(void);
839
847WS_DLL_PUBLIC
848 wmem_map_t *get_vlan_hash_table(void);
849
857WS_DLL_PUBLIC
858 wmem_map_t *get_ipv4_hash_table(void);
859
867WS_DLL_PUBLIC
868 wmem_map_t *get_ipv6_hash_table(void);
869
870
871/*
872 * XXX - if we ever have per-session host name etc. information, we
873 * should probably have the "resolve synchronously or asynchronously"
874 * flag be per-session, set with an epan API.
875 */
884WS_DLL_PUBLIC
885 void set_resolution_synchrony(bool synchronous);
886
887/*
888 * private functions (should only be called by epan directly)
889 */
890
897WS_DLL_LOCAL
898 void name_resolver_init(void);
899
906WS_DLL_LOCAL
907 void host_name_lookup_reset(const char* app_env_var_prefix);
908
915WS_DLL_LOCAL
916 void addr_resolv_init(const char* app_env_var_prefix);
917
924WS_DLL_LOCAL
925 void addr_resolv_cleanup(void);
926
936WS_DLL_PUBLIC
937 bool str_to_ip(const char *str, void *dst);
938
948WS_DLL_PUBLIC
949 bool str_to_ip6(const char *str, void *dst);
950
961WS_DLL_LOCAL
962 bool str_to_eth(const char *str, uint8_t (*eth_bytes)[6]);
963
973WS_DLL_LOCAL
974 unsigned ipv6_oat_hash(const void *key);
975
986WS_DLL_LOCAL
987gboolean ipv6_equal(const void *v1, const void *v2);
988
1005WS_DLL_PUBLIC const char *tac_name_lookup(const unsigned addr);
1006
1007#ifdef __cplusplus
1008}
1009#endif /* __cplusplus */
addr_resolve_pref_apply
void addr_resolve_pref_apply(void)
Apply name resolution preferences.
Definition addr_resolv.c:3784
host_name_lookup_process
WS_DLL_PUBLIC bool host_name_lookup_process(void)
Process outstanding asynchronous host name lookups via c-ares.
Definition addr_resolv.c:3805
get_ipv4_hash_table
WS_DLL_PUBLIC wmem_map_t * get_ipv4_hash_table(void)
Retrieves the IPv4 address hashtable.
Definition addr_resolv.c:4599
fill_unresolved_ss7pc
WS_DLL_PUBLIC void fill_unresolved_ss7pc(const char *pc_addr, const uint8_t ni, const uint32_t pc)
Initializes unresolved SS7 Point Code entries in the hashtable.
Definition addr_resolv.c:3492
get_vlan_name
WS_DLL_PUBLIC char * get_vlan_name(wmem_allocator_t *allocator, const uint16_t id)
Resolves a VLAN ID to a name.
Definition addr_resolv.c:4306
get_hostname
WS_DLL_PUBLIC const char * get_hostname(const unsigned addr)
Resolve an IPv4 address to its host name.
Definition addr_resolv.c:3852
get_ether_name_if_known
WS_DLL_PUBLIC const char * get_ether_name_if_known(const uint8_t *addr)
Resolves an Ethernet address only if an exact match is known.
Definition addr_resolv.c:4246
eui64_to_display
WS_DLL_PUBLIC char * eui64_to_display(wmem_allocator_t *allocator, const uint64_t addr)
Converts a uint64_t EUI-64 address to a display string.
Definition addr_resolv.c:4408
tcp_port_to_display
WS_DLL_PUBLIC char * tcp_port_to_display(wmem_allocator_t *allocator, unsigned port)
Resolve a TCP port number to its display name.
Definition addr_resolv.c:4173
enterprises_base_custom
WS_DLL_PUBLIC void enterprises_base_custom(char *buf, uint32_t value)
Format a private enterprise code as "name (decimal)" into a buffer.
Definition addr_resolv.c:1165
get_hash_wka_used
WS_DLL_PUBLIC bool get_hash_wka_used(hashwka_t *wka)
Checks if a WKA hash entry was used.
Definition addr_resolv.c:2031
get_manuf_name_if_known
WS_DLL_PUBLIC const char * get_manuf_name_if_known(const uint8_t *addr, size_t size)
Resolves an OUI to a full vendor name if known.
Definition addr_resolv.c:4341
get_hash_wka_resolved_name
WS_DLL_PUBLIC char * get_hash_wka_resolved_name(hashwka_t *wka)
Gets the resolved name for a WKA hash entry.
Definition addr_resolv.c:2036
get_wka_hashtable
WS_DLL_PUBLIC wmem_map_t * get_wka_hashtable(void)
Retrieves the well-known address (WKA) hashtable.
Definition addr_resolv.c:4569
get_hash_ether_used
WS_DLL_PUBLIC bool get_hash_ether_used(hashether_t *ether)
Checks if an Ethernet hash entry was used.
Definition addr_resolv.c:2016
tvb_get_ether_name
WS_DLL_PUBLIC const char * tvb_get_ether_name(tvbuff_t *tvb, unsigned offset)
Resolves an Ethernet address from a tvbuff.
Definition addr_resolv.c:4237
try_enterprises_lookup
WS_DLL_PUBLIC const char * try_enterprises_lookup(uint32_t value)
Attempt to resolve a private enterprise code to its registered name.
Definition addr_resolv.c:1141
get_manuf_hashtable
WS_DLL_PUBLIC wmem_map_t * get_manuf_hashtable(void)
Retrieves the manufacturer hashtable.
Definition addr_resolv.c:4563
get_manuf_name
const char * get_manuf_name(const uint8_t *addr, size_t size)
Resolves a 3-octet OUI to a short vendor name.
Definition addr_resolv.c:4318
serv_name_lookup
WS_DLL_PUBLIC const char * serv_name_lookup(port_type proto, unsigned port)
Resolve a port number to its well-known service name.
Definition addr_resolv.c:1008
get_ipv6_hash_table
WS_DLL_PUBLIC wmem_map_t * get_ipv6_hash_table(void)
Retrieves the IPv6 address hashtable.
Definition addr_resolv.c:4605
get_host_ipaddr6
WS_DLL_PUBLIC bool get_host_ipaddr6(const char *host, ws_in6_addr *addrp)
Resolves a hostname or IPv6 string to a numeric IPv6 address.
Definition addr_resolv.c:4504
add_ether_byip
WS_DLL_PUBLIC void add_ether_byip(const unsigned ip, const uint8_t *eth)
Associates an Ethernet (MAC) address / name to an IPv4 address.
Definition addr_resolv.c:4270
get_eui64_name
const char * get_eui64_name(const uint8_t *addr)
Resolves an EUI-64 address to a logical name or vendor string.
Definition addr_resolv.c:4396
ipv6_oat_hash
WS_DLL_LOCAL unsigned ipv6_oat_hash(const void *key)
Computes a hash value for an IPv6 address using OAT hashing.
Definition addr_resolv.c:291
new_ipv4
WS_DLL_PUBLIC hashipv4_t * new_ipv4(const unsigned addr)
Construct a new IPv4 object from a 32-bit address.
Definition addr_resolv.c:1357
udp_port_to_display
WS_DLL_PUBLIC char * udp_port_to_display(wmem_allocator_t *allocator, unsigned port)
Resolve a UDP port number to its display name.
Definition addr_resolv.c:4149
get_serv_port_hashtable
WS_DLL_PUBLIC wmem_map_t * get_serv_port_hashtable(void)
Retrieves the service port hashtable.
Definition addr_resolv.c:4581
addr_resolv_cleanup
WS_DLL_LOCAL void addr_resolv_cleanup(void)
Cleans up the address resolution subsystem.
Definition addr_resolv.c:4626
add_ipv4_name
WS_DLL_PUBLIC void add_ipv4_name(const unsigned addr, const char *name, const bool static_entry)
Adds a static or dynamic IPv4 name mapping.
Definition addr_resolv.c:3922
resolved_name_t
struct _resolved_name resolved_name_t
Stores a manually edited DNS-resolved hostname for an address.
get_hash_ether_status
WS_DLL_PUBLIC unsigned get_hash_ether_status(hashether_t *ether)
Gets the status code for a resolved Ethernet entry.
Definition addr_resolv.c:2011
str_to_eth
WS_DLL_LOCAL bool str_to_eth(const char *str, uint8_t(*eth_bytes)[6])
Parses a string as an Ethernet (MAC) address.
Definition addr_resolv.c:4658
get_hash_manuf_used
WS_DLL_PUBLIC bool get_hash_manuf_used(hashmanuf_t *manuf)
Checks if a manufacturer hash entry was used.
Definition addr_resolv.c:4385
try_serv_name_lookup
WS_DLL_PUBLIC const char * try_serv_name_lookup(port_type proto, unsigned port)
Attempt to resolve a port number to its well-known service name.
Definition addr_resolv.c:1002
str_to_ip6
WS_DLL_PUBLIC bool str_to_ip6(const char *str, void *dst)
Parses a string as an IPv6 address.
Definition addr_resolv.c:4647
get_ipxnet_hash_table
WS_DLL_PUBLIC wmem_map_t * get_ipxnet_hash_table(void)
Retrieves the IPX network hashtable.
Definition addr_resolv.c:4587
add_ip_name_from_string
WS_DLL_PUBLIC bool add_ip_name_from_string(const char *addr, const char *name)
Adds a hostname mapping for a given IP address string.
Definition addr_resolv.c:2980
get_hash_ether_resolved_name
WS_DLL_PUBLIC char * get_hash_ether_resolved_name(hashether_t *ether)
Gets the resolved name for an Ethernet hash entry.
Definition addr_resolv.c:2026
str_to_ip
WS_DLL_PUBLIC bool str_to_ip(const char *str, void *dst)
Parses a string as an IPv4 address.
Definition addr_resolv.c:4641
tac_name_lookup
WS_DLL_PUBLIC const char * tac_name_lookup(const unsigned addr)
Resolve an TAC to its area name.
Definition addr_resolv.c:3665
get_host_ipaddr
WS_DLL_PUBLIC bool get_host_ipaddr(const char *host, uint32_t *addrp)
Resolves a hostname or IPv4 string to a numeric IPv4 address.
Definition addr_resolv.c:4439
tvb_get_manuf_name
WS_DLL_PUBLIC const char * tvb_get_manuf_name(tvbuff_t *tvb, unsigned offset)
Resolves a 3-octet OUI from a tvbuff to a short vendor name.
Definition addr_resolv.c:4333
add_ipv6_name
WS_DLL_PUBLIC void add_ipv6_name(const ws_in6_addr *addr, const char *name, const bool static_entry)
Adds a Hostname/IPv4 in the hash table.
Definition addr_resolv.c:3950
tvb_get_manuf_name_if_known
WS_DLL_PUBLIC const char * tvb_get_manuf_name_if_known(tvbuff_t *tvb, unsigned offset)
Resolves a 3-octet OUI from a tvbuff to a full vendor name.
Definition addr_resolv.c:4378
name_resolver_init
WS_DLL_LOCAL void name_resolver_init(void)
Initializes the name resolution subsystem.
enterprises_lookup
WS_DLL_PUBLIC const char * enterprises_lookup(uint32_t value, const char *unknown_str)
Resolve a private enterprise code to its registered name.
Definition addr_resolv.c:1152
get_hash_ether_hexaddr
WS_DLL_PUBLIC char * get_hash_ether_hexaddr(hashether_t *ether)
Gets the hex string representation of an Ethernet address.
Definition addr_resolv.c:2021
get_addrinfo_list
WS_DLL_PUBLIC addrinfo_lists_t * get_addrinfo_list(void)
Retrieves known host-to-address mappings.
Definition addr_resolv.c:3080
sctp_port_to_display
WS_DLL_PUBLIC char * sctp_port_to_display(wmem_allocator_t *allocator, unsigned port)
Resolve an SCTP port number to its display name.
Definition addr_resolv.c:4185
fill_dummy_ip4
WS_DLL_PUBLIC bool fill_dummy_ip4(const unsigned addr, hashipv4_t *volatile tp)
Populate a dummy IPv4 object with the specified address.
Definition addr_resolv.c:1190
get_edited_resolved_name
WS_DLL_PUBLIC resolved_name_t * get_edited_resolved_name(const char *addr)
Retrieves the user-defined name for a given address.
Definition addr_resolv.c:3035
addr_resolv_init
WS_DLL_LOCAL void addr_resolv_init(const char *app_env_var_prefix)
Initializes the address resolution subsystem.
Definition addr_resolv.c:4611
serv_port_key_t
struct _serv_port_key serv_port_key_t
Composite key used to look up a service name by port number and transport protocol type.
get_hostname_wmem
WS_DLL_PUBLIC char * get_hostname_wmem(wmem_allocator_t *allocator, const unsigned addr)
Resolve an IPv4 address to its host name using scoped memory allocation.
Definition addr_resolv.c:3879
ipv6_equal
WS_DLL_LOCAL gboolean ipv6_equal(const void *v1, const void *v2)
Compares two IPv6 addresses for equality.
Definition addr_resolv.c:322
dccp_port_to_display
WS_DLL_PUBLIC char * dccp_port_to_display(wmem_allocator_t *allocator, unsigned port)
Resolve a DCCP port number to its display name.
Definition addr_resolv.c:4161
get_ether_name
WS_DLL_PUBLIC const char * get_ether_name(const uint8_t *addr)
Resolves an Ethernet address to a logical name or vendor string.
Definition addr_resolv.c:4225
get_vlan_hash_table
WS_DLL_PUBLIC wmem_map_t * get_vlan_hash_table(void)
Retrieves the VLAN ID hashtable.
Definition addr_resolv.c:4593
uint_get_manuf_name_if_known
WS_DLL_PUBLIC const char * uint_get_manuf_name_if_known(const uint32_t oid)
Resolves a 24-bit OUI integer to a vendor name.
Definition addr_resolv.c:4367
add_hosts_file
WS_DLL_PUBLIC bool add_hosts_file(const char *hosts_file)
Adds an additional "hosts" file for IPv4 and IPv6 name resolution.
Definition addr_resolv.c:2956
get_hostname6
WS_DLL_PUBLIC const char * get_hostname6(const ws_in6_addr *ad)
Resolves an IPv6 address to a hostname or numeric string.
Definition addr_resolv.c:3893
get_hostname6_wmem
WS_DLL_PUBLIC char * get_hostname6_wmem(wmem_allocator_t *allocator, const ws_in6_addr *ad)
Resolves an IPv6 address to a hostname using a memory allocator.
Definition addr_resolv.c:3909
e_addr_resolve
struct _e_addr_resolve e_addr_resolve
Flags to control name resolution.
get_hostname_ss7pc
WS_DLL_PUBLIC const char * get_hostname_ss7pc(const uint8_t ni, const uint32_t pc)
Resolves an SS7 Point Code to a hostname.
Definition addr_resolv.c:3500
disable_name_resolution
WS_DLL_PUBLIC void disable_name_resolution(void)
Disable all forms of name resolution.
Definition addr_resolv.c:3791
addr_resolve_pref_init
void addr_resolve_pref_init(struct pref_module *nameres)
Disable all forms of name resolution.
Definition addr_resolv.c:3676
get_ipxnet_name
WS_DLL_PUBLIC char * get_ipxnet_name(wmem_allocator_t *allocator, const uint32_t addr)
Resolves an IPX network number to a name.
Definition addr_resolv.c:4294
port_with_resolution_to_str_buf
WS_DLL_PUBLIC int port_with_resolution_to_str_buf(char *buf, unsigned long buf_size, port_type proto, unsigned port)
Format a port number with its resolved service name into a buffer.
Definition addr_resolv.c:4211
host_name_lookup_reset
WS_DLL_LOCAL void host_name_lookup_reset(const char *app_env_var_prefix)
Reinitialize hostname resolution subsystem.
Definition addr_resolv.c:4142
port_with_resolution_to_str
WS_DLL_PUBLIC char * port_with_resolution_to_str(wmem_allocator_t *scope, port_type proto, unsigned port)
Format a port number with its resolved service name.
Definition addr_resolv.c:4197
set_resolution_synchrony
WS_DLL_PUBLIC void set_resolution_synchrony(bool synchronous)
Sets the resolution mode to synchronous or asynchronous.
Definition addr_resolv.c:713
get_hash_manuf_resolved_name
WS_DLL_PUBLIC char * get_hash_manuf_resolved_name(hashmanuf_t *manuf)
Gets the resolved name for a manufacturer hash entry.
Definition addr_resolv.c:4390
get_eth_hashtable
WS_DLL_PUBLIC wmem_map_t * get_eth_hashtable(void)
Retrieves the Ethernet address hashtable.
Definition addr_resolv.c:4575
address.h
port_type
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
to_str.h
wmem_map_t
struct _wmem_map_t wmem_map_t
Opaque type representing a wmem-managed hash map.
Definition wmem_map.h:46
wmem_allocator_t
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44
ws_in6_addr
struct e_in6_addr ws_in6_addr
Represents a 128-bit IPv6 address.
inet_cidr.h
_e_addr_resolve
Flags to control name resolution.
Definition addr_resolv.h:49
_e_addr_resolve::dns_pkt_addr_resolution
bool dns_pkt_addr_resolution
Definition addr_resolv.h:53
_e_addr_resolve::maxmind_geoip
bool maxmind_geoip
Definition addr_resolv.h:58
_e_addr_resolve::ss7pc_name
bool ss7pc_name
Definition addr_resolv.h:57
_e_addr_resolve::tac_name
bool tac_name
Definition addr_resolv.h:59
_e_addr_resolve::use_external_net_name_resolver
bool use_external_net_name_resolver
Definition addr_resolv.h:55
_e_addr_resolve::handshake_sni_addr_resolution
bool handshake_sni_addr_resolution
Definition addr_resolv.h:54
_e_addr_resolve::transport_name
bool transport_name
Definition addr_resolv.h:52
_e_addr_resolve::mac_name
bool mac_name
Definition addr_resolv.h:50
_e_addr_resolve::network_name
bool network_name
Definition addr_resolv.h:51
_e_addr_resolve::vlan_name
bool vlan_name
Definition addr_resolv.h:56
_resolved_name
Stores a manually edited DNS-resolved hostname for an address.
Definition addr_resolv.h:91
_resolved_name::name
char name[256]
Definition addr_resolv.h:92
_serv_port_key
Composite key used to look up a service name by port number and transport protocol type.
Definition addr_resolv.h:83
_serv_port_key::type
port_type type
Definition addr_resolv.h:85
_serv_port_key::port
uint16_t port
Definition addr_resolv.h:84
hashether
Definition addr_resolv.c:184
hasheui64
Definition addr_resolv.c:191
hashmanuf
Definition addr_resolv.c:203
hashwka
Definition addr_resolv.c:198
pref_module
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27
tvbuff.h
wtap.h
hashipv4_t
struct hashipv4 hashipv4_t
Hash table entry for a resolved or unresolved IPv4 address.
addrinfo_lists_t
struct addrinfo_lists addrinfo_lists_t
Aggregates lists of resolved IPv4 and IPv6 addresses for writing into a pcapng Name Resolution Block ...