MySQL 9.1.0
Source Code Documentation
node_list.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 NODE_LIST_H
25#define NODE_LIST_H
26
27#include "xdr_gen/xcom_vp.h"
28
29node_list clone_node_list(node_list list);
30char *dbg_list(node_list const *nodes);
31void init_node_list(u_int n, node_address *names, node_list *nodes);
32int match_node(node_address const *n1, node_address const *n2, u_int with_uid);
33void add_node_list(u_int n, node_address *names, node_list *nodes);
34int node_exists(node_address *name, node_list const *nodes);
35int node_exists_with_uid(node_address *name, node_list const *nodes);
36node_address *new_node_address(u_int n, char const *names[]);
37node_address *new_node_address_uuid(u_int n, char const *names[], blob uuid[]);
38void delete_node_address(u_int n, node_address *na);
39void remove_node_list(u_int n, node_address *names, node_list *nodes);
40
41/* Enable all services by default */
42node_address *init_single_node_address(node_address *na, char const *name,
43 uint32_t services = P_PROP | P_ACC |
44 P_LEARN);
45node_address *init_node_address(node_address *na, u_int n, char const *names[]);
46node_list *empty_node_list();
47node_list null_node_list();
48blob clone_blob(blob const b);
49blob *clone_blob_ptr(blob const *b);
50uint32_t chksum_node_list(node_list const *nodes);
51size_t node_list_size(node_list const *nodes);
52
53#endif
constexpr value_type blob
Definition: classic_protocol_constants.h:272
Definition: services.cc:40
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2880
blob * clone_blob_ptr(blob const *b)
Definition: node_list.cc:150
node_list clone_node_list(node_list list)
Definition: node_list.cc:67
node_list * empty_node_list()
Definition: node_list.cc:238
node_list null_node_list()
uint32_t chksum_node_list(node_list const *nodes)
Definition: node_list.cc:308
int node_exists(node_address *name, node_list const *nodes)
Definition: node_list.cc:111
blob clone_blob(blob const b)
Definition: node_list.cc:138
node_address * init_single_node_address(node_address *na, char const *name, uint32_t services=P_PROP|P_ACC|P_LEARN)
Definition: node_list.cc:243
node_address * init_node_address(node_address *na, u_int n, char const *names[])
Definition: node_list.cc:252
void remove_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:202
void delete_node_address(u_int n, node_address *na)
Definition: node_list.cc:287
char * dbg_list(node_list const *nodes)
Debug a node list.
Definition: node_list.cc:52
void init_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:232
size_t node_list_size(node_list const *nodes)
int match_node(node_address const *n1, node_address const *n2, u_int with_uid)
Definition: node_list.cc:73
void add_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:166
node_address * new_node_address(u_int n, char const *names[])
Definition: node_list.cc:262
int node_exists_with_uid(node_address *name, node_list const *nodes)
Definition: node_list.cc:115
node_address * new_node_address_uuid(u_int n, char const *names[], blob uuid[])
Definition: node_list.cc:269
case opt name
Definition: sslopt-case.h:29
__u_int u_int
Definition: types.h:73
int n
Definition: xcom_base.cc:509