MySQL 9.5.0
Source Code Documentation
psi_tls_channel_bits.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2025, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENT_SERVICES_BITS_PSI_TLS_CHANNEL_BITS_H
25#define COMPONENT_SERVICES_BITS_PSI_TLS_CHANNEL_BITS_H
26
27#include <cstddef>
28
29/**
30 @file mysql/components/services/bits/psi_tls_channel_bits.h
31 Instrumentation helpers for TLS channels.
32 This header file provides necessary declarations to instrument
33 TLS context information.
34*/
35
36/**
37 @defgroup psi_abi_tls_channel TLS Channel Instrumentation (ABI)
38 @ingroup psi_abi
39 @{
40*/
41
42/**
43 @def PSI_TLS_CHANNEL_VERSION_1
44 Performance Schema TLS Channel Interface number for version 1.
45 This version is supported.
46*/
47#define PSI_TLS_CHANNEL_VERSION_1 1
48
49/**
50 @def PSI_CURRENT_TLS_CHANNEL_VERSION
51 Performance Schema TLS Channel Interface number for the most recent version.
52 The most current version is @c PSI_TLS_CHANNEL_VERSION_1
53*/
54#define PSI_CURRENT_TLS_CHANNEL_VERSION 1
55
56constexpr size_t MAX_CHANNEL_NAME_SIZE = 64;
57constexpr size_t MAX_PROPERTY_NAME_SIZE = 64;
58constexpr size_t MAX_PROPERTY_VALUE_SIZE = 512;
59
60/** TLS property */
62 public:
63 /** Channel name */
65 /** Property name */
67 /** Property value */
69};
70
71/** Iterator object */
72typedef struct property_iterator_imp *property_iterator;
73
74/**
75 Initialize TLS property iterator
76
77 @param [out] iterator TLS Property iterator object
78
79 @returns Result of iterator creation
80 @retval true Success
81 @retval false Failure
82*/
84
85/**
86 De-initialize TLS property iterator
87
88 @param [in] iterator TLS Property iterator object
89*/
91
92/**
93 Get one TLS property information from current iterator position
94
95 @param [in] iterator TLS Property iterator object
96 @param [out] property Property details
97
98 @returns status of fetch operation
99 @retval true Success
100 @retval false Failure
101*/
102typedef bool (*get_tls_property_t)(property_iterator iterator,
103 TLS_channel_property *property);
104
105/**
106 Move TLS Property iterator to next position
107
108 @param [in] iterator TLS Property iterator object
109
110 @returns Status of operation
111 @retval true Success
112 @retval false Iterator reached at the end
113*/
114typedef bool (*next_tls_property_t)(property_iterator iterator);
115
116/** Property iterator callbacks */
122};
123
125
126/**
127 TLS channel information registration API
128*/
131
132/**
133 TLS channel information un registration API
134*/
137
138/** @} (end of group psi_abi_tls_channel) */
139#endif // !COMPONENT_SERVICES_BITS_PSI_TLS_CHANNEL_BITS_H
TLS property.
Definition: psi_tls_channel_bits.h:61
char channel_name[MAX_CHANNEL_NAME_SIZE+1]
Channel name.
Definition: psi_tls_channel_bits.h:64
char property_value[MAX_PROPERTY_VALUE_SIZE+1]
Property value.
Definition: psi_tls_channel_bits.h:68
char property_name[MAX_PROPERTY_NAME_SIZE+1]
Property name.
Definition: psi_tls_channel_bits.h:66
constexpr size_t MAX_PROPERTY_NAME_SIZE
Definition: psi_tls_channel_bits.h:57
void(* unregister_tls_channel_v1_t)(TLS_channel_property_iterator *provider)
TLS channel information un registration API.
Definition: psi_tls_channel_bits.h:135
bool(* next_tls_property_t)(property_iterator iterator)
Move TLS Property iterator to next position.
Definition: psi_tls_channel_bits.h:114
constexpr size_t MAX_PROPERTY_VALUE_SIZE
Definition: psi_tls_channel_bits.h:58
constexpr size_t MAX_CHANNEL_NAME_SIZE
Definition: psi_tls_channel_bits.h:56
void(* deinit_tls_property_iterator_t)(property_iterator iterator)
De-initialize TLS property iterator.
Definition: psi_tls_channel_bits.h:90
bool(* init_tls_property_iterator_t)(property_iterator *iterator)
Initialize TLS property iterator.
Definition: psi_tls_channel_bits.h:83
bool(* get_tls_property_t)(property_iterator iterator, TLS_channel_property *property)
Get one TLS property information from current iterator position.
Definition: psi_tls_channel_bits.h:102
struct property_iterator_imp * property_iterator
Iterator object.
Definition: psi_tls_channel_bits.h:72
void(* register_tls_channel_v1_t)(TLS_channel_property_iterator *provider)
TLS channel information registration API.
Definition: psi_tls_channel_bits.h:129
Property iterator callbacks.
Definition: psi_tls_channel_bits.h:117
next_tls_property_t next_tls_property
Definition: psi_tls_channel_bits.h:121
deinit_tls_property_iterator_t deinit_tls_property_iterator
Definition: psi_tls_channel_bits.h:119
init_tls_property_iterator_t init_tls_property_iterator
Definition: psi_tls_channel_bits.h:118
get_tls_property_t get_tls_property
Definition: psi_tls_channel_bits.h:120