source: vendor/current/source3/include/serverid.h

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 1.7 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Implementation of a reliable server_exists()
4 Copyright (C) Volker Lendecke 2010
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef __SERVERID_H__
21#define __SERVERID_H__
22
23#include "replace.h"
24#include "lib/dbwrap/dbwrap.h"
25
26/*
27 * Register a server with its unique id
28 */
29bool serverid_register(const struct server_id id, uint32_t msg_flags);
30
31/*
32 * De-register a server with its unique id
33 */
34bool serverid_deregister(const struct server_id id);
35
36/*
37 * Check existence of a server id
38 */
39bool serverid_exists(const struct server_id *id);
40
41/*
42 * Walk the list of server_ids registered
43 */
44bool serverid_traverse(int (*fn)(struct db_record *rec,
45 const struct server_id *id,
46 uint32_t msg_flags,
47 void *private_data),
48 void *private_data);
49
50/*
51 * Walk the list of server_ids registered read-only
52 */
53bool serverid_traverse_read(int (*fn)(const struct server_id *id,
54 uint32_t msg_flags,
55 void *private_data),
56 void *private_data);
57/*
58 * Ensure CLEAR_IF_FIRST works fine, to be called from the parent smbd
59 */
60bool serverid_parent_init(TALLOC_CTX *mem_ctx);
61
62#endif
Note: See TracBrowser for help on using the repository browser.