summaryrefslogtreecommitdiff
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-02-11 22:16:01 -0500
committerAnders Broman <a.broman58@gmail.com>2015-02-12 07:36:20 +0000
commit797ea88aefc2f45dba7e77d2dcaebe68ac1a4fac (patch)
tree94c34b167377a7ff494b16ab7a9fad5ebbcf7a79 /epan/addr_resolv.h
parent297ef07b9b2f5b681234d0c31269996413262cbc (diff)
downloadwireshark-797ea88aefc2f45dba7e77d2dcaebe68ac1a4fac.tar.gz
Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table. This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator. Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e Reviewed-on: https://code.wireshark.org/review/7075 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index eda5885bb8..068a741460 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -59,6 +59,9 @@ typedef struct _e_addr_resolve {
struct hashether;
typedef struct hashether hashether_t;
+struct hashmanuf;
+typedef struct hashmanuf hashmanuf_t;
+
typedef struct serv_port {
gchar *udp_name;
gchar *tcp_name;
@@ -177,7 +180,7 @@ gchar *get_ether_name_if_known(const guint8 *addr);
* Given a sequence of 3 octets containing an OID, get_manuf_name()
* returns the vendor name, or "%02x:%02x:%02x" if not known.
*/
-extern gchar *get_manuf_name(wmem_allocator_t *allocator, const guint8 *addr);
+extern const gchar *get_manuf_name(const guint8 *addr);
/*
* Given a sequence of 3 octets containing an OID, get_manuf_name_if_known()
@@ -223,6 +226,9 @@ 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);
+WS_DLL_PUBLIC char* get_hash_manuf_resolved_name(hashmanuf_t* manuf);
+
+
/* returns the ethernet address corresponding to name or NULL if not known */
extern guint8 *get_ether_addr(const gchar *name);