source: vendor/3.6.0/source3/include/ctdbd_conn.h

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 2.8 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Samba3 ctdb connection handling
4 Copyright (C) Volker Lendecke 2007
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 _CTDBD_CONN_H
21#define _CTDBD_CONN_H
22
23#include <tdb.h>
24
25struct ctdbd_connection;
26struct messaging_context;
27struct messaging_rec;
28
29NTSTATUS ctdbd_messaging_connection(TALLOC_CTX *mem_ctx,
30 struct ctdbd_connection **pconn);
31
32uint32 ctdbd_vnn(const struct ctdbd_connection *conn);
33
34NTSTATUS ctdbd_register_msg_ctx(struct ctdbd_connection *conn,
35 struct messaging_context *msg_ctx);
36struct messaging_context *ctdb_conn_msg_ctx(struct ctdbd_connection *conn);
37
38int ctdbd_conn_get_fd(struct ctdbd_connection *conn);
39
40NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn,
41 uint32 dst_vnn, uint64 dst_srvid,
42 struct messaging_rec *msg);
43
44bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn,
45 pid_t pid);
46
47char *ctdbd_dbpath(struct ctdbd_connection *conn,
48 TALLOC_CTX *mem_ctx, uint32_t db_id);
49
50NTSTATUS ctdbd_db_attach(struct ctdbd_connection *conn, const char *name,
51 uint32_t *db_id, int tdb_flags);
52
53NTSTATUS ctdbd_migrate(struct ctdbd_connection *conn, uint32 db_id,
54 TDB_DATA key);
55
56NTSTATUS ctdbd_fetch(struct ctdbd_connection *conn, uint32 db_id,
57 TDB_DATA key, TALLOC_CTX *mem_ctx, TDB_DATA *data);
58
59NTSTATUS ctdbd_traverse(uint32 db_id,
60 void (*fn)(TDB_DATA key, TDB_DATA data,
61 void *private_data),
62 void *private_data);
63
64NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
65 const struct sockaddr_storage *server,
66 const struct sockaddr_storage *client,
67 void (*release_ip_handler)(const char *ip_addr,
68 void *private_data),
69 void *private_data);
70
71NTSTATUS ctdbd_register_reconfigure(struct ctdbd_connection *conn);
72
73NTSTATUS ctdbd_control_local(struct ctdbd_connection *conn, uint32 opcode,
74 uint64_t srvid, uint32_t flags, TDB_DATA data,
75 TALLOC_CTX *mem_ctx, TDB_DATA *outdata,
76 int *cstatus);
77NTSTATUS ctdb_watch_us(struct ctdbd_connection *conn);
78NTSTATUS ctdb_unwatch(struct ctdbd_connection *conn);
79
80#endif /* _CTDBD_CONN_H */
Note: See TracBrowser for help on using the repository browser.