diff options
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/i4btrace.c | 4 | ||||
-rw-r--r-- | wiretap/nettl.c | 5 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 6 | ||||
-rw-r--r-- | wiretap/radcom.c | 6 | ||||
-rw-r--r-- | wiretap/visual.c | 10 | ||||
-rw-r--r-- | wiretap/wtap.h | 6 |
6 files changed, 20 insertions, 17 deletions
diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c index 0c2294f521..9b9eec2066 100644 --- a/wiretap/i4btrace.c +++ b/wiretap/i4btrace.c @@ -1,6 +1,6 @@ /* i4btrace.c * - * $Id: i4btrace.c,v 1.19 2002/03/05 08:39:29 guy Exp $ + * $Id: i4btrace.c,v 1.20 2002/04/09 08:15:04 guy Exp $ * * Wiretap Library * Copyright (c) 1999 by Bert Driehuis <driehuis@playbeing.org> @@ -338,7 +338,7 @@ i4b_set_pseudo_header(wtap *wth, i4b_trace_hdr_t *hdr, * V.120. */ pseudo_header->x25.flags = - (hdr->dir == FROM_TE) ? 0x00 : 0x80; + (hdr->dir == FROM_TE) ? 0x00 : FROM_DCE; } break; } diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 28a111befe..7f6bf20b36 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -1,6 +1,6 @@ /* nettl.c * - * $Id: nettl.c,v 1.25 2002/03/05 08:39:29 guy Exp $ + * $Id: nettl.c,v 1.26 2002/04/09 08:15:04 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -300,7 +300,8 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, phdr->ts.tv_sec = pntohl(&lapb_hdr.sec); phdr->ts.tv_usec = pntohl(&lapb_hdr.usec); - pseudo_header->x25.flags = (lapb_hdr.from_dce & 0x20 ? 0x80 : 0x00); + pseudo_header->x25.flags = + (lapb_hdr.from_dce & 0x20 ? FROM_DCE : 0x00); break; default: g_message("nettl: network type %u unknown or unsupported", 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; diff --git a/wiretap/radcom.c b/wiretap/radcom.c index 4337ea1dda..c603474347 100644 --- a/wiretap/radcom.c +++ b/wiretap/radcom.c @@ -1,6 +1,6 @@ /* radcom.c * - * $Id: radcom.c,v 1.35 2002/03/05 08:39:29 guy Exp $ + * $Id: radcom.c,v 1.36 2002/04/09 08:15:04 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -279,7 +279,7 @@ static gboolean radcom_read(wtap *wth, int *err, long *data_offset) tm.tm_isdst = -1; wth->phdr.ts.tv_sec = mktime(&tm); wth->phdr.ts.tv_usec = pletohl(&hdr.date.usec); - wth->pseudo_header.x25.flags = (hdr.dce & 0x1) ? 0x00 : 0x80; + wth->pseudo_header.x25.flags = (hdr.dce & 0x1) ? 0x00 : FROM_DCE; /* * Read the packet data. @@ -332,7 +332,7 @@ radcom_seek_read(wtap *wth, long seek_off, return FALSE; } - pseudo_header->x25.flags = (hdr.dce & 0x1) ? 0x00 : 0x80; + pseudo_header->x25.flags = (hdr.dce & 0x1) ? 0x00 : FROM_DCE; /* * Read the packet data. diff --git a/wiretap/visual.c b/wiretap/visual.c index faa5a99084..100441ae7a 100644 --- a/wiretap/visual.c +++ b/wiretap/visual.c @@ -2,7 +2,7 @@ * File read and write routines for Visual Networks cap files. * Copyright (c) 2001, Tom Nisbet tnisbet@visualnetworks.com * - * $Id: visual.c,v 1.5 2002/03/05 08:39:29 guy Exp $ + * $Id: visual.c,v 1.6 2002/04/09 08:15:04 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -299,7 +299,8 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset) case WTAP_ENCAP_FRELAY: case WTAP_ENCAP_LAPB: - wth->pseudo_header.x25.flags = (packet_status & PS_SENT) ? 0x00 : 0x80; + wth->pseudo_header.x25.flags = + (packet_status & PS_SENT) ? 0x00 : FROM_DCE; break; } @@ -376,7 +377,7 @@ static gboolean visual_seek_read (wtap *wth, long seek_off, case WTAP_ENCAP_FRELAY: case WTAP_ENCAP_LAPB: - pseudo_header->x25.flags = (packet_status & PS_SENT) ? 0x00 : 0x80; + pseudo_header->x25.flags = (packet_status & PS_SENT) ? 0x00 : FROM_DCE; break; } @@ -523,7 +524,8 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, case WTAP_ENCAP_FRELAY: case WTAP_ENCAP_LAPB: - packet_status |= ((pseudo_header->x25.flags & 0x80) ? 0x00 : PS_SENT); + packet_status |= + ((pseudo_header->x25.flags & FROM_DCE) ? 0x00 : PS_SENT); break; } vpkt_hdr.status = htolel(packet_status); diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 1aa567f210..84bf02f1fc 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,6 +1,6 @@ /* wtap.h * - * $Id: wtap.h,v 1.109 2002/04/08 09:44:42 guy Exp $ + * $Id: wtap.h,v 1.110 2002/04/09 08:15:04 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -18,7 +18,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ #ifndef __WTAP_H__ @@ -186,8 +185,9 @@ */ /* Packet "pseudo-header" information for X.25 capture files. */ +#define FROM_DCE 0x80 struct x25_phdr { - guint8 flags; /* ENCAP_LAPB : 1st bit means From DCE */ + guint8 flags; /* ENCAP_LAPB, ENCAP_V120 : 1st bit means From DCE */ }; /* Packet "pseudo-header" for ATM Sniffer capture files. */ |