summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/interface.c8
-rw-r--r--source4/lib/tdr/tdr.c34
2 files changed, 4 insertions, 38 deletions
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index b4e7c2bf32..524aa09655 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -49,11 +49,11 @@ static struct interface *iface_find(struct interface *interfaces,
struct in_addr ip, bool CheckMask)
{
struct interface *i;
- if (is_zero_ip(ip)) return interfaces;
+ if (is_zero_ip_v4(ip)) return interfaces;
for (i=interfaces;i;i=i->next)
if (CheckMask) {
- if (same_net(i->ip,ip,i->nmask)) return i;
+ if (same_net_v4(i->ip,ip,i->nmask)) return i;
} else if (i->ip.s_addr == ip.s_addr) return i;
return NULL;
@@ -173,7 +173,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
if (ip.s_addr == MKBCADDR(ip.s_addr, nmask.s_addr) ||
ip.s_addr == MKNETADDR(ip.s_addr, nmask.s_addr)) {
for (i=0;i<total_probed;i++) {
- if (same_net(ip, probed_ifaces[i].ip, nmask)) {
+ if (same_net_v4(ip, probed_ifaces[i].ip, nmask)) {
add_interface(mem_ctx, probed_ifaces[i].ip, nmask,
local_interfaces);
talloc_free(address);
@@ -329,7 +329,7 @@ bool iface_is_local(struct interface *ifaces, const char *dest)
*/
bool iface_same_net(const char *ip1, const char *ip2, const char *netmask)
{
- return same_net(interpret_addr2(ip1),
+ return same_net_v4(interpret_addr2(ip1),
interpret_addr2(ip2),
interpret_addr2(netmask));
}
diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c
index 2ad099174d..6c5461a335 100644
--- a/source4/lib/tdr/tdr.c
+++ b/source4/lib/tdr/tdr.c
@@ -199,40 +199,6 @@ NTSTATUS tdr_print_charset(struct tdr_print *tdr, const char *name, const char *
}
/**
- pull a ipv4address
-*/
-NTSTATUS tdr_pull_ipv4address(struct tdr_pull *tdr, TALLOC_CTX *ctx,
- const char **address)
-{
- struct in_addr in;
- TDR_CHECK(tdr_pull_uint32(tdr, ctx, &in.s_addr));
- in.s_addr = htonl(in.s_addr);
- *address = talloc_strdup(tdr, inet_ntoa(in));
- NT_STATUS_HAVE_NO_MEMORY(*address);
- return NT_STATUS_OK;
-}
-
-/**
- push a ipv4address
-*/
-NTSTATUS tdr_push_ipv4address(struct tdr_push *tdr, const char **address)
-{
- uint32_t addr = htonl(interpret_addr(*address));
- TDR_CHECK(tdr_push_uint32(tdr, &addr));
- return NT_STATUS_OK;
-}
-
-/**
- print a ipv4address
-*/
-NTSTATUS tdr_print_ipv4address(struct tdr_print *tdr, const char *name,
- const char **address)
-{
- tdr->print(tdr, "%-25s: %s", name, *address);
- return NT_STATUS_OK;
-}
-
-/**
parse a hyper
*/
NTSTATUS tdr_pull_hyper(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint64_t *v)