diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-08 22:18:22 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-08 22:18:22 +0000 |
commit | 3f756801910b8b34c5e3da2a6ba541ab742a1af5 (patch) | |
tree | 7c3b6d5083fed1466e60217d40d4013dad41dd34 | |
parent | 8d514ce83c1f81e21bbc9eae12d75b830bfce477 (diff) | |
download | wireshark-3f756801910b8b34c5e3da2a6ba541ab742a1af5.tar.gz wireshark-3f756801910b8b34c5e3da2a6ba541ab742a1af5.tar.bz2 wireshark-3f756801910b8b34c5e3da2a6ba541ab742a1af5.zip |
Code to handle Frame Relay Sniffer captures, from Jeff Foster.
Code to register the Frame Relay dissector to handle Frame Relay
captures, from Paul Ionescu.
svn path=/trunk/; revision=2845
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | packet-fr.c | 7 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 9 | ||||
-rw-r--r-- | wiretap/wtap.c | 5 | ||||
-rw-r--r-- | wiretap/wtap.h | 5 |
5 files changed, 21 insertions, 6 deletions
@@ -159,6 +159,7 @@ Jeff Foster <jfoste@woodward.com> { Support for conversations with "wildcard" destination addresses and/or ports Initial support for constructing filter expressions + Support for reading Sniffer Frame Relay captures } Peter Torvals <petertv@xoommail.com> { diff --git a/packet-fr.c b/packet-fr.c index 96019ecacd..d51c51b7cb 100644 --- a/packet-fr.c +++ b/packet-fr.c @@ -3,7 +3,7 @@ * * Copyright 2001, Paul Ionescu <paul@acorp.ro> * - * $Id: packet-fr.c,v 1.2 2001/01/07 22:18:32 guy Exp $ + * $Id: packet-fr.c,v 1.3 2001/01/08 22:18:21 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -143,3 +143,8 @@ void proto_register_fr(void) register_dissector("fr", dissect_fr); }; + +void proto_reg_handoff_fr(void) +{ + dissector_add("wtap_encap", WTAP_ENCAP_FRELAY, dissect_fr); +} diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 2d46090507..0e0738edf4 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.56 2000/11/29 08:24:14 guy Exp $ + * $Id: ngsniffer.c,v 1.57 2001/01/08 22:18:22 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -733,13 +733,18 @@ found: /* * OK, this is from an "Internetwork analyzer"; let's * look at the first byte of the packet, and figure - * out whether it's LAPB, LAPD or PPP. + * out whether it's LAPB, LAPD, PPP, or Frame Relay. */ if (pd[0] == 0xFF) { /* * PPP. */ wth->file_encap = WTAP_ENCAP_PPP; + } else if (pd[0] == 0x34 || pd[0] == 0x28) { + /* + * Frame Relay. + */ + wth->file_encap = WTAP_ENCAP_FRELAY; } else if (pd[0] & 1) { /* * LAPB. diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 89ad680747..8ea3ed0916 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1,6 +1,6 @@ /* wtap.c * - * $Id: wtap.c,v 1.50 2000/12/23 08:06:16 guy Exp $ + * $Id: wtap.c,v 1.51 2001/01/08 22:18:22 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -124,6 +124,9 @@ const static struct encap_type_info { /* WTAP_ENCAP_SLL */ { "Linux cooked-mode capture", "linux-sll" }, + + /* WTAP_ENCAP_FRELAY */ + { "Frame Relay", "frelay" }, }; /* Name that should be somewhat descriptive. */ diff --git a/wiretap/wtap.h b/wiretap/wtap.h index cb496342d6..8875d1ddbe 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,6 +1,6 @@ /* wtap.h * - * $Id: wtap.h,v 1.83 2000/12/23 08:06:16 guy Exp $ + * $Id: wtap.h,v 1.84 2001/01/08 22:18:22 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -96,9 +96,10 @@ #define WTAP_ENCAP_PPP_WITH_PHDR 17 #define WTAP_ENCAP_IEEE_802_11 18 #define WTAP_ENCAP_SLL 19 +#define WTAP_ENCAP_FRELAY 20 /* last WTAP_ENCAP_ value + 1 */ -#define WTAP_NUM_ENCAP_TYPES 20 +#define WTAP_NUM_ENCAP_TYPES 21 /* File types that can be read by wiretap. We support writing some many of these file types, too, so we |