The capture tools for DGUX has swapped the included/original packet lengths of the frame header.

they specify the pcap version as 543.0

svn path=/trunk/; revision=8772
This commit is contained in:
Ronnie Sahlberg 2003-10-24 10:52:04 +00:00
parent 4bedb1d558
commit 7cb2dc0099
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/* libpcap.c
*
* $Id: libpcap.c,v 1.98 2003/10/01 07:11:47 guy Exp $
* $Id: libpcap.c,v 1.99 2003/10/24 10:52:04 sahlberg Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -1162,6 +1162,15 @@ adjust_header(wtap *wth, struct pcaprec_hdr *hdr)
hdr->incl_len > hdr->orig_len))) {
guint32 temp;
temp = hdr->orig_len;
hdr->orig_len = hdr->incl_len;
hdr->incl_len = temp;
}
/* DG/UX use v 543.0 and also swap these fields */
if(wth->capture.pcap->version_major == 543 &&
wth->capture.pcap->version_minor == 0){
guint32 temp;
temp = hdr->orig_len;
hdr->orig_len = hdr->incl_len;
hdr->incl_len = temp;