diff options
author | Michael Mann <mmann78@netscape.net> | 2016-06-21 20:30:35 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-22 04:58:54 +0000 |
commit | debbf7e9308fa1e38c0f819868f7a0e766001946 (patch) | |
tree | 031c87b1311da8257e4a99426df084c78a22f2bb /epan/proto.c | |
parent | e7b78eb0a60a52e844a64452817649126213f771 (diff) |
Move AT_VINES address type to VINES dissector.
proto.c still has to deal with FT_VINES, but maybe that
can be refactored to the dissector too.
Change-Id: Iee04eed3b75f91cb62bb7b625dd44baeeb9aebb3
Reviewed-on: https://code.wireshark.org/review/16069
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index feaddd7252..de5924ef8d 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -368,6 +368,9 @@ static void save_same_name_hfinfo(gpointer data) same_name_hfinfo = (header_field_info*)data; } +/* Cached value for VINES address type (used for FT_VINES) */ +static int vines_address_type = -1; + /* Points to the first element of an array of bits, indexed by a subtree item type; that array element is TRUE if subtrees of an item of that type are to be expanded. */ @@ -522,6 +525,9 @@ proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_da do. */ register_all_protocols_func(cb, client_data); + /* Now that the VINES dissector has registered it's address + type, grab the value for the field type */ + vines_address_type = address_type_get_by_name("AT_VINES"); #ifdef HAVE_PLUGINS /* Now call the registration routines for all disssector plugins. */ @@ -7148,7 +7154,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) break; case FT_VINES: - addr.type = AT_VINES; + addr.type = vines_address_type; addr.len = VINES_ADDR_LEN; addr.data = (guint8 *)fvalue_get(&fi->value); |