aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-05-17 19:51:09 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-05-17 19:51:09 +0000
commitdadf75a0315023b59cd6f8340d2368302dc52935 (patch)
tree82068b84527764307a768bccbab47fd0d85ac90d
parent8e48f993ae01d104c7bd8eb9e5fe2071ba9219c4 (diff)
From Mark C Brown,:
Fixes for LAP-B (SX25L2) and X.25 (SX25L3) nettl trace records. svn path=/trunk/; revision=14386
-rw-r--r--epan/dissectors/packet-nettl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nettl.c b/epan/dissectors/packet-nettl.c
index 262084f0ae..62c3367f1b 100644
--- a/epan/dissectors/packet-nettl.c
+++ b/epan/dissectors/packet-nettl.c
@@ -36,6 +36,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/ipproto.h>
+#include <wiretap/nettl.h>
/* Initialise the protocol and registered fields */
@@ -49,6 +50,8 @@ static int hf_nettl_uid = -1;
static dissector_handle_t eth_withoutfcs_handle;
static dissector_handle_t tr_handle;
+static dissector_handle_t lapb_handle;
+static dissector_handle_t x25_handle;
static dissector_handle_t data_handle;
static dissector_table_t wtap_dissector_table;
static dissector_table_t ip_proto_dissector_table;
@@ -241,6 +244,12 @@ dissect_nettl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
IP_PROTO_ICMPV6, tvb, pinfo, tree))
call_dissector(data_handle, tvb, pinfo, tree);
break;
+ case WTAP_ENCAP_NETTL_X25:
+ if (pinfo->pseudo_header->nettl.subsys == NETTL_SUBSYS_SX25L2)
+ call_dissector(lapb_handle, tvb, pinfo, tree);
+ else
+ call_dissector(x25_handle, tvb, pinfo, tree);
+ break;
default:
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
@@ -314,6 +323,8 @@ proto_reg_handoff_nettl(void)
*/
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
tr_handle = find_dissector("tr");
+ lapb_handle = find_dissector("lapb");
+ x25_handle = find_dissector("x.25");
data_handle = find_dissector("data");
wtap_dissector_table = find_dissector_table("wtap_encap");
ip_proto_dissector_table = find_dissector_table("ip.proto");
@@ -325,5 +336,6 @@ proto_reg_handoff_nettl(void)
dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_IP, nettl_handle);
dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_ICMP, nettl_handle);
dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_ICMPV6, nettl_handle);
+ dissector_add("wtap_encap", WTAP_ENCAP_NETTL_X25, nettl_handle);
dissector_add("wtap_encap", WTAP_ENCAP_NETTL_UNKNOWN, nettl_handle);
}