aboutsummaryrefslogtreecommitdiffstats
path: root/packet-lapb.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-04-09 08:15:04 +0000
committerGuy Harris <guy@alum.mit.edu>2002-04-09 08:15:04 +0000
commitbf7e4ce90948af368a11a043fa2617f72e357b96 (patch)
tree32f8d9aeea2e18b5e05ebebd666859514fc47739 /packet-lapb.c
parent7b12868ebf417936bc3fabee7791753bd9eba569 (diff)
Move the definition of the FROM_DCE bit in the "flags" field of a
"struct x25_phdr" to "wiretap/wtap.h". Have two X.25 dissectors, one of which assumes that there's a "struct x25_phdr" pseudo-header and one of which doesn't; the former uses the information in that pseudo-header to determine whether the packet is DTE->DCE or DCE->DTE, and the latter assumes it has no clue whether the packet is DTE->DCE or DCE->TDE. Use the former one in the LAPB dissector, and the latter one in the XOT dissector and in the LLC dissector table. In the X.25-over-TCP dissector, handle multiple X.25 packets per TCP segment, and handle X.25 packets split across TCP segments. svn path=/trunk/; revision=5134
Diffstat (limited to 'packet-lapb.c')
-rw-r--r--packet-lapb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/packet-lapb.c b/packet-lapb.c
index 79e25b5147..f781a0c78b 100644
--- a/packet-lapb.c
+++ b/packet-lapb.c
@@ -2,7 +2,7 @@
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapb.c,v 1.34 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-lapb.c,v 1.35 2002/04/09 08:15:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,8 +37,6 @@
#include <epan/packet.h>
#include "xdlc.h"
-#define FROM_DCE 0x80
-
static int proto_lapb = -1;
static int hf_lapb_address = -1;
static int hf_lapb_control = -1;
@@ -46,7 +44,7 @@ static int hf_lapb_control = -1;
static gint ett_lapb = -1;
static gint ett_lapb_control = -1;
-static dissector_handle_t x25_handle;
+static dissector_handle_t x25_dir_handle;
static void
dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -108,7 +106,7 @@ dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* not end of frame ==> X.25 */
if (tvb_reported_length(tvb) > 2) {
next_tvb = tvb_new_subset(tvb, 2, -1, -1);
- call_dissector(x25_handle, next_tvb, pinfo, tree);
+ call_dissector(x25_dir_handle, next_tvb, pinfo, tree);
}
}
@@ -143,9 +141,10 @@ proto_reg_handoff_lapb(void)
dissector_handle_t lapb_handle;
/*
- * Get a handle for the X.25 dissector.
+ * Get a handle for the X.25 dissector; we will be getting an
+ * X.25 pseudo-header, so call the dissector that can handle it.
*/
- x25_handle = find_dissector("x.25");
+ x25_dir_handle = find_dissector("x.25_dir");
lapb_handle = find_dissector("lapb");
dissector_add("wtap_encap", WTAP_ENCAP_LAPB, lapb_handle);