From df4624870b6edbf6c426ae5bc2807dcee205e69f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Nov 2005 01:50:26 +0000 Subject: r11710: added function iface_same_net() (This used to be commit 3e36b301947ccd4343bc294da59b13a8a9cfafce) --- source4/lib/netif/interface.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source4/lib/netif/interface.c b/source4/lib/netif/interface.c index 17a10c6799..2abb08e090 100644 --- a/source4/lib/netif/interface.c +++ b/source4/lib/netif/interface.c @@ -370,3 +370,13 @@ BOOL iface_is_local(const char *dest) } return False; } + +/* + return True if a IP matches a IP/netmask pair +*/ +BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask) +{ + return same_net(interpret_addr2(ip1), + interpret_addr2(ip2), + interpret_addr2(netmask)); +} -- cgit