ctdb-server: Use find_public_ip_vnn() in a couple of extra places
[samba4-gss.git] / ctdb / conf / node.h
blobcb1578ae726064db4cc140b3edcfa04324872706
1 /*
2 Node file loading
4 Copyright (C) Martin Andrew Tridgell 2007
5 Copyright (C) Martin Ronnie Sahlberg 2008, 2009
6 Copyright (C) Martin Schwenke 2015
7 Copyright (C) Amitay Isaacs 2015
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
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 for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef __CTDB_COMMON_NODES_H__
24 #define __CTDB_COMMON_NODES_H__
26 #include <talloc.h>
28 #include "protocol/protocol.h"
30 /**
31 * @brief Parse node address string, setting CTDB port
33 * Parse a node address string. Set the port number to the CTDB port.
35 * @param[in] str Text node address
36 * @param[out] address Socket address structure, already allocated
37 * @return true on success, false on failure
39 bool ctdb_parse_node_address(const char *str, ctdb_sock_addr *address);
41 /**
42 * @brief Load node list into a node map
44 * Load nodes from location, into a node map, allocated off the given
45 * talloc context. Location must be a filename.
47 * @param[in] mem_ctx Talloc memory context
48 * @param[in] location Location of nodes list
49 * @return node map on success, NULL on failure
51 struct ctdb_node_map *ctdb_read_nodes(TALLOC_CTX *mem_ctx,
52 const char *location);
54 #endif /* __CTDB_COMMON_NODES_H__ */