Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-tls.h
1 /* packet-tls.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef __PACKET_TLS_H__
12 #define __PACKET_TLS_H__
13 
14 #include "ws_symbol_export.h"
15 #include <epan/packet.h>
16 
17 struct tlsinfo {
18  guint32 seq; /* The sequence number within the TLS stream. */
19  gboolean is_reassembled;
20  gboolean end_of_stream; /* TCP FIN, close_notify, etc. */
21  /* The app handle for the session, set by heuristic dissectors
22  * to be called in the future. */
23  dissector_handle_t *app_handle;
24 };
25 
26 WS_DLL_PUBLIC void ssl_dissector_add(guint port, dissector_handle_t handle);
27 WS_DLL_PUBLIC void ssl_dissector_delete(guint port, dissector_handle_t handle);
28 
29 WS_DLL_PUBLIC void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_cli,
30  port_type ptype, guint32 port_srv, guint32 port_cli,
31  guint32 version, gint cipher, const guchar *_master_secret,
32  const guchar *_client_random, const guchar *_server_random,
33  guint32 client_seq, guint32 server_seq);
40 extern gboolean
41 tls_get_cipher_info(packet_info *pinfo, guint16 cipher_suite, int *cipher_algo, int *cipher_mode, int *hash_algo);
42 
47 gboolean
48 tls13_exporter(packet_info *pinfo, gboolean is_early,
49  const char *label, guint8 *context,
50  guint context_length, guint key_length, guchar **out);
51 
52 gint
53 tls13_get_quic_secret(packet_info *pinfo, gboolean is_from_server, int type, guint secret_min_len, guint secret_max_len, guint8 *secret_out);
54 
59 const char *
60 tls_get_alpn(packet_info *pinfo);
61 
66 const char *
67 tls_get_client_alpn(packet_info *pinfo);
68 
69 #endif /* __PACKET_TLS_H__ */
Definition: address.h:56
Definition: packet_info.h:44
Definition: packet.c:763
Definition: packet-tls.h:17