int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- struct ctdb_control_get_ifaces **_ifaces)
+ struct ctdb_iface_list_old **_ifaces)
{
int ret;
TDB_DATA outdata;
int32_t res;
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
uint32_t len;
uint32_t i;
return -1;
}
- len = offsetof(struct ctdb_control_get_ifaces, ifaces);
+ len = offsetof(struct ctdb_iface_list_old, ifaces);
if (len > outdata.dsize) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for get ifaces "
"returned invalid data with size %u > %u\n",
return -1;
}
- ifaces = (struct ctdb_control_get_ifaces *)outdata.dptr;
+ ifaces = (struct ctdb_iface_list_old *)outdata.dptr;
len += ifaces->num*sizeof(struct ctdb_iface);
if (len > outdata.dsize) {
ifaces->ifaces[i].name[CTDB_IFACE_SIZE] = '\0';
}
- *_ifaces = (struct ctdb_control_get_ifaces *)talloc_memdup(mem_ctx,
+ *_ifaces = (struct ctdb_iface_list_old *)talloc_memdup(mem_ctx,
outdata.dptr,
outdata.dsize);
talloc_free(outdata.dptr);
int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- struct ctdb_control_get_ifaces **ifaces);
+ struct ctdb_iface_list_old **ifaces);
int ctdb_ctrl_set_iface_link(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
struct ctdb_iface ifaces[1];
};
-struct ctdb_control_get_ifaces {
+struct ctdb_iface_list_old {
uint32_t num;
struct ctdb_iface ifaces[1];
};
struct srvid_requests *reallocate_requests;
struct ctdb_op_state *takeover_run;
struct ctdb_op_state *recovery;
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
uint32_t *force_rebalance_nodes;
struct ctdb_node_capabilities *caps;
};
static bool interfaces_have_changed(struct ctdb_context *ctdb,
struct ctdb_recoverd *rec)
{
- struct ctdb_control_get_ifaces *ifaces = NULL;
+ struct ctdb_iface_list_old *ifaces = NULL;
TALLOC_CTX *mem_ctx;
bool ret = false;
TDB_DATA *outdata)
{
int i, num, len;
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
struct ctdb_interface *cur;
/* count how many public ip structures we have */
num++;
}
- len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
+ len = offsetof(struct ctdb_iface_list_old, ifaces) +
num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
i++;
}
ifaces->num = i;
- len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
+ len = offsetof(struct ctdb_iface_list_old, ifaces) +
i*sizeof(struct ctdb_iface);
outdata->dsize = len;
int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- struct ctdb_control_get_ifaces **ifaces);
+ struct ctdb_iface_list_old **ifaces);
int ctdb_ctrl_getpnn(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode);
int ctdb_ctrl_getrecmode(struct ctdb_context *ctdb,
TDB_DATA *outdata)
{
int i, num, len;
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
struct ctdb_interface *cur;
assert_ifaces_set(ctdb);
num++;
}
- len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
+ len = offsetof(struct ctdb_iface_list_old, ifaces) +
num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
i++;
}
ifaces->num = i;
- len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
+ len = offsetof(struct ctdb_iface_list_old, ifaces) +
i*sizeof(struct ctdb_iface);
outdata->dsize = len;
ctdb_ctrl_get_ifaces_stub(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- struct ctdb_control_get_ifaces **ifaces)
+ struct ctdb_iface_list_old **ifaces)
{
TDB_DATA *outdata;
int ret;
ret = ctdb_control_get_ifaces(ctdb, NULL, outdata);
if (ret == 0) {
- *ifaces = (struct ctdb_control_get_ifaces *)outdata->dptr;
+ *ifaces = (struct ctdb_iface_list_old *)outdata->dptr;
}
return ret;
bool ret = false;
if (node->flags == 0) {
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
if (ctdb_ctrl_get_ifaces(ctdb, TIMELIMIT(), node->pnn,
tmp_ctx, &ifaces) == 0) {
{
TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
int i;
- struct ctdb_control_get_ifaces *ifaces;
+ struct ctdb_iface_list_old *ifaces;
int ret;
/* read the public ip list from this node */