summaryrefslogtreecommitdiff
path: root/source4/torture
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
parent897ef820a40afffbf337b5487a49d957464def67 (diff)
downloadsamba-22cb631b4fd0647b70fbaaafaffda8712a84a999.tar.gz
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')
-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
-rw-r--r--source4/torture/rpc/spoolss_notify.c4
6 files changed, 23 insertions, 23 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 7306c54deb1..b33afec68f6 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 d52ae4181ec..8405d91c184 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 0ddaa8a05a1..635683ffbf9 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 aff620878c8..07c7e952cba 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 e30bfdd852f..40f7ac33ea0 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;
}
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index ec29c3944fe..04cd01b4a32 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -455,8 +455,8 @@ static bool test_start_dcerpc_server(struct torture_context *tctx,
lpcfg_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss");
- load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
- address = iface_n_ip(ifaces, 0);
+ load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+ address = iface_list_n_ip(ifaces, 0);
torture_comment(tctx, "Listening for callbacks on %s\n", address);