diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/packet-tpkt.h | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-tpkt.h')
-rw-r--r-- | epan/dissectors/packet-tpkt.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tpkt.h b/epan/dissectors/packet-tpkt.h new file mode 100644 index 00000000..eb144b9b --- /dev/null +++ b/epan/dissectors/packet-tpkt.h @@ -0,0 +1,50 @@ +/* packet-tpkt.h + * + * Routines for TPKT dissection + * + * Copyright 2000, Philips Electronics N.V. + * Andreas Sikkema <andreas.sikkema@philips.com> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "ws_symbol_export.h" + +/* + * Check whether this could be a 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 "4+min_len" in order for this to be a + * valid TPKT PDU for the protocol in question. + */ +WS_DLL_PUBLIC int is_tpkt(tvbuff_t *tvb, int min_len); + +/* + * Dissect TPKT-encapsulated data in a TCP stream. + */ +WS_DLL_PUBLIC 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); |