aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rx.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-14 19:11:26 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-14 19:11:26 +0000
commit0e6d9e95f8950a2896327aea48b863489b72e314 (patch)
tree38b32885db59b1eba0a389c2d80427bcf6d37bc9 /packet-rx.c
parent62207b4d85b9d97c3940e4cb02319e5bad0bd167 (diff)
Don't assume that the RX header is neatly aligned on a 4-byte boundary
in our address space. svn path=/trunk/; revision=1477
Diffstat (limited to 'packet-rx.c')
-rw-r--r--packet-rx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/packet-rx.c b/packet-rx.c
index 5ea82d96b7..680c2a591f 100644
--- a/packet-rx.c
+++ b/packet-rx.c
@@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.6 2000/01/07 22:05:36 guy Exp $
+ * $Id: packet-rx.c,v 1.7 2000/01/14 19:11:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -115,15 +115,15 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
rx_tree = proto_item_add_subtree(ti, ett_rx);
proto_tree_add_item(rx_tree, hf_rx_epoch,
- offset, 4, ntohl(rxh->epoch));
+ offset, 4, pntohl(&rxh->epoch));
proto_tree_add_item(rx_tree, hf_rx_cid,
- offset+4, 4, ntohl(rxh->cid));
+ offset+4, 4, pntohl(&rxh->cid));
proto_tree_add_item(rx_tree, hf_rx_callnumber,
- offset+8, 4, ntohl(rxh->callNumber));
+ offset+8, 4, pntohl(&rxh->callNumber));
proto_tree_add_item(rx_tree, hf_rx_seq,
- offset+12, 4, ntohl(rxh->seq));
+ offset+12, 4, pntohl(&rxh->seq));
proto_tree_add_item(rx_tree, hf_rx_serial,
- offset+16, 4, ntohl(rxh->serial));
+ offset+16, 4, pntohl(&rxh->serial));
proto_tree_add_item(rx_tree, hf_rx_type,
offset+20, 1, rxh->type);
@@ -147,9 +147,9 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_item(rx_tree, hf_rx_securityindex,
offset+23, 1, rxh->securityIndex);
proto_tree_add_item(rx_tree, hf_rx_spare,
- offset+24, 2, ntohs(rxh->spare));
+ offset+24, 2, pntohs(&rxh->spare));
proto_tree_add_item(rx_tree, hf_rx_serviceid,
- offset+26, 2, ntohs(rxh->serviceId));
+ offset+26, 2, pntohs(&rxh->serviceId));
}
if (check_col(fd, COL_INFO))
@@ -160,8 +160,8 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"Source Port: %s "
"Destination Port: %s ",
val_to_str(rxh->type, rx_types, "%d"),
- (unsigned long)ntohl(rxh->seq),
- (unsigned long)ntohl(rxh->callNumber),
+ (unsigned long)pntohl(&rxh->seq),
+ (unsigned long)pntohl(&rxh->callNumber),
get_udp_port(pi.srcport),
get_udp_port(pi.destport)
);