aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorUli Heilmeier <uh@heilmeier.eu>2016-03-13 23:16:20 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-03-18 05:41:36 +0000
commite1d54cfc3e8223bb4334e5aeed019dab35528e9b (patch)
treeab97ecbc78feb49dcd60f7b0bc053ac1954dfe5f /epan/addr_resolv.h
parenteb6abe3a75f80776865332d4c28977a348b09a52 (diff)
IEEE 802.1Q/VLAN: Resolve ID to a describing name
A vlans file in the personal preference directory add an option to resolve VLAN IDs to a describing name. Format of vlan file is 123\tName of VLAN To enable the resolving the preference nameres.vlan_name must be set to TRUE. Bug: 11209 Change-Id: I3f00b4897aace89c03c57b68b6c4b6c8b7d4685a Reviewed-on: https://code.wireshark.org/review/14471 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index f5ee82901d..876aff2bc9 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -47,6 +47,10 @@ extern "C" {
#define MAXNAMELEN 64 /* max name length (hostname and port name) */
#endif
+#ifndef MAXVLANNAMELEN
+#define MAXVLANNAMELEN 128 /* max vlan name length */
+#endif
+
/**
* @brief Flags to control name resolution.
*/
@@ -58,6 +62,7 @@ typedef struct _e_addr_resolve {
gboolean dns_pkt_addr_resolution; /**< Whether to resolve addresses using captured DNS packets */
gboolean use_external_net_name_resolver; /**< Whether to system's configured DNS server to resolve names */
gboolean load_hosts_file_from_profile_only; /**< Whether to only load the hosts in the current profile, not hosts files */
+ gboolean vlan_name; /**< Whether to resolve VLAN IDs to names */
} e_addr_resolve;
#define ADDR_RESOLV_MACADDR(at) \
@@ -240,6 +245,10 @@ extern gchar *eui64_to_display(wmem_allocator_t *allocator, const guint64 addr);
* or a string formatted with "%X" if not */
extern gchar *get_ipxnet_name(wmem_allocator_t *allocator, const guint32 addr);
+/* get_vlan_name returns the logical name if found in a vlans file,
+ * or the VLAN ID itself as a string if not found*/
+extern gchar *get_vlan_name(wmem_allocator_t *allocator, const guint16 id);
+
WS_DLL_PUBLIC guint get_hash_ether_status(hashether_t* ether);
WS_DLL_PUBLIC char* get_hash_ether_hexaddr(hashether_t* ether);
WS_DLL_PUBLIC char* get_hash_ether_resolved_name(hashether_t* ether);
@@ -339,6 +348,9 @@ WS_DLL_PUBLIC
GHashTable *get_ipxnet_hash_table(void);
WS_DLL_PUBLIC
+GHashTable *get_vlan_hash_table(void);
+
+WS_DLL_PUBLIC
GHashTable *get_ipv4_hash_table(void);
WS_DLL_PUBLIC