aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ncp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-12-15 04:20:46 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-12-15 04:20:46 +0000
commit7c7b99b15848c266b1ba7281d1d49cd56c7ea060 (patch)
treeffccdc14ed971bfd302c7ba0ac70330a5763c9dc /packet-ncp.c
parente407b92f64906ea3852c088a4733df53542cea36 (diff)
Small change to header processing from James Coe:
The attached patch changes the NCP over IP header processing to use element = pntohl(&pd[offset]) instead of memcopy since the byte order of every element had to be fixed anyway and the header is small. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1339 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ncp.c')
-rw-r--r--packet-ncp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-ncp.c b/packet-ncp.c
index ed1cff36aa..8ad91e5cb1 100644
--- a/packet-ncp.c
+++ b/packet-ncp.c
@@ -3,7 +3,7 @@
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
- * $Id: packet-ncp.c,v 1.26 1999/12/14 21:57:03 nneul Exp $
+ * $Id: packet-ncp.c,v 1.27 1999/12/15 04:20:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -548,16 +548,16 @@ dissect_ncp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
struct ncp_common_header header;
if ( pi.ptype == PT_TCP || pi.ptype == PT_UDP ) {
- memcpy(&ncpiph, &pd[offset], sizeof(ncpiph));
- ncpiph.signature = ntohl(ncpiph.signature);
- ncpiph.length = ntohl(ncpiph.length);
+ ncpiph.signature = pntohl(&pd[offset]);
+ ncpiph.length = pntohl(&pd[offset + 4]);
offset += 8;
if ( ncpiph.signature == NCPIP_RQST ) {
- memcpy(&ncpiphrq, &pd[offset], sizeof(ncpiphrq));
- ncpiphrq.rplybufsize = ntohl(ncpiphrq.rplybufsize);
+ ncpiphrq.version = pntohl(&pd[offset]);
+ ncpiphrq.rplybufsize = pntohl(&pd[offset + 4]);
offset += 8;
};
};
+
memcpy(&header, &pd[offset], sizeof(header));
header.type = ntohs(header.type);