summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-08 22:18:22 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-08 22:18:22 +0000
commit3f756801910b8b34c5e3da2a6ba541ab742a1af5 (patch)
tree7c3b6d5083fed1466e60217d40d4013dad41dd34 /wiretap
parent8d514ce83c1f81e21bbc9eae12d75b830bfce477 (diff)
downloadwireshark-3f756801910b8b34c5e3da2a6ba541ab742a1af5.tar.gz
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
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/ngsniffer.c9
-rw-r--r--wiretap/wtap.c5
-rw-r--r--wiretap/wtap.h5
3 files changed, 14 insertions, 5 deletions
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