aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2018-10-10 17:25:52 +0200
committerAnders Broman <a.broman58@gmail.com>2018-10-15 05:15:57 +0000
commit23b71ed266a327413406722da59d99cfee8de6b5 (patch)
treeb14bfcffb535212ee3a1f3882c14ede98090113c /epan/addr_resolv.h
parentc6dc4095b7aba75113e24868f174c3d4962075ca (diff)
addr_resolv: function to convert an eth address into raw bytes
Add a function to convert a string that contains an ethernet address (including the colons) into a sequence of 6 bytes. Use the existing internal functions to parse an ethernet address. Declare the new function as local to libwireshark. It'll be used by wslua to support ethernet addresses. While at it, fix an incorrect comment about parse_ether_address(). If accept_mask is false, only a complete 6-byte ethernet address is accepted. Change-Id: Ib03306c44866fe97d3cbff2634411b7f5ec31a79 Reviewed-on: https://code.wireshark.org/review/30162 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index b9879d5f2f..5d78df12a6 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -384,6 +384,9 @@ WS_DLL_PUBLIC
gboolean str_to_ip6(const char *str, void *dst);
WS_DLL_LOCAL
+gboolean str_to_eth(const char *str, char *eth_bytes);
+
+WS_DLL_LOCAL
guint ipv6_oat_hash(gconstpointer key);
WS_DLL_LOCAL