summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2007-05-02 18:42:02 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2007-05-02 18:42:02 +0000
commit5834873aa7fa6cf2f825dc3efcbd09e24f664936 (patch)
treee1b044e47af124c69d4eadd0283b2b22923aae23 /epan
parent46602a91aefd6eddbb41dc0743eb51eee42fb79b (diff)
downloadwireshark-5834873aa7fa6cf2f825dc3efcbd09e24f664936.tar.gz
From Matt Addison:
Problem: The existing sll dissector does not handle ppp_hdlc packets (sll.ltype == 0x0007). Resolution: Alter packet-sll.c to call the ppp_hdlc dissector when a packet with sll.ltype=0x0007 is received. svn path=/trunk/; revision=21647
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sll.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c
index 71ff8087bf..34e3d72733 100644
--- a/epan/dissectors/packet-sll.c
+++ b/epan/dissectors/packet-sll.c
@@ -29,10 +29,12 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
+#include <epan/prefs.h>
#include <epan/packet.h>
#include "packet-sll.h"
#include "packet-ipx.h"
#include "packet-llc.h"
+#include "packet-ppp.h"
#include <epan/addr_resolv.h>
#include <epan/etypes.h>
@@ -77,15 +79,18 @@ static const value_string packet_type_vals[] = {
*/
#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
+#define LINUX_SLL_P_PPPHDLC 0x0007 /* PPP HDLC frames */
static const value_string ltype_vals[] = {
{ LINUX_SLL_P_802_3, "Raw 802.3" },
{ LINUX_SLL_P_802_2, "802.2 LLC" },
+ { LINUX_SLL_P_PPPHDLC, "PPP (HDLC)" },
{ 0, NULL }
};
static dissector_handle_t ipx_handle;
static dissector_handle_t llc_handle;
+static dissector_handle_t ppphdlc_handle;
static dissector_handle_t data_handle;
void
@@ -120,6 +125,13 @@ capture_sll(const guchar *pd, int len, packet_counts *ld)
capture_ipx(ld);
break;
+ case LINUX_SLL_P_PPPHDLC:
+ /*
+ * PPP HDLC.
+ */
+ capture_ppp_hdlc(pd, len, SLL_HEADER_SIZE, ld);
+ break;
+
default:
ld->other++;
break;
@@ -229,6 +241,13 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(ipx_handle, next_tvb, pinfo, tree);
break;
+ case LINUX_SLL_P_PPPHDLC:
+ /*
+ * PPP HDLC
+ */
+ call_dissector(ppphdlc_handle, next_tvb, pinfo, tree);
+ break;
+
default:
call_dissector(data_handle,next_tvb, pinfo, tree);
break;
@@ -278,10 +297,10 @@ proto_register_sll(void)
{ &hf_sll_trailer,
{ "Trailer", "sll.trailer", FT_BYTES, BASE_NONE, NULL, 0x0,
- "Trailer", HFILL }},
+ "Trailer", HFILL }}
};
static gint *ett[] = {
- &ett_sll,
+ &ett_sll
};
proto_sll = proto_register_protocol("Linux cooked-mode capture",
@@ -300,6 +319,7 @@ proto_reg_handoff_sll(void)
*/
llc_handle = find_dissector("llc");
ipx_handle = find_dissector("ipx");
+ ppphdlc_handle = find_dissector("ppp_hdlc");
data_handle = find_dissector("data");
sll_handle = create_dissector_handle(dissect_sll, proto_sll);