MySQL 8.3.0
Source Code Documentation
node_list.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 NODE_LIST_H
24#define NODE_LIST_H
25
26#include "xdr_gen/xcom_vp.h"
27
28node_list clone_node_list(node_list list);
29char *dbg_list(node_list const *nodes);
30void init_node_list(u_int n, node_address *names, node_list *nodes);
31int match_node(node_address const *n1, node_address const *n2, u_int with_uid);
32void add_node_list(u_int n, node_address *names, node_list *nodes);
33int node_exists(node_address *name, node_list const *nodes);
34int node_exists_with_uid(node_address *name, node_list const *nodes);
35node_address *new_node_address(u_int n, char const *names[]);
36node_address *new_node_address_uuid(u_int n, char const *names[], blob uuid[]);
37void delete_node_address(u_int n, node_address *na);
38void remove_node_list(u_int n, node_address *names, node_list *nodes);
39
40/* Enable all services by default */
41node_address *init_single_node_address(node_address *na, char const *name,
42 uint32_t services = P_PROP | P_ACC |
43 P_LEARN);
44node_address *init_node_address(node_address *na, u_int n, char const *names[]);
45node_list *empty_node_list();
46node_list null_node_list();
47blob clone_blob(blob const b);
48blob *clone_blob_ptr(blob const *b);
49uint32_t chksum_node_list(node_list const *nodes);
50size_t node_list_size(node_list const *nodes);
51
52#endif
constexpr value_type blob
Definition: classic_protocol_constants.h:271
Definition: services.cc:39
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2877
blob * clone_blob_ptr(blob const *b)
Definition: node_list.cc:149
node_list clone_node_list(node_list list)
Definition: node_list.cc:66
node_list * empty_node_list()
Definition: node_list.cc:237
node_list null_node_list()
uint32_t chksum_node_list(node_list const *nodes)
Definition: node_list.cc:307
int node_exists(node_address *name, node_list const *nodes)
Definition: node_list.cc:110
blob clone_blob(blob const b)
Definition: node_list.cc:137
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:242
node_address * init_node_address(node_address *na, u_int n, char const *names[])
Definition: node_list.cc:251
void remove_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:201
void delete_node_address(u_int n, node_address *na)
Definition: node_list.cc:286
char * dbg_list(node_list const *nodes)
Debug a node list.
Definition: node_list.cc:51
void init_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:231
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:72
void add_node_list(u_int n, node_address *names, node_list *nodes)
Definition: node_list.cc:165
node_address * new_node_address(u_int n, char const *names[])
Definition: node_list.cc:261
int node_exists_with_uid(node_address *name, node_list const *nodes)
Definition: node_list.cc:114
node_address * new_node_address_uuid(u_int n, char const *names[], blob uuid[])
Definition: node_list.cc:268
case opt name
Definition: sslopt-case.h:32
__u_int u_int
Definition: types.h:72
int n
Definition: xcom_base.cc:508