23 #include <epan/address.h> 24 #include <epan/tvbuff.h> 25 #include <epan/ipv6.h> 26 #include <epan/to_str.h> 27 #include <wiretap/wtap.h> 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)) 82 #define TRIED_RESOLVE_ADDRESS (1U<<0) 83 #define NAME_RESOLVED (1U<<1) 84 #define RESOLVED_ADDRESS_USED (1U<<2) 86 #define TRIED_OR_RESOLVED_MASK (TRIED_RESOLVE_ADDRESS | NAME_RESOLVED) 87 #define USED_AND_RESOLVED_MASK (NAME_RESOLVED | RESOLVED_ADDRESS_USED) 96 extern gchar *g_ethers_path;
97 extern gchar *g_ipxnets_path;
98 extern gchar *g_pethers_path;
99 extern gchar *g_pipxnets_path;
107 WS_DLL_PUBLIC gchar *udp_port_to_display(
wmem_allocator_t *allocator, guint port);
113 WS_DLL_PUBLIC gchar *tcp_port_to_display(
wmem_allocator_t *allocator, guint port);
119 extern gchar *dccp_port_to_display(
wmem_allocator_t *allocator, guint port);
125 WS_DLL_PUBLIC gchar *sctp_port_to_display(
wmem_allocator_t *allocator, guint port);
131 WS_DLL_PUBLIC
const gchar *serv_name_lookup(port_type proto, guint port);
137 WS_DLL_PUBLIC
const gchar *enterprises_lookup(guint32 value,
const char *unknown_str);
142 WS_DLL_PUBLIC
const gchar *try_enterprises_lookup(guint32 value);
148 WS_DLL_PUBLIC
void enterprises_base_custom(
char *buf, guint32 value);
154 WS_DLL_PUBLIC
const gchar *try_serv_name_lookup(port_type proto, guint port);
161 port_type proto, guint port);
167 WS_DLL_PUBLIC
int port_with_resolution_to_str_buf(gchar *buf, gulong buf_size,
168 port_type proto, guint port);
176 extern void addr_resolve_pref_init(
struct pref_module *nameres);
181 WS_DLL_PUBLIC
void disable_name_resolution(
void);
190 WS_DLL_PUBLIC gboolean host_name_lookup_process(
void);
193 WS_DLL_PUBLIC
const gchar *get_hostname(
const guint addr);
196 WS_DLL_PUBLIC
const gchar *get_hostname6(
const ws_in6_addr *ad);
201 WS_DLL_PUBLIC
const gchar *get_ether_name(
const guint8 *addr);
205 const gchar *get_hostname_ss7pc(
const guint8 ni,
const guint32 pc);
208 void fill_unresolved_ss7pc(
const gchar * pc_addr,
const guint8 ni,
const guint32 pc);
212 WS_DLL_PUBLIC
const gchar *tvb_get_ether_name(
tvbuff_t *tvb, gint offset);
215 const gchar *get_ether_name_if_known(
const guint8 *addr);
221 extern const gchar *get_manuf_name(
const guint8 *addr);
227 WS_DLL_PUBLIC
const gchar *get_manuf_name_if_known(
const guint8 *addr);
233 extern const gchar *uint_get_manuf_name_if_known(
const guint oid);
240 WS_DLL_PUBLIC
const gchar *tvb_get_manuf_name(
tvbuff_t *tvb, gint offset);
247 WS_DLL_PUBLIC
const gchar *tvb_get_manuf_name_if_known(
tvbuff_t *tvb, gint offset);
251 extern gchar *eui64_to_display(
wmem_allocator_t *allocator,
const guint64 addr);
255 extern gchar *get_ipxnet_name(
wmem_allocator_t *allocator,
const guint32 addr);
261 WS_DLL_PUBLIC guint get_hash_ether_status(
hashether_t* ether);
262 WS_DLL_PUBLIC
char* get_hash_ether_hexaddr(
hashether_t* ether);
263 WS_DLL_PUBLIC
char* get_hash_ether_resolved_name(
hashether_t* ether);
265 WS_DLL_PUBLIC
char* get_hash_manuf_resolved_name(
hashmanuf_t* manuf);
269 WS_DLL_PUBLIC
void add_ipv4_name(
const guint addr,
const gchar *
name);
272 WS_DLL_PUBLIC
void add_ipv6_name(
const ws_in6_addr *addr,
const gchar *name);
283 WS_DLL_PUBLIC gboolean add_hosts_file (
const char *hosts_file);
286 WS_DLL_PUBLIC gboolean add_ip_name_from_string (
const char *addr,
const char *name);
298 extern void add_ether_byip(
const guint ip,
const guint8 *eth);
312 gboolean get_host_ipaddr(
const char *host, guint32 *addrp);
326 gboolean get_host_ipaddr6(
const char *host,
ws_in6_addr *addrp);
357 void name_resolver_init(
void);
361 void host_name_lookup_init(
void);
367 void host_name_lookup_cleanup(
void);
370 void addr_resolv_init(
void);
373 void addr_resolv_cleanup(
void);
376 void manually_resolve_cleanup(
void);
379 gboolean str_to_ip(
const char *str,
void *dst);
382 gboolean str_to_ip6(
const char *str,
void *dst);
385 guint ipv6_oat_hash(gconstpointer key);
388 gboolean ipv6_equal(gconstpointer v1, gconstpointer v2);
Definition: inet_ipv6.h:20
gboolean ss7pc_name
Definition: addr_resolv.h:56
Flags to control name resolution.
Definition: addr_resolv.h:48
Definition: wmem_map.c:44
gboolean load_hosts_file_from_profile_only
Definition: addr_resolv.h:54
Definition: prefs-int.h:27
Definition: tvbuff-int.h:35
gboolean transport_name
Definition: addr_resolv.h:51
gboolean dns_pkt_addr_resolution
Definition: addr_resolv.h:52
Definition: addr_resolv.c:164
gboolean mac_name
Definition: addr_resolv.h:49
Definition: wmem_allocator.h:26
gboolean network_name
Definition: addr_resolv.h:50
gboolean vlan_name
Definition: addr_resolv.h:55
Definition: addr_resolv.h:71
gboolean use_external_net_name_resolver
Definition: addr_resolv.h:53
Definition: addr_resolv.c:171
const char * name
Definition: prefs-int.h:28