diff options
author | Olivier Abad <oabad@noos.fr> | 1999-12-14 12:41:13 +0000 |
---|---|---|
committer | Olivier Abad <oabad@noos.fr> | 1999-12-14 12:41:13 +0000 |
commit | 8e8821b4a3cb9e971ef2e9e538abeb8798211856 (patch) | |
tree | 09ccfa873a928a52cf2482c4765549067aba3718 | |
parent | f71e02dca0e3d1b0a95320b763d9a00e96dac981 (diff) |
Changed the meaning of the 0x80 bit in "fs" in a frame2 record (from DTE
instead of from DCE).
I can now open a RADCOM X.25 capture in ethereal, save it as sniffer, and
read it with a sniffer. The frame directions are correct. (BTW, the
snifconv.exe tool provided by RADCOM doesn't work with X.25 captures).
svn path=/trunk/; revision=1331
-rw-r--r-- | wiretap/ngsniffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 0121c7f967..ad912e0b13 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.32 1999/12/11 10:02:11 guy Exp $ + * $Id: ngsniffer.c,v 1.33 1999/12/14 12:41:13 oabad Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu> @@ -509,7 +509,8 @@ static int ngsniffer_read(wtap *wth, int *err) * or 0xcc, and "flags" was either 0 or 0x18, * with no obvious correlation with anything. */ - wth->phdr.pseudo_header.x25.flags = frame2.fs & 0x80; + wth->phdr.pseudo_header.x25.flags = + (frame2.fs & 0x80) ? 0x00 : 0x80; goto found; @@ -783,7 +784,7 @@ static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, rec_hdr.time_high = pletohs(&t_high); rec_hdr.size = pletohs(&phdr->caplen); if (wdh->encap == WTAP_ENCAP_LAPB || wdh->encap == WTAP_ENCAP_PPP) - rec_hdr.fs = phdr->pseudo_header.x25.flags & 0x80; + rec_hdr.fs = (phdr->pseudo_header.x25.flags & 0x80) ? 0x00 : 0x80; else rec_hdr.fs = 0; rec_hdr.flags = 0; |