1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

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
This commit is contained in:
Andrew Bartlett
2011-05-02 15:57:19 +10:00
committed by Andrew Tridgell
parent 897ef820a4
commit 22cb631b4f
29 changed files with 116 additions and 116 deletions

View File

@ -149,22 +149,22 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args)
return NULL;
}
load_interfaces(tmp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
load_interface_list(tmp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
count = iface_count(ifaces);
count = iface_list_count(ifaces);
/* first count how many are not loopback addresses */
for (ifcount = i = 0; i<count; i++) {
const char *ip = iface_n_ip(ifaces, i);
if (!(!all_interfaces && iface_same_net(ip, "127.0.0.1", "255.0.0.0"))) {
const char *ip = iface_list_n_ip(ifaces, i);
if (!(!all_interfaces && iface_list_same_net(ip, "127.0.0.1", "255.0.0.0"))) {
ifcount++;
}
}
pylist = PyList_New(ifcount);
for (ifcount = i = 0; i<count; i++) {
const char *ip = iface_n_ip(ifaces, i);
if (!(!all_interfaces && iface_same_net(ip, "127.0.0.1", "255.0.0.0"))) {
const char *ip = iface_list_n_ip(ifaces, i);
if (!(!all_interfaces && iface_list_same_net(ip, "127.0.0.1", "255.0.0.0"))) {
PyList_SetItem(pylist, ifcount, PyString_FromString(ip));
ifcount++;
}