diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-10-29 07:16:49 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-10-29 07:16:49 +0000 |
commit | bf43e715215b9120b99b26bba7385defbc207bda (patch) | |
tree | ae4a0403bfc24c26f7b7012d70794eaed27f5e06 | |
parent | 5437b247162777fde52ed6b511d12d7423749f8f (diff) | |
download | wireshark-bf43e715215b9120b99b26bba7385defbc207bda.tar.gz |
register tpkt for port 3389 and use x224 as the subdissector for this
port
svn path=/trunk/; revision=23306
-rw-r--r-- | epan/dissectors/packet-tpkt.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tpkt.c b/epan/dissectors/packet-tpkt.c index fcd63f8f40..73dc922bd5 100644 --- a/epan/dissectors/packet-tpkt.c +++ b/epan/dissectors/packet-tpkt.c @@ -55,11 +55,15 @@ static gint ett_tpkt = -1; /* desegmentation of OSI over TPKT over TCP */ static gboolean tpkt_desegment = TRUE; -#define TCP_PORT_TPKT 102 +#define TCP_PORT_TPKT 102 +#define TCP_PORT_TPKT_X224 3389 /* find the dissector for OSI TP (aka COTP) */ static dissector_handle_t osi_tp_handle; +/* find the dissector for X.224 */ +static dissector_handle_t x224_handle; + /* * Check whether this could be a TPKT-encapsulated PDU. * Returns -1 if it's not, and the PDU length from the TPKT header @@ -327,6 +331,16 @@ dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, osi_tp_handle); } +/* + * Dissect RFC 1006 TPKT, which wraps a TPKT header around an X.224 + * PDU. + */ +static void +dissect_tpkt_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, x224_handle); +} + void proto_register_tpkt(void) { @@ -398,4 +412,8 @@ proto_reg_handoff_tpkt(void) osi_tp_handle = find_dissector("ositp"); tpkt_handle = create_dissector_handle(dissect_tpkt, proto_tpkt); dissector_add("tcp.port", TCP_PORT_TPKT, tpkt_handle); + + x224_handle = find_dissector("x224"); + tpkt_handle = create_dissector_handle(dissect_tpkt_x224, proto_tpkt); + dissector_add("tcp.port", TCP_PORT_TPKT_X224, tpkt_handle); } |