diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-11-16 08:18:30 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-11-16 08:18:30 +0000 |
commit | c002250952a9cb942185f43fb80199d3cfbe6882 (patch) | |
tree | 8071e5c2987bb6d59250c04c73490dcbb322525c /epan/dissectors/packet-tpkt.h | |
parent | 07166afb69a91beac3c4eb3f190c069320b1eb29 (diff) |
From Harmeet Sawhney:
Parse MGCP over TCP with ASCII TPKT header
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1964
svn path=/trunk/; revision=23466
Diffstat (limited to 'epan/dissectors/packet-tpkt.h')
-rw-r--r-- | epan/dissectors/packet-tpkt.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tpkt.h b/epan/dissectors/packet-tpkt.h index 60bb7e46e7..1cef81bd8c 100644 --- a/epan/dissectors/packet-tpkt.h +++ b/epan/dissectors/packet-tpkt.h @@ -35,6 +35,8 @@ * TPKT header must be at least "4+min_len" in order for this to be a * valid TPKT PDU for the protocol in question. */ +static const int TEXT_LAYER_LENGTH = 9; + extern int is_tpkt(tvbuff_t *tvb, int min_len); /* @@ -43,3 +45,23 @@ extern int is_tpkt(tvbuff_t *tvb, int min_len); extern void dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean desegment, dissector_handle_t subdissector_handle); + + +/* + * Check whether this could be a ASCII TPKT-encapsulated PDU. + * Returns -1 if it's not, and the PDU length from the TPKT header + * if it is. + * + * "min_len" is the minimum length of the PDU; the length field in the + * TPKT header must be at least "8+min_len" in order for this to be a + * valid TPKT PDU for the protocol in question. + */ + +extern guint16 is_asciitpkt(tvbuff_t *tvb); + +/* + * Dissect ASCII TPKT-encapsulated data in a TCP stream. + */ +extern void dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, + proto_tree *tree, dissector_handle_t subdissector_handle); + |