diff options
author | Michael Mann <mmann78@netscape.net> | 2016-06-21 20:06:01 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-22 04:57:43 +0000 |
commit | e7b78eb0a60a52e844a64452817649126213f771 (patch) | |
tree | 4cf3b86582a0cbd2632b79b6ce6932fd47a32ef5 /epan/address_types.c | |
parent | 3ed06ec32b64821b311f47c95862f3486f78aa53 (diff) | |
download | wireshark-e7b78eb0a60a52e844a64452817649126213f771.tar.gz |
Move AT_USB to inside USB dissector.
This required some hacking in the conversation table handling, but
still seemed worth it as USB address is not widely used.
Maybe a "is_stringlike" property for address types...
Change-Id: I628a15c17cb1f595bb292130867adbc5bea0f41a
Reviewed-on: https://code.wireshark.org/review/16068
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/address_types.c')
-rw-r--r-- | epan/address_types.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/epan/address_types.c b/epan/address_types.c index b1f94d8c47..a04af3f923 100644 --- a/epan/address_types.c +++ b/epan/address_types.c @@ -31,8 +31,6 @@ #include "wsutil/str_util.h" #include "wsutil/inet_addr.h" -#include <epan/dissectors/packet-mtp3.h> - struct _address_type_t { int addr_type; /* From address_type enumeration or registered value */ const char *name; @@ -489,30 +487,6 @@ static int ib_str_len(const address* addr _U_) } /****************************************************************************** - * AT_USB - * XXX - This functionality should really be in packet-usb.c as a dissector - * address type, but currently need support of AT_USB in conversation_table.c - ******************************************************************************/ -static int usb_addr_to_str(const address* addr, gchar *buf, int buf_len _U_) -{ - const guint8 *addrp = (const guint8 *)addr->data; - - if(pletoh32(&addrp[0])==0xffffffff){ - g_strlcpy(buf, "host", buf_len); - } else { - g_snprintf(buf, buf_len, "%d.%d.%d", pletoh16(&addrp[8]), - pletoh32(&addrp[0]), pletoh32(&addrp[4])); - } - - return (int)(strlen(buf)+1); -} - -static int usb_addr_str_len(const address* addr _U_) -{ - return 50; -} - -/****************************************************************************** * AT_AX25 ******************************************************************************/ static int ax25_addr_to_str(const address* addr, gchar *buf, int buf_len _U_) @@ -692,18 +666,6 @@ void address_types_initialize(void) NULL, /* addr_name_res_len */ }; - static address_type_t usb_address = { - AT_USB, /* addr_type */ - "AT_USB", /* name */ - "USB Address", /* pretty_name */ - usb_addr_to_str, /* addr_to_str */ - usb_addr_str_len, /* addr_str_len */ - NULL, /* addr_col_filter */ - NULL, /* addr_fixed_len */ - NULL, /* addr_name_res_str */ - NULL, /* addr_name_res_len */ - }; - static address_type_t ax25_address = { AT_AX25, /* addr_type */ "AT_AX25", /* name */ @@ -733,7 +695,6 @@ void address_types_initialize(void) address_type_register(AT_STRINGZ, &stringz_address ); address_type_register(AT_EUI64, &eui64_address ); address_type_register(AT_IB, &ib_address ); - address_type_register(AT_USB, &usb_address ); address_type_register(AT_AX25, &ax25_address ); } |