aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-03-11 02:51:05 +0000
committerGuy Harris <guy@alum.mit.edu>2001-03-11 02:51:05 +0000
commited3b9031f6e045c6fdab000cda4668bb5fc76af2 (patch)
treeabbb0674b8074bc7541671225a15d8a3c34de8cc /wiretap/libpcap.c
parent3f313289413e5694951072cccdce9f745e198c89 (diff)
Handle NetBSD Cisco HDLC as PPP, for now.
svn path=/trunk/; revision=3125
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index 27dce446fd..5f2067ef0a 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -1,6 +1,6 @@
/* libpcap.c
*
- * $Id: libpcap.c,v 1.46 2001/03/10 06:33:57 guy Exp $
+ * $Id: libpcap.c,v 1.47 2001/03/11 02:51:05 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -208,7 +208,7 @@ static const struct {
*
* DLT_PPP_BSDOS on BSD/OS;
*
- * DLT_HDLC on NetBSD;
+ * DLT_HDLC on NetBSD (Cisco HDLC);
*
* DLT_CIP with Alexey Kuznetzov's patches for
* Linux libpcap - this is WTAP_ENCAP_LINUX_ATM_CLIP;
@@ -219,6 +219,9 @@ static const struct {
#if defined(DLT_CIP) && (DLT_CIP == 16)
{ 16, WTAP_ENCAP_LINUX_ATM_CLIP },
#endif
+#if defined(DLT_HDLC) && (DLT_HDLC == 16)
+ { 16, WTAP_ENCAP_PPP },
+#endif
/*
* 17 is DLT_LANE8023 in SuSE 6.3 libpcap; we don't currently
@@ -316,9 +319,15 @@ static const struct {
*/
{ 102, WTAP_ENCAP_SLIP_BSDOS },
{ 103, WTAP_ENCAP_PPP_BSDOS },
- { 104, WTAP_ENCAP_C_HDLC }, /* Cisco HDLC */
#endif
- /* This one is handled in Ethereal, though. */
+
+ /*
+ * These ones are handled in Ethereal, though.
+ * (We currently handle Cisco HDLC like PPP; the PPP dissector
+ * distinguishes between HDLC-encapsulated PPP and Cisco HDLC
+ * by looking at the address field.)
+ */
+ { 104, WTAP_ENCAP_PPP }, /* Cisco HDLC */
{ 106, WTAP_ENCAP_LINUX_ATM_CLIP },
/*
@@ -328,7 +337,11 @@ static const struct {
*/
{ 105, WTAP_ENCAP_IEEE_802_11 },
#if 0
- /* Not yet handled in Ethereal. */
+ /*
+ * Not yet handled in Ethereal; we don't know what encapsulation
+ * BSD/OS uses, so we don't know whether it can be handed to
+ * the Frame Relay dissector or not.
+ */
{ 107, WTAP_ENCAP_FR }, /* Frame Relay */
#endif
{ 108, WTAP_ENCAP_NULL }, /* OpenBSD loopback */