28 #include "ws_symbol_export.h"
38 #ifndef MAXVLANNAMELEN
39 #define MAXVLANNAMELEN 128
42 #define BASE_ENTERPRISES BASE_CUSTOM
43 #define STRINGS_ENTERPRISES CF_FUNC(enterprises_base_custom)
59 #define ADDR_RESOLV_MACADDR(at) \
60 (((at)->type == AT_ETHER))
62 #define ADDR_RESOLV_NETADDR(at) \
63 (((at)->type == AT_IPv4) || ((at)->type == AT_IPv6) || ((at)->type == AT_IPX))
77 const char *sctp_name;
78 const char *dccp_name;
83 char name[MAXNAMELEN];
89 #define TRIED_RESOLVE_ADDRESS (1U<<0)
90 #define NAME_RESOLVED (1U<<1)
91 #define RESOLVED_ADDRESS_USED (1U<<2)
92 #define STATIC_HOSTNAME (1U<<3)
93 #define NAME_RESOLVED_PREFIX (1U<<4)
95 #define TRIED_OR_RESOLVED_MASK (TRIED_RESOLVE_ADDRESS | NAME_RESOLVED)
96 #define USED_AND_RESOLVED_MASK (NAME_RESOLVED | RESOLVED_ADDRESS_USED)
105 extern gchar *g_ethers_path;
106 extern gchar *g_ipxnets_path;
107 extern gchar *g_pethers_path;
108 extern gchar *g_pipxnets_path;
116 WS_DLL_PUBLIC gchar *udp_port_to_display(
wmem_allocator_t *allocator, guint port);
122 WS_DLL_PUBLIC gchar *tcp_port_to_display(
wmem_allocator_t *allocator, guint port);
128 extern gchar *dccp_port_to_display(
wmem_allocator_t *allocator, guint port);
134 WS_DLL_PUBLIC gchar *sctp_port_to_display(
wmem_allocator_t *allocator, guint port);
140 WS_DLL_PUBLIC
const gchar *serv_name_lookup(port_type proto, guint port);
146 WS_DLL_PUBLIC
const gchar *enterprises_lookup(guint32 value,
const char *unknown_str);
151 WS_DLL_PUBLIC
const gchar *try_enterprises_lookup(guint32 value);
157 WS_DLL_PUBLIC
void enterprises_base_custom(
char *buf, guint32 value);
163 WS_DLL_PUBLIC
const gchar *try_serv_name_lookup(port_type proto, guint port);
170 port_type proto, guint port);
176 WS_DLL_PUBLIC
int port_with_resolution_to_str_buf(gchar *buf, gulong buf_size,
177 port_type proto, guint port);
185 extern void addr_resolve_pref_init(
struct pref_module *nameres);
186 extern void addr_resolve_pref_apply(
void);
191 WS_DLL_PUBLIC
void disable_name_resolution(
void);
203 WS_DLL_PUBLIC
const gchar *get_hostname(
const guint addr);
206 WS_DLL_PUBLIC
const gchar *get_hostname6(
const ws_in6_addr *ad);
211 WS_DLL_PUBLIC
const gchar *get_ether_name(
const guint8 *addr);
215 const gchar *get_hostname_ss7pc(
const guint8 ni,
const guint32 pc);
218 void fill_unresolved_ss7pc(
const gchar * pc_addr,
const guint8 ni,
const guint32 pc);
222 WS_DLL_PUBLIC
const gchar *tvb_get_ether_name(
tvbuff_t *tvb, gint offset);
229 const gchar *get_ether_name_if_known(
const guint8 *addr);
241 extern const gchar *get_manuf_name(
const guint8 *addr,
size_t size);
253 WS_DLL_PUBLIC
const gchar *get_manuf_name_if_known(
const guint8 *addr,
size_t size);
261 extern const gchar *uint_get_manuf_name_if_known(
const guint32 oid);
272 WS_DLL_PUBLIC
const gchar *tvb_get_manuf_name(
tvbuff_t *tvb, gint offset);
281 WS_DLL_PUBLIC
const gchar *tvb_get_manuf_name_if_known(
tvbuff_t *tvb, gint offset);
287 extern gchar *eui64_to_display(
wmem_allocator_t *allocator,
const guint64 addr);
291 extern gchar *get_ipxnet_name(
wmem_allocator_t *allocator,
const guint32 addr);
297 WS_DLL_PUBLIC guint get_hash_ether_status(
hashether_t* ether);
298 WS_DLL_PUBLIC
bool get_hash_ether_used(
hashether_t* ether);
299 WS_DLL_PUBLIC
char* get_hash_ether_hexaddr(
hashether_t* ether);
300 WS_DLL_PUBLIC
char* get_hash_ether_resolved_name(
hashether_t* ether);
302 WS_DLL_PUBLIC
bool get_hash_manuf_used(
hashmanuf_t* manuf);
303 WS_DLL_PUBLIC
char* get_hash_manuf_resolved_name(
hashmanuf_t* manuf);
305 WS_DLL_PUBLIC
bool get_hash_wka_used(
hashwka_t* wka);
306 WS_DLL_PUBLIC
char* get_hash_wka_resolved_name(
hashwka_t* wka);
309 WS_DLL_PUBLIC
void add_ipv4_name(
const guint addr,
const gchar *
name,
const bool static_entry);
312 WS_DLL_PUBLIC
void add_ipv6_name(
const ws_in6_addr *addr,
const gchar *
name,
const bool static_entry);
326 WS_DLL_PUBLIC gboolean add_ip_name_from_string (
const char *addr,
const char *
name);
329 WS_DLL_PUBLIC
resolved_name_t* get_edited_resolved_name(
const char* addr);
341 extern void add_ether_byip(
const guint ip,
const guint8 *eth);
401 void set_resolution_synchrony(gboolean synchronous);
408 void name_resolver_init(
void);
412 void host_name_lookup_reset(
void);
415 void addr_resolv_init(
void);
418 void addr_resolv_cleanup(
void);
421 gboolean str_to_ip(
const char *str,
void *dst);
424 gboolean str_to_ip6(
const char *str,
void *dst);
427 gboolean str_to_eth(
const char *str,
char *eth_bytes);
430 guint ipv6_oat_hash(gconstpointer key);
433 gboolean ipv6_equal(gconstpointer v1, gconstpointer v2);
WS_DLL_PUBLIC gboolean get_host_ipaddr(const char *host, guint32 *addrp)
Definition: addr_resolv.c:3876
WS_DLL_PUBLIC gboolean host_name_lookup_process(void)
Definition: addr_resolv.c:3283
WS_DLL_PUBLIC gboolean add_hosts_file(const char *hosts_file)
Definition: addr_resolv.c:2684
WS_DLL_PUBLIC gboolean get_host_ipaddr6(const char *host, ws_in6_addr *addrp)
Definition: addr_resolv.c:3941
WS_DLL_PUBLIC addrinfo_lists_t * get_addrinfo_list(void)
Definition: addr_resolv.c:2811
struct _e_addr_resolve e_addr_resolve
Flags to control name resolution.
Flags to control name resolution.
Definition: addr_resolv.h:48
bool dns_pkt_addr_resolution
Definition: addr_resolv.h:52
bool maxmind_geoip
Definition: addr_resolv.h:56
bool ss7pc_name
Definition: addr_resolv.h:55
bool use_external_net_name_resolver
Definition: addr_resolv.h:53
bool transport_name
Definition: addr_resolv.h:51
bool mac_name
Definition: addr_resolv.h:49
bool network_name
Definition: addr_resolv.h:50
bool vlan_name
Definition: addr_resolv.h:54
Definition: addr_resolv.h:82
Definition: wmem_allocator.h:27
Definition: wmem_map.c:44
Definition: inet_addr.h:21
Definition: addr_resolv.c:162
Definition: addr_resolv.c:174
Definition: addr_resolv.c:169
Definition: prefs-int.h:27
const char * name
Definition: prefs-int.h:28
Definition: addr_resolv.h:74
Definition: tvbuff-int.h:35