1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/ctdb/ctdb_private.h
Andrew Tridgell 2f96398da1 added incoming setup
added ctdb_start

(This used to be ctdb commit da6f07f7bb8b6a0a0d4e4c0e1358401d1f9f4175)
2006-11-18 13:45:04 +11:00

74 lines
1.7 KiB
C

/*
ctdb database library
Copyright (C) Andrew Tridgell 2006
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
a pending ctdb request
*/
struct ctdb_request {
};
/*
an installed ctdb remote call
*/
struct ctdb_registered_call {
struct ctdb_registered_call *next, *prev;
uint32_t id;
ctdb_fn_t fn;
};
struct ctdb_address {
const char *address;
int port;
};
/*
state associated with one node
*/
struct ctdb_node {
struct ctdb_context *ctdb;
struct ctdb_node *next, *prev;
struct ctdb_address address;
int fd;
};
/*
state associated with an incoming connection
*/
struct ctdb_incoming {
struct ctdb_context *ctdb;
int fd;
};
/* main state of the ctdb daemon */
struct ctdb_context {
struct event_context *ev;
struct ctdb_address address;
int listen_fd;
struct ctdb_node *nodes; /* list of nodes in the cluster */
struct ctdb_registered_call *calls; /* list of registered calls */
char *err_msg;
struct tdb_context *ltdb;
};
#define CTDB_SOCKET "/tmp/ctdb.sock"