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