aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ngsniffer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-04-09 08:15:04 +0000
committerGuy Harris <guy@alum.mit.edu>2002-04-09 08:15:04 +0000
commitbf7e4ce90948af368a11a043fa2617f72e357b96 (patch)
tree32f8d9aeea2e18b5e05ebebd666859514fc47739 /wiretap/ngsniffer.c
parent7b12868ebf417936bc3fabee7791753bd9eba569 (diff)
Move the definition of the FROM_DCE bit in the "flags" field of a
"struct x25_phdr" to "wiretap/wtap.h". Have two X.25 dissectors, one of which assumes that there's a "struct x25_phdr" pseudo-header and one of which doesn't; the former uses the information in that pseudo-header to determine whether the packet is DTE->DCE or DCE->DTE, and the latter assumes it has no clue whether the packet is DTE->DCE or DCE->TDE. Use the former one in the LAPB dissector, and the latter one in the XOT dissector and in the LLC dissector table. In the X.25-over-TCP dissector, handle multiple X.25 packets per TCP segment, and handle X.25 packets split across TCP segments. svn path=/trunk/; revision=5134
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r--wiretap/ngsniffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 88b29b5daa..e867752443 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -1,6 +1,6 @@
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.76 2002/03/05 08:39:29 guy Exp $
+ * $Id: ngsniffer.c,v 1.77 2002/04/09 08:15:04 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -1030,7 +1030,7 @@ static void set_pseudo_header_frame2(union wtap_pseudo_header *pseudo_header,
* or 0xcc, and "flags" was either 0 or 0x18,
* with no obvious correlation with anything.
*/
- pseudo_header->x25.flags = (frame2->fs & 0x80) ? 0x00 : 0x80;
+ pseudo_header->x25.flags = (frame2->fs & 0x80) ? 0x00 : FROM_DCE;
}
static gboolean ngsniffer_read_frame4(wtap *wth, gboolean is_random,
@@ -1294,7 +1294,7 @@ static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
rec_hdr.time_high = htoles(t_high);
rec_hdr.size = htoles(phdr->caplen);
if (wdh->encap == WTAP_ENCAP_LAPB || wdh->encap == WTAP_ENCAP_PPP)
- rec_hdr.fs = (pseudo_header->x25.flags & 0x80) ? 0x00 : 0x80;
+ rec_hdr.fs = (pseudo_header->x25.flags & FROM_DCE) ? 0x00 : 0x80;
else
rec_hdr.fs = 0;
rec_hdr.flags = 0;