summaryrefslogtreecommitdiff
path: root/source4/torture/nbt
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-02 15:57:19 +1000
committerAndrew Tridgell <tridge@samba.org>2011-05-08 12:57:04 +0200
commit22cb631b4fd0647b70fbaaafaffda8712a84a999 (patch)
tree3522a34688c42b9698d267a8f0248b2f8c9b9dd4 /source4/torture/nbt
parent897ef820a40afffbf337b5487a49d957464def67 (diff)
downloadsamba-22cb631b4fd0647b70fbaaafaffda8712a84a999.tar.gz
samba-22cb631b4fd0647b70fbaaafaffda8712a84a999.tar.bz2
samba-22cb631b4fd0647b70fbaaafaffda8712a84a999.zip
s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions conflicted with functions of the same name in source3, so the source4 functions were renamed. Hopefully we can actually wrap one around the other in future. Andrew Bartlett
Diffstat (limited to 'source4/torture/nbt')
-rw-r--r--source4/torture/nbt/dgram.c12
-rw-r--r--source4/torture/nbt/register.c8
-rw-r--r--source4/torture/nbt/wins.c4
-rw-r--r--source4/torture/nbt/winsbench.c4
-rw-r--r--source4/torture/nbt/winsreplication.c14
5 files changed, 21 insertions, 21 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 7306c54deb..b33afec68f 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -91,8 +91,8 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
&name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
@@ -187,8 +187,8 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
&name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
myaddress, lpcfg_dgram_port(tctx->lp_ctx));
@@ -458,8 +458,8 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
0, 0, &name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
myaddress, lpcfg_dgram_port(tctx->lp_ctx));
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index d52ae4181e..8405d91c18 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -54,9 +54,9 @@ static bool nbt_register_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = iface_best_ip(ifaces, address);
+ myaddress = iface_list_best_ip(ifaces, address);
socket_address = socket_address_from_strings(tctx, nbtsock->sock->backend_name,
myaddress, 0);
@@ -123,9 +123,9 @@ static bool nbt_refresh_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = iface_best_ip(ifaces, address);
+ myaddress = iface_list_best_ip(ifaces, address);
socket_address = socket_address_from_strings(tctx, nbtsock->sock->backend_name,
myaddress, 0);
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index 0ddaa8a05a..635683ffbf 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -65,9 +65,9 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
struct interface *ifaces;
bool low_port = try_low_port;
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- myaddress = talloc_strdup(tctx, iface_best_ip(ifaces, address));
+ myaddress = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
socket_address = socket_address_from_strings(tctx,
nbtsock->sock->backend_name,
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index aff620878c..07c7e952cb 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -246,8 +246,8 @@ static bool bench_wins(struct torture_context *tctx)
state->registered = talloc_zero_array(state, bool, state->num_names);
state->wins_server = address;
state->wins_port = lpcfg_nbt_port(tctx->lp_ctx);
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- state->my_ip = talloc_strdup(tctx, iface_best_ip(ifaces, address));
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ state->my_ip = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
state->ttl = timelimit;
my_ip = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name,
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index e30bfdd852..40f7ac33ea 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -615,14 +615,14 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev);
if (!ctx->nbtsock) return NULL;
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_best_ip(ifaces, address), 0);
+ ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_list_best_ip(ifaces, address), 0);
if (!ctx->myaddr) return NULL;
- for (i = 0; i < iface_count(ifaces); i++) {
- if (strcmp(ctx->myaddr->addr, iface_n_ip(ifaces, i)) == 0) continue;
- ctx->myaddr2 = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_n_ip(ifaces, i), 0);
+ for (i = 0; i < iface_list_count(ifaces); i++) {
+ if (strcmp(ctx->myaddr->addr, iface_list_n_ip(ifaces, i)) == 0) continue;
+ ctx->myaddr2 = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_list_n_ip(ifaces, i), 0);
if (!ctx->myaddr2) return NULL;
break;
}
@@ -679,12 +679,12 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
ctx->addresses_best[0].owner = ctx->b.address;
ctx->addresses_best[0].ip = ctx->myaddr->addr;
- ctx->addresses_all_num = iface_count(ifaces);
+ ctx->addresses_all_num = iface_list_count(ifaces);
ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
if (!ctx->addresses_all) return NULL;
for (i=0; i < ctx->addresses_all_num; i++) {
ctx->addresses_all[i].owner = ctx->b.address;
- ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(ifaces, i));
+ ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_list_n_ip(ifaces, i));
if (!ctx->addresses_all[i].ip) return NULL;
}