diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-08 20:36:03 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-09 03:49:13 +0000 |
commit | 8ff944d4ab892521c6a32fe40f6a410640a34d34 (patch) | |
tree | cb9bb5956a1073babc778b2f75fd2d83a52608e3 /epan/dissectors/packet-ismp.c | |
parent | 2875cd382fdc0efd5d949f674a0328ecf918b7e9 (diff) |
Add fixed length function for address types.
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c. Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file.
Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4
Reviewed-on: https://code.wireshark.org/review/7038
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ismp.c')
-rw-r--r-- | epan/dissectors/packet-ismp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ismp.c b/epan/dissectors/packet-ismp.c index debb8d869f..69b5f66caf 100644 --- a/epan/dissectors/packet-ismp.c +++ b/epan/dissectors/packet-ismp.c @@ -28,6 +28,7 @@ #include <epan/expert.h> #include <epan/to_str.h> #include <epan/etypes.h> +#include <epan/addr_resolv.h> void proto_register_ismp(void); void proto_reg_handoff_ismp(void); @@ -215,6 +216,24 @@ static const value_string edp_tuple_types[] = { 0,NULL } }; +static gchar* +ipx_addr_to_str(const guint32 net, const guint8 *ad) +{ + gchar *buf; + char *name; + + name = get_ether_name_if_known(ad); + + if (name) { + buf = wmem_strdup_printf(wmem_packet_scope(), "%s.%s", get_ipxnet_name(wmem_packet_scope(), net), name); + } + else { + buf = wmem_strdup_printf(wmem_packet_scope(), "%s.%s", get_ipxnet_name(wmem_packet_scope(), net), + bytestring_to_str(wmem_packet_scope(), ad, 6, '\0')); + } + return buf; +} + /* Function to dissect EDP portion of ISMP message */ static void dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp_tree) |