diff options
author | Michael Mann <mmann78@netscape.net> | 2014-12-21 12:38:13 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-12-28 14:09:27 +0000 |
commit | 1d598bbff76f915ec961d301f5eb0eef03d46d0a (patch) | |
tree | 2908958a3f78d53a8f10036e7f8ac01ed1b390d1 /epan/dissectors/packet-lldp.c | |
parent | 9fce4dd4cb47965870d870b77983f8d2c501c810 (diff) |
Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b
Reviewed-on: https://code.wireshark.org/review/6060
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index 6efcf1c5d6..d470aa0de3 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -1104,7 +1104,6 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui guint16 tempShort; guint32 dataLen = 0; const char *strPtr=NULL; - struct e_in6_addr ip6_addr; guint8 addr_family = 0; proto_tree *chassis_tree = NULL; @@ -1188,15 +1187,14 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui break; case AFNUM_INET6: if (dataLen == 18){ - tvb_get_ipv6(tvb, offset, &ip6_addr); - strPtr = ip6_to_str(&ip6_addr); + strPtr = tvb_ip6_to_str(tvb, offset); }else{ expert_add_info_format(pinfo, lf, &ei_lldp_bad_length, "Invalid Chassis ID Length (%u) for Type (%s, %s), expected (18)", dataLen, val_to_str_const(tlvsubType, chassis_id_subtypes, ""), val_to_str_const(addr_family, afn_vals, "")); return -1; } - proto_tree_add_ipv6(chassis_tree, hf_chassis_id_ip6, tvb, offset, 16, ip6_addr.bytes); + proto_tree_add_item(chassis_tree, hf_chassis_id_ip6, tvb, offset, 16, ENC_NA); break; default: @@ -1262,7 +1260,6 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3 guint16 tempShort; guint32 dataLen = 0; const char *strPtr=NULL; - struct e_in6_addr ip6_addr; guint8 addr_family = 0; proto_tree *port_tree = NULL; @@ -1342,15 +1339,14 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3 break; case AFNUM_INET6: if (dataLen == 18){ - tvb_get_ipv6(tvb, offset, &ip6_addr); - strPtr = ip6_to_str(&ip6_addr); + strPtr = tvb_ip6_to_str(tvb, offset); }else{ expert_add_info_format(pinfo, lf, &ei_lldp_bad_length, "Invalid Port ID Length (%u) for Type (%s, %s), expected (18)", dataLen, val_to_str_const(tlvsubType, port_id_subtypes, ""), val_to_str_const(addr_family, afn_vals, "")); return -1; } - proto_tree_add_ipv6(port_tree, hf_port_id_ip6, tvb, offset, 16, ip6_addr.bytes); + proto_tree_add_item(port_tree, hf_port_id_ip6, tvb, offset, 16, ENC_NA); break; default: |