28#include "ws_symbol_export.h"
39#define MAXVLANNAMELEN 128
43#define MAXDNSNAMELEN 256
46#define BASE_ENTERPRISES BASE_CUSTOM
47#define STRINGS_ENTERPRISES CF_FUNC(enterprises_base_custom)
64#define ADDR_RESOLV_MACADDR(at) \
65 (((at)->type == AT_ETHER) || ((at)->type == AT_EUI64))
67#define ADDR_RESOLV_NETADDR(at) \
68 (((at)->type == AT_IPv4) || ((at)->type == AT_IPv6) || ((at)->type == AT_IPX))
85 const char *sctp_name;
86 const char *dccp_name;
92 char name[MAXDNSNAMELEN];
98#define TRIED_RESOLVE_ADDRESS (1U<<0)
99#define NAME_RESOLVED (1U<<1)
100#define RESOLVED_ADDRESS_USED (1U<<2)
101#define STATIC_HOSTNAME (1U<<3)
102#define NAME_RESOLVED_PREFIX (1U<<4)
104#define TRIED_OR_RESOLVED_MASK (TRIED_RESOLVE_ADDRESS | NAME_RESOLVED)
105#define USED_AND_RESOLVED_MASK (NAME_RESOLVED | RESOLVED_ADDRESS_USED)
114extern char *g_ethers_path;
115extern char *g_ipxnets_path;
116extern char *g_pethers_path;
117extern char *g_pipxnets_path;
124WS_DLL_PUBLIC
hashipv4_t * new_ipv4(
const unsigned addr);
129WS_DLL_PUBLIC
bool fill_dummy_ip4(
const unsigned addr,
hashipv4_t*
volatile tp);
135WS_DLL_PUBLIC
char *udp_port_to_display(
wmem_allocator_t *allocator,
unsigned port);
141WS_DLL_PUBLIC
char *tcp_port_to_display(
wmem_allocator_t *allocator,
unsigned port);
147extern char *dccp_port_to_display(
wmem_allocator_t *allocator,
unsigned port);
153WS_DLL_PUBLIC
char *sctp_port_to_display(
wmem_allocator_t *allocator,
unsigned port);
159WS_DLL_PUBLIC
const char *serv_name_lookup(port_type proto,
unsigned port);
165WS_DLL_PUBLIC
const char *enterprises_lookup(uint32_t value,
const char *unknown_str);
170WS_DLL_PUBLIC
const char *try_enterprises_lookup(uint32_t value);
176WS_DLL_PUBLIC
void enterprises_base_custom(
char *buf, uint32_t value);
182WS_DLL_PUBLIC
const char *try_serv_name_lookup(port_type proto,
unsigned port);
189 port_type proto,
unsigned port);
195WS_DLL_PUBLIC
int port_with_resolution_to_str_buf(
char *buf,
unsigned long buf_size,
196 port_type proto,
unsigned port);
204extern void addr_resolve_pref_init(
struct pref_module *nameres);
205extern void addr_resolve_pref_apply(
void);
210WS_DLL_PUBLIC
void disable_name_resolution(
void);
229WS_DLL_PUBLIC
const char *get_hostname(
const unsigned addr);
233WS_DLL_PUBLIC
char *get_hostname_wmem(
wmem_allocator_t *allocator,
const unsigned addr);
243WS_DLL_PUBLIC
const char *get_hostname6(
const ws_in6_addr *ad);
252WS_DLL_PUBLIC
const char *get_ether_name(
const uint8_t *addr);
256const char *get_hostname_ss7pc(
const uint8_t ni,
const uint32_t pc);
259void fill_unresolved_ss7pc(
const char * pc_addr,
const uint8_t ni,
const uint32_t pc);
263WS_DLL_PUBLIC
const char *tvb_get_ether_name(
tvbuff_t *tvb,
int offset);
270const char *get_ether_name_if_known(
const uint8_t *addr);
282extern const char *get_manuf_name(
const uint8_t *addr,
size_t size);
294WS_DLL_PUBLIC
const char *get_manuf_name_if_known(
const uint8_t *addr,
size_t size);
302extern const char *uint_get_manuf_name_if_known(
const uint32_t oid);
313WS_DLL_PUBLIC
const char *tvb_get_manuf_name(
tvbuff_t *tvb,
int offset);
322WS_DLL_PUBLIC
const char *tvb_get_manuf_name_if_known(
tvbuff_t *tvb,
int offset);
329extern const char *get_eui64_name(
const uint8_t *addr);
337extern char *eui64_to_display(
wmem_allocator_t *allocator,
const uint64_t addr);
341extern char *get_ipxnet_name(
wmem_allocator_t *allocator,
const uint32_t addr);
347WS_DLL_PUBLIC
unsigned get_hash_ether_status(
hashether_t* ether);
348WS_DLL_PUBLIC
bool get_hash_ether_used(
hashether_t* ether);
349WS_DLL_PUBLIC
char* get_hash_ether_hexaddr(
hashether_t* ether);
350WS_DLL_PUBLIC
char* get_hash_ether_resolved_name(
hashether_t* ether);
352WS_DLL_PUBLIC
bool get_hash_manuf_used(
hashmanuf_t* manuf);
353WS_DLL_PUBLIC
char* get_hash_manuf_resolved_name(
hashmanuf_t* manuf);
355WS_DLL_PUBLIC
bool get_hash_wka_used(
hashwka_t* wka);
356WS_DLL_PUBLIC
char* get_hash_wka_resolved_name(
hashwka_t* wka);
359WS_DLL_PUBLIC
void add_ipv4_name(
const unsigned addr,
const char *
name,
const bool static_entry);
362WS_DLL_PUBLIC
void add_ipv6_name(
const ws_in6_addr *addr,
const char *
name,
const bool static_entry);
376WS_DLL_PUBLIC
bool add_ip_name_from_string (
const char *addr,
const char *
name);
379WS_DLL_PUBLIC
resolved_name_t* get_edited_resolved_name(
const char* addr);
391extern void add_ether_byip(
const unsigned ip,
const uint8_t *eth);
451void set_resolution_synchrony(
bool synchronous);
458void name_resolver_init(
void);
462void host_name_lookup_reset(
void);
465void addr_resolv_init(
void);
468void addr_resolv_cleanup(
void);
471bool str_to_ip(
const char *str,
void *dst);
474bool str_to_ip6(
const char *str,
void *dst);
477bool str_to_eth(
const char *str,
char *eth_bytes);
480unsigned ipv6_oat_hash(
const void *key);
483gboolean ipv6_equal(
const void *v1,
const void *v2);
WS_DLL_PUBLIC bool host_name_lookup_process(void)
Definition addr_resolv.c:3510
WS_DLL_PUBLIC bool get_host_ipaddr6(const char *host, ws_in6_addr *addrp)
Definition addr_resolv.c:4177
WS_DLL_PUBLIC bool get_host_ipaddr(const char *host, uint32_t *addrp)
Definition addr_resolv.c:4112
WS_DLL_PUBLIC addrinfo_lists_t * get_addrinfo_list(void)
Definition addr_resolv.c:3032
WS_DLL_PUBLIC bool add_hosts_file(const char *hosts_file)
Definition addr_resolv.c:2908
struct _e_addr_resolve e_addr_resolve
Flags to control name resolution.
Flags to control name resolution.
Definition addr_resolv.h:52
bool dns_pkt_addr_resolution
Definition addr_resolv.h:56
bool maxmind_geoip
Definition addr_resolv.h:61
bool ss7pc_name
Definition addr_resolv.h:60
bool use_external_net_name_resolver
Definition addr_resolv.h:58
bool handshake_sni_addr_resolution
Definition addr_resolv.h:57
bool transport_name
Definition addr_resolv.h:55
bool mac_name
Definition addr_resolv.h:53
bool network_name
Definition addr_resolv.h:54
bool vlan_name
Definition addr_resolv.h:59
Definition addr_resolv.h:91
Definition wmem_allocator.h:27
Definition inet_addr.h:21
Definition addr_resolv.c:162
Definition addr_resolv.c:169
Definition addr_resolv.c:181
Definition addr_resolv.c:176
Definition prefs-int.h:27
const char * name
Definition prefs-int.h:28
Definition addr_resolv.h:82
Definition tvbuff-int.h:35