ctdb-daemon: Rename struct ctdb_tcp_connection to ctdb_connection
[obnox/samba/samba-obnox.git] / ctdb / include / ctdb_protocol.h
index 6286a089f668bc8700123e1d55307f2ee2ef8678..82910ebaffdcb0139c98aac307b2ad28751a128f 100644 (file)
@@ -553,7 +553,7 @@ struct ctdb_node_and_flags {
    The nodemap is the structure containing a list of all nodes
    known to the cluster and their associated flags.
 */
-struct ctdb_node_map {
+struct ctdb_node_map_old {
        uint32_t num;
        struct ctdb_node_and_flags nodes[1];
 };
@@ -596,13 +596,13 @@ struct ctdb_public_ip {
        ctdb_sock_addr addr;
 };
 
-struct ctdb_all_public_ips {
+struct ctdb_public_ip_list_old {
        uint32_t num;
        struct ctdb_public_ip ips[1];
 };
 
 
-struct latency_counter {
+struct ctdb_latency_counter {
        int num;
        double min;
        double max;
@@ -612,7 +612,7 @@ struct latency_counter {
 /*
   structure used to pass record data between the child and parent
  */
-struct ctdb_rec_data {
+struct ctdb_rec_data_old {
        uint32_t length;
        uint32_t reqid;
        uint32_t keylen;
@@ -670,15 +670,15 @@ struct ctdb_statistics {
                uint32_t traverse;
        } timeouts;
        struct {
-               struct latency_counter ctdbd;
-               struct latency_counter recd;
+               struct ctdb_latency_counter ctdbd;
+               struct ctdb_latency_counter recd;
        } reclock;
        struct {
                uint32_t num_calls;
                uint32_t num_current;
                uint32_t num_pending;
                uint32_t num_failed;
-               struct latency_counter latency;
+               struct ctdb_latency_counter latency;
                uint32_t buckets[MAX_COUNT_BUCKETS];
        } locks;
        uint32_t total_calls;
@@ -689,8 +689,8 @@ struct ctdb_statistics {
        uint32_t __last_counter; /* hack for control_statistics_all */
        uint32_t max_hop_count;
        uint32_t hop_count_bucket[MAX_COUNT_BUCKETS];
-       struct latency_counter call_latency;
-       struct latency_counter childwrite_latency;
+       struct ctdb_latency_counter call_latency;
+       struct ctdb_latency_counter childwrite_latency;
        uint32_t num_recoveries;
        struct timeval statistics_start_time;
        struct timeval statistics_current_time;
@@ -701,7 +701,7 @@ struct ctdb_statistics {
 /*
  * wire format for statistics history
  */
-struct ctdb_statistics_wire {
+struct ctdb_statistics_list_old {
        uint32_t num;
        struct ctdb_statistics stats[1];
 };
@@ -709,17 +709,17 @@ struct ctdb_statistics_wire {
 /*
  * db statistics
  */
-struct ctdb_db_statistics {
+struct ctdb_db_statistics_old {
        struct {
                uint32_t num_calls;
                uint32_t num_current;
                uint32_t num_pending;
                uint32_t num_failed;
-               struct latency_counter latency;
+               struct ctdb_latency_counter latency;
                uint32_t buckets[MAX_COUNT_BUCKETS];
        } locks;
        struct {
-               struct latency_counter latency;
+               struct ctdb_latency_counter latency;
        } vacuum;
        uint32_t db_ro_delegations;
        uint32_t db_ro_revokes;
@@ -741,17 +741,6 @@ struct ctdb_db_statistics {
 #define CTDB_IFACE_SIZE 16
 #endif
 
-struct ctdb_iface_info {
-       char name[CTDB_IFACE_SIZE+2];
-       uint16_t link_state;
-       uint32_t references;
-};
-
-struct ctdb_ifaces_list {
-       uint32_t num;
-       struct ctdb_iface_info ifaces[1];
-};
-
 #define INVALID_GENERATION 1
 /* table that contains the mapping between a hash value and lmaster
  */
@@ -770,47 +759,46 @@ struct ctdb_vnn_map_wire {
        uint32_t map[1];
 };
 
-struct ctdb_client_notify_register {
+struct ctdb_notify_data_old {
        uint64_t srvid;
        uint32_t len;
        uint8_t notify_data[1];
 };
 
-struct ctdb_client_notify_deregister {
-       uint64_t srvid;
-};
-
 /* table that contains a list of all dbids on a node
  */
-struct ctdb_dbid_map {
-       uint32_t num;
-       struct ctdb_dbid {
-               uint32_t dbid;
+
+struct ctdb_dbid {
+       uint32_t db_id;
 #define CTDB_DB_FLAGS_PERSISTENT       0x01
 #define CTDB_DB_FLAGS_READONLY         0x02
 #define CTDB_DB_FLAGS_STICKY           0x04
-               uint8_t flags;
-       } dbs[1];
+       uint8_t flags;
+};
+
+struct ctdb_dbid_map_old {
+       uint32_t num;
+       struct ctdb_dbid dbs[1];
 };
 
 #define CTDB_RECOVERY_NORMAL           0
 #define CTDB_RECOVERY_ACTIVE           1
 
-enum ctdb_server_id_type {
+enum ctdb_client_id_type {
        SERVER_TYPE_SAMBA=1,
        SERVER_TYPE_NFSD=2,
        SERVER_TYPE_ISCSID=3
 };
 
-struct ctdb_server_id {
-       enum ctdb_server_id_type type;
+struct ctdb_client_id {
+       enum ctdb_client_id_type type;
        uint32_t pnn;
        uint32_t server_id;
 };
 
-struct ctdb_server_id_list {
+struct ctdb_client_id_list_old {
        uint32_t num;
-       struct ctdb_server_id server_ids[1];
+       struct ctdb_client_id server_ids[1];
 };
 
 struct ctdb_uptime {
@@ -820,9 +808,9 @@ struct ctdb_uptime {
        struct timeval last_recovery_finished;
 };
 
-struct ctdb_control_tcp_addr {
+struct ctdb_connection {
        ctdb_sock_addr src;
-       ctdb_sock_addr dest;
+       ctdb_sock_addr dst;
 };
 
 struct ctdb_ban_time {
@@ -849,19 +837,10 @@ struct srvid_request_data {
        uint32_t data;
 };
 
-/*
-  a tcp connection description
-  also used by tcp_add and tcp_remove controls
- */
-struct ctdb_tcp_connection {
-       ctdb_sock_addr src_addr;
-       ctdb_sock_addr dst_addr;
-};
-
 /* the wire representation for a tcp tickle array */
 struct ctdb_tcp_wire_array {
        uint32_t num;
-       struct ctdb_tcp_connection connections[1];
+       struct ctdb_connection connections[1];
 };
 
 /* the list of tcp tickles used by get/set tcp tickle list */