diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-14 18:01:53 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-22 02:53:48 +0000 |
commit | 8d5da72ff9255a3fd494fb2d842a7ecb9d2c7c14 (patch) | |
tree | 3e48036d26dedf29361132faec1682c9aa6fb24a /epan/dissectors/packet-radius.c | |
parent | ddafa7e381c188f0f282908003518be44130a3b6 (diff) | |
download | wireshark-8d5da72ff9255a3fd494fb2d842a7ecb9d2c7c14.tar.gz |
Add tvb_address_with_resolution_to_str.
Convert dissectors to using the API where appropriate.
Change-Id: I059582f73a75635d4a0338d02d4c4b212162480b
Reviewed-on: https://code.wireshark.org/review/7296
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-radius.c')
-rw-r--r-- | epan/dissectors/packet-radius.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index e29a44b615..2f02fa4a09 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -350,7 +350,7 @@ static const gchar *dissect_framed_ip_address(proto_tree* tree, tvbuff_t* tvb, p guint32 ip_h; const gchar *str; - len = tvb_length(tvb); + len = tvb_reported_length(tvb); if (len != 4) return "[wrong length for IP address]"; @@ -367,9 +367,8 @@ static const gchar *dissect_framed_ip_address(proto_tree* tree, tvbuff_t* tvb, p tvb, 0, len, ip, "%s", str); } else { str = tvb_ip_to_str(tvb, 0); - proto_tree_add_ipv4_format_value(tree, hf_radius_framed_ip_address, - tvb, 0, len, ip, "%s (%s)", - get_hostname(ip), str); + proto_tree_add_item(tree, hf_radius_framed_ip_address, + tvb, 0, len, ENC_BIG_ENDIAN); } return str; @@ -381,7 +380,7 @@ static const gchar *dissect_login_ip_host(proto_tree* tree, tvbuff_t* tvb, packe guint32 ip_h; const gchar *str; - len = tvb_length(tvb); + len = tvb_reported_length(tvb); if (len != 4) return "[wrong length for IP address]"; @@ -398,9 +397,8 @@ static const gchar *dissect_login_ip_host(proto_tree* tree, tvbuff_t* tvb, packe tvb, 0, len, ip, "%s", str); } else { str = tvb_ip_to_str(tvb, 0); - proto_tree_add_ipv4_format_value(tree, hf_radius_login_ip_host, - tvb, 0, len, ip, "%s (%s)", - get_hostname(ip), str); + proto_tree_add_item(tree, hf_radius_login_ip_host, + tvb, 0, len, ENC_BIG_ENDIAN); } return str; |