enum ctdb_runstate runstate;
};
-struct ctdb_iface {
- struct ctdb_iface *prev, *next;
+struct ctdb_interface {
+ struct ctdb_interface *prev, *next;
const char *name;
bool link_up;
uint32_t references;
static int ctdb_add_local_iface(struct ctdb_context *ctdb, const char *iface)
{
- struct ctdb_iface *i;
+ struct ctdb_interface *i;
/* Verify that we dont have an entry for this ip yet */
for (i=ctdb->ifaces;i;i=i->next) {
}
/* create a new structure for this interface */
- i = talloc_zero(ctdb, struct ctdb_iface);
+ i = talloc_zero(ctdb, struct ctdb_interface);
CTDB_NO_MEMORY_FATAL(ctdb, i);
i->name = talloc_strdup(i, iface);
CTDB_NO_MEMORY(ctdb, i->name);
static void ctdb_remove_orphaned_ifaces(struct ctdb_context *ctdb,
struct ctdb_vnn *vnn)
{
- struct ctdb_iface *i, *next;
+ struct ctdb_interface *i, *next;
/* For each interface, check if there's an IP using it. */
for (i = ctdb->ifaces; i != NULL; i = next) {
}
-static struct ctdb_iface *ctdb_find_iface(struct ctdb_context *ctdb,
- const char *iface)
+static struct ctdb_interface *ctdb_find_iface(struct ctdb_context *ctdb,
+ const char *iface)
{
- struct ctdb_iface *i;
+ struct ctdb_interface *i;
for (i=ctdb->ifaces;i;i=i->next) {
if (strcmp(i->name, iface) == 0) {
return NULL;
}
-static struct ctdb_iface *ctdb_vnn_best_iface(struct ctdb_context *ctdb,
- struct ctdb_vnn *vnn)
+static struct ctdb_interface *ctdb_vnn_best_iface(struct ctdb_context *ctdb,
+ struct ctdb_vnn *vnn)
{
int i;
- struct ctdb_iface *cur = NULL;
- struct ctdb_iface *best = NULL;
+ struct ctdb_interface *cur = NULL;
+ struct ctdb_interface *best = NULL;
for (i=0; vnn->ifaces[i]; i++) {
static int32_t ctdb_vnn_assign_iface(struct ctdb_context *ctdb,
struct ctdb_vnn *vnn)
{
- struct ctdb_iface *best = NULL;
+ struct ctdb_interface *best = NULL;
if (vnn->iface) {
DEBUG(DEBUG_INFO, (__location__ " public address '%s' "
}
for (i=0; vnn->ifaces[i]; i++) {
- struct ctdb_iface *cur;
+ struct ctdb_interface *cur;
cur = ctdb_find_iface(ctdb, vnn->ifaces[i]);
if (cur == NULL) {
struct ctdb_do_updateip_state {
struct ctdb_req_control_old *c;
- struct ctdb_iface *old;
+ struct ctdb_interface *old;
struct ctdb_vnn *vnn;
};
{
int ret;
struct ctdb_do_updateip_state *state;
- struct ctdb_iface *old = vnn->iface;
+ struct ctdb_interface *old = vnn->iface;
const char *new_name;
if (vnn->update_in_flight) {
bool have_ip = false;
bool do_updateip = false;
bool do_takeip = false;
- struct ctdb_iface *best_iface = NULL;
+ struct ctdb_interface *best_iface = NULL;
if (pip->pnn != ctdb->pnn) {
DEBUG(DEBUG_ERR,(__location__" takeoverip called for an ip '%s' "
const char *ip)
{
struct ctdb_vnn *svnn;
- struct ctdb_iface *cur = NULL;
+ struct ctdb_interface *cur = NULL;
bool ok;
int ret;
info->active_idx = 0xFFFFFFFF;
for (i=0; vnn->ifaces[i]; i++) {
- struct ctdb_iface *cur;
+ struct ctdb_interface *cur;
cur = ctdb_find_iface(ctdb, vnn->ifaces[i]);
if (cur == NULL) {
{
int i, num, len;
struct ctdb_control_get_ifaces *ifaces;
- struct ctdb_iface *cur;
+ struct ctdb_interface *cur;
/* count how many public ip structures we have */
num = 0;
TDB_DATA indata)
{
struct ctdb_control_iface_info *info;
- struct ctdb_iface *iface;
+ struct ctdb_interface *iface;
bool link_up = false;
info = (struct ctdb_control_iface_info *)indata.dptr;
* :eth1:1:4294967292
*/
-struct ctdb_iface {
- struct ctdb_iface *prev, *next;
+struct ctdb_interface {
+ struct ctdb_interface *prev, *next;
const char *name;
bool link_up;
uint32_t references;
static void ctdb_test_stubs_read_ifaces(struct ctdb_context *ctdb)
{
char line[1024];
- struct ctdb_iface *iface;
+ struct ctdb_interface *iface;
while ((fgets(line, sizeof(line), stdin) != NULL) &&
(line[0] != '\n')) {
}
references = (uint32_t)strtoul(tok, NULL, 0);
- iface = talloc_zero(ctdb, struct ctdb_iface);
+ iface = talloc_zero(ctdb, struct ctdb_interface);
if (iface == NULL) {
DEBUG(DEBUG_ERR, ("OOM allocating iface\n"));
#ifdef CTDB_TEST_OVERRIDE_MAIN
static void ctdb_test_stubs_print_ifaces(struct ctdb_context *ctdb)
{
- struct ctdb_iface *iface;
+ struct ctdb_interface *iface;
assert_ifaces_set(ctdb);
{
int i, num, len;
struct ctdb_control_get_ifaces *ifaces;
- struct ctdb_iface *cur;
+ struct ctdb_interface *cur;
assert_ifaces_set(ctdb);