diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-04-01 22:40:20 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-04-01 22:40:20 +0000 |
commit | cb0fa139f6034e45dc60ad1a0b567dd0233fb409 (patch) | |
tree | 211016af5b1e982492e9ba1052585a4ed8a67c34 /packet-hclnfsd.c | |
parent | 49eec751ab4df023b05edb3b86a51275cd41b0ad (diff) |
Use "proto_tree_add_item()" to add IP addresses; that eliminates a bunch
of work *and* gets rid of the incorrect "convert from network to host
byte order and then byte-swap" code.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5075 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-hclnfsd.c')
-rw-r--r-- | packet-hclnfsd.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/packet-hclnfsd.c b/packet-hclnfsd.c index 979b55690b..db9439cec0 100644 --- a/packet-hclnfsd.c +++ b/packet-hclnfsd.c @@ -2,7 +2,7 @@ * Routines for hclnfsd (Hummingbird NFS Daemon) dissection * Copyright 2001, Mike Frisch <frisch@hummingbird.com> * - * $Id: packet-hclnfsd.c,v 1.10 2002/04/01 22:30:34 guy Exp $ + * $Id: packet-hclnfsd.c,v 1.11 2002/04/01 22:40:20 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -169,7 +169,6 @@ static int dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { guint32 request_type; - guint32 ip; char *ident = NULL; char *username = NULL; char *password = NULL; @@ -179,12 +178,7 @@ dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo, pr proto_item *ident_item = NULL; proto_tree *ident_tree = NULL; - ip = tvb_get_ntohl(tvb, offset); - ip = ((ip & 0x000000ff) << 24) | - ((ip & 0x0000ff00) << 8) | - ((ip & 0x00ff0000) >> 8) | - ((ip & 0xff000000) >> 24); - proto_tree_add_ipv4(tree, hf_hclnfsd_server_ip, tvb, offset, 4, ip); + proto_tree_add_item(tree, hf_hclnfsd_server_ip, tvb, offset, 4, FALSE); offset += 4; request_type = tvb_get_ntohl(tvb, offset); @@ -303,11 +297,7 @@ dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinf static int dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { - guint32 ip; - - ip = tvb_get_ntohl(tvb, offset); - ip=((ip&0x000000ff)<<24)|((ip&0x0000ff00)<<8)|((ip&0x00ff0000)>>8)|((ip&0xff000000)>>24); - proto_tree_add_ipv4(tree, hf_hclnfsd_host_ip, tvb, offset, 4, ip); + proto_tree_add_item(tree, hf_hclnfsd_host_ip, tvb, offset, 4, FALSE); offset += 4; return offset; |