aboutsummaryrefslogtreecommitdiffstats
path: root/packet-raw.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-03-30 06:10:54 +0000
committerGuy Harris <guy@alum.mit.edu>2001-03-30 06:10:54 +0000
commit949888c04a7a85b847da144d14bf51eedb5bad94 (patch)
tree7b517fc86bf7ab944a63d61eb54f9c9c8c11df1c /packet-raw.c
parente30bc52b6af6cd5975885c4bcd7221d9d9a50650 (diff)
Call the dissector for PPP-in-HDLC-like-framing (RFC 1662) the
"ppp_hdlc" dissector, and call the dissector for "raw" PPP (just RFC 1661, no HDLC encapsulation) the "ppp" dissector. Have the common routine used by both those dissectors take the offset in the tvbuff of the PPP protocol field as an argument, rather than assuming that the protocol field begins at the beginning of the tvbuff, so we don't have to construct a new tvbuff in the PPP-in-HDLC-like-framing dissector. Use the PPP dissector, not the PPP-in-HDLC-like-framing dissector, for PPP over Frame Relay - there's no HDLC header in PPP over Frame Relay, at least according to http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/pppframe.htm svn path=/trunk/; revision=3208
Diffstat (limited to 'packet-raw.c')
-rw-r--r--packet-raw.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-raw.c b/packet-raw.c
index 807e4aab9a..be9d2b0681 100644
--- a/packet-raw.c
+++ b/packet-raw.c
@@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.24 2001/01/09 06:31:40 guy Exp $
+ * $Id: packet-raw.c,v 1.25 2001/03/30 06:10:54 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -44,7 +44,7 @@ static gint ett_raw = -1;
static const char zeroes[10];
static dissector_handle_t ip_handle;
-static dissector_handle_t ppp_handle;
+static dissector_handle_t ppp_hdlc_handle;
void
capture_raw(const u_char *pd, packet_counts *ld)
@@ -114,20 +114,20 @@ dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* sometimes. This check should be removed when 2.2 is out.
*/
if (tvb_get_ntohs(tvb, 0) == 0xff03) {
- call_dissector(ppp_handle, tvb, pinfo, tree);
+ call_dissector(ppp_hdlc_handle, tvb, pinfo, tree);
return;
}
/* The Linux ISDN driver sends a fake MAC address before the PPP header
* on its ippp interfaces... */
else if (tvb_get_ntohs(tvb, 6) == 0xff03) {
next_tvb = tvb_new_subset(tvb, 6, -1, -1);
- call_dissector(ppp_handle, next_tvb, pinfo, tree);
+ call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
return;
}
/* ...except when it just puts out one byte before the PPP header... */
else if (tvb_get_ntohs(tvb, 1) == 0xff03) {
next_tvb = tvb_new_subset(tvb, 1, -1, -1);
- call_dissector(ppp_handle, next_tvb, pinfo, tree);
+ call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
return;
}
/* ...and if the connection is currently down, it sends 10 bytes of zeroes
@@ -159,9 +159,9 @@ void
proto_reg_handoff_raw(void)
{
/*
- * Get handles for the IP and PPP dissectors.
+ * Get handles for the IP and PPP-in-HDLC-like-framing dissectors.
*/
ip_handle = find_dissector("ip");
- ppp_handle = find_dissector("ppp");
+ ppp_hdlc_handle = find_dissector("ppp_hdlc");
dissector_add("wtap_encap", WTAP_ENCAP_RAW_IP, dissect_raw, -1);
}