MySQL 8.0.39
Source Code Documentation
psi_tls_channel_bits.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, 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/**
28 @file mysql/components/services/bits/psi_tls_channel_bits.h
29 Instrumentation helpers for TLS channels.
30 This header file provides necessary declarations to instrument
31 TLS context information.
32*/
33
34/**
35 @defgroup psi_abi_tls_channel TLS Channel Instrumentation (ABI)
36 @ingroup psi_abi
37 @{
38*/
39
40/**
41 @def PSI_TLS_CHANNEL_VERSION_1
42 Performance Schema TLS Channel Interface number for version 1.
43 This version is supported.
44*/
45#define PSI_TLS_CHANNEL_VERSION_1 1
46
47/**
48 @def PSI_CURRENT_TLS_CHANNEL_VERSION
49 Performance Schema TLS Channel Interface number for the most recent version.
50 The most current version is @c PSI_TLS_CHANNEL_VERSION_1
51*/
52#define PSI_CURRENT_TLS_CHANNEL_VERSION 1
53
54const size_t MAX_CHANNEL_NAME_SIZE = 64;
55const size_t MAX_PROPERTY_NAME_SIZE = 64;
56const size_t MAX_PROPERTY_VALUE_SIZE = 512;
57
58/** TLS property */
60 public:
61 /** Channel name */
63 /** Property name */
65 /** Property value */
67};
68
69/** Iterator object */
70typedef struct property_iterator_imp *property_iterator;
71
72/**
73 Initialize TLS property iterator
74
75 @param [out] iterator TLS Property iterator object
76
77 @returns Result of iterator creation
78 @retval true Success
79 @retval false Failure
80*/
82
83/**
84 De-initialize TLS property iterator
85
86 @param [in] iterator TLS Property iterator object
87*/
89
90/**
91 Get one TLS property information from current iterator position
92
93 @param [in] iterator TLS Property iterator object
94 @param [out] property Property details
95
96 @returns status of fetch operation
97 @retval true Success
98 @retval false Failure
99*/
100typedef bool (*get_tls_property_t)(property_iterator iterator,
101 TLS_channel_property *property);
102
103/**
104 Move TLS Property iterator to next position
105
106 @param [in] iterator TLS Property iterator object
107
108 @returns Status of operation
109 @retval true Success
110 @retval false Iterator reached at the end
111*/
112typedef bool (*next_tls_property_t)(property_iterator iterator);
113
114/** Property iterator callbacks */
120};
121
123
124/**
125 TLS channel information registration API
126*/
129
130/**
131 TLS channel information un registration API
132*/
135
136/** @} (end of group psi_abi_tls_channel) */
137#endif // !COMPONENT_SERVICES_BITS_PSI_TLS_CHANNEL_BITS_H
TLS property.
Definition: psi_tls_channel_bits.h:59
char channel_name[MAX_CHANNEL_NAME_SIZE+1]
Channel name.
Definition: psi_tls_channel_bits.h:62
char property_value[MAX_PROPERTY_VALUE_SIZE+1]
Property value.
Definition: psi_tls_channel_bits.h:66
char property_name[MAX_PROPERTY_NAME_SIZE+1]
Property name.
Definition: psi_tls_channel_bits.h:64
const size_t MAX_PROPERTY_VALUE_SIZE
Definition: psi_tls_channel_bits.h:56
void(* unregister_tls_channel_v1_t)(TLS_channel_property_iterator *provider)
TLS channel information un registration API.
Definition: psi_tls_channel_bits.h:133
bool(* next_tls_property_t)(property_iterator iterator)
Move TLS Property iterator to next position.
Definition: psi_tls_channel_bits.h:112
void(* deinit_tls_property_iterator_t)(property_iterator iterator)
De-initialize TLS property iterator.
Definition: psi_tls_channel_bits.h:88
bool(* init_tls_property_iterator_t)(property_iterator *iterator)
Initialize TLS property iterator.
Definition: psi_tls_channel_bits.h:81
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:100
struct property_iterator_imp * property_iterator
Iterator object.
Definition: psi_tls_channel_bits.h:70
const size_t MAX_PROPERTY_NAME_SIZE
Definition: psi_tls_channel_bits.h:55
const size_t MAX_CHANNEL_NAME_SIZE
Definition: psi_tls_channel_bits.h:54
void(* register_tls_channel_v1_t)(TLS_channel_property_iterator *provider)
TLS channel information registration API.
Definition: psi_tls_channel_bits.h:127
Property iterator callbacks.
Definition: psi_tls_channel_bits.h:115
next_tls_property_t next_tls_property
Definition: psi_tls_channel_bits.h:119
deinit_tls_property_iterator_t deinit_tls_property_iterator
Definition: psi_tls_channel_bits.h:117
init_tls_property_iterator_t init_tls_property_iterator
Definition: psi_tls_channel_bits.h:116
get_tls_property_t get_tls_property
Definition: psi_tls_channel_bits.h:118