aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-10-29 17:49:34 -0700
committerGuy Harris <guy@alum.mit.edu>2017-10-30 00:50:06 +0000
commit734c5b35a5491794dc9cb31ed07a8d0d5576d4f5 (patch)
tree15067601163a7a4fe89ebc9f3f28e7574e3d14e9 /epan/proto.c
parent3630a447d9e73f3e04cfe37dd578d22a452fbbe6 (diff)
Get rid of ipv4_get_net_order_addr() and ipv4_get_host_order_addr().
Just directly use the addr field, converting from host to network byte order if necessary. Change-Id: Ie1cd9ea5527b7824014dc315225ad2a6adb61c38 Reviewed-on: https://code.wireshark.org/review/24176 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c
index ca28e6ed53..68e81afa64 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5945,7 +5945,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
case FT_IPv4:
ipv4 = (ipv4_addr_and_mask *)fvalue_get(&finfo->value);
- n_addr = ipv4_get_net_order_addr(ipv4);
+ n_addr = g_ntohl(ipv4->addr);
set_address (&addr, AT_IPv4, 4, &n_addr);
address_to_str_buf(&addr, result+offset_r, size-offset_r);
offset_r = (int)strlen(result);
@@ -8366,7 +8366,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
case FT_IPv4:
ipv4 = (ipv4_addr_and_mask *)fvalue_get(&fi->value);
- n_addr = ipv4_get_net_order_addr(ipv4);
+ n_addr = g_htonl(ipv4->addr);
addr.type = AT_IPv4;
addr.len = 4;