aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ypserv.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-04-02 01:32:46 +0000
committerGuy Harris <guy@alum.mit.edu>2002-04-02 01:32:46 +0000
commit15fc29c820c8879c604f19181fdfe62104d98a9d (patch)
tree7a674d1fad4045f52aa37fd192ad529198d40956 /packet-ypserv.c
parent49de302c8468bef63e38d6683e836abc6ea9ab5f (diff)
Fix a bunch of bits of code that used "tvb_get_ntohl()" to fetch IP
addresses and then tried to compensate for that error using "htonl()" (or didn't bother compensating, in some cases). svn path=/trunk/; revision=5082
Diffstat (limited to 'packet-ypserv.c')
-rw-r--r--packet-ypserv.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/packet-ypserv.c b/packet-ypserv.c
index 39e3008ce8..76ebe0642c 100644
--- a/packet-ypserv.c
+++ b/packet-ypserv.c
@@ -1,7 +1,7 @@
/* packet-ypserv.c
* Routines for ypserv dissection
*
- * $Id: packet-ypserv.c,v 1.20 2002/02/20 21:02:46 guy Exp $
+ * $Id: packet-ypserv.c,v 1.21 2002/04/02 01:32:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -212,7 +212,6 @@ dissect_xfr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
proto_item *sub_item=NULL;
proto_tree *sub_tree=NULL;
int start_offset = offset;
- guint32 tid;
if(tree){
sub_item = proto_tree_add_item(tree, hf_ypserv_map_parms, tvb,
@@ -229,10 +228,7 @@ dissect_xfr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
offset = dissect_rpc_string(tvb, pinfo, sub_tree, hf_ypserv_peer, offset, NULL);
-
- tid=tvb_get_ntohl(tvb,offset);
- tid=((tid&0x000000ff)<<24)|((tid&0x0000ff00)<<8)|((tid&0x00ff0000)>>8)|((tid&0xff000000)>>24);
- proto_tree_add_ipv4(tree, hf_ypserv_transid, tvb, offset, 4, tid);
+ proto_tree_add_item(tree, hf_ypserv_transid, tvb, offset, 4, FALSE);
offset += 4;
offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_ypserv_prog, offset);
@@ -247,11 +243,7 @@ dissect_xfr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
static int
dissect_xfr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- guint32 tid;
-
- tid=tvb_get_ntohl(tvb,offset);
- tid=((tid&0x000000ff)<<24)|((tid&0x0000ff00)<<8)|((tid&0x00ff0000)>>8)|((tid&0xff000000)>>24);
- proto_tree_add_ipv4(tree, hf_ypserv_transid, tvb, offset, 4, tid);
+ proto_tree_add_item(tree, hf_ypserv_transid, tvb, offset, 4, FALSE);
offset += 4;
offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_ypserv_xfrstat, offset);