forked from osmocom/wireshark
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. svn path=/trunk/; revision=1339
This commit is contained in:
parent
9658c33db6
commit
233f6e5846
12
packet-ncp.c
12
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue