#include "lib/netif/netif.h"
#include "dlinklist.h"
-/* used for network interfaces */
+/** used for network interfaces */
struct interface {
struct interface *next, *prev;
struct ipv4_addr ip;
-/****************************************************************************
+/**
interpret a single element from a interfaces= config line
This handles the following different forms:
3) IP/masklen
4) ip/mask
5) bcast/mask
-****************************************************************************/
+**/
static void interpret_interface(const char *token,
struct iface_struct *probed_ifaces,
int total_probed)
}
-/****************************************************************************
+/**
load the list of network interfaces
-****************************************************************************/
+**/
static void load_interfaces(void)
{
const char **ptr;
}
-/*
+/**
unload the interfaces list, so it can be reloaded when needed
*/
-_PUBLIC_ void unload_interfaces(void)
+void unload_interfaces(void)
{
talloc_free(local_interfaces);
local_interfaces = NULL;
}
-/****************************************************************************
+/**
how many interfaces do we have
- **************************************************************************/
-_PUBLIC_ int iface_count(void)
+ **/
+int iface_count(void)
{
int ret = 0;
struct interface *i;
return ret;
}
-/****************************************************************************
+/**
return IP of the Nth interface
- **************************************************************************/
-_PUBLIC_ const char *iface_n_ip(int n)
+ **/
+const char *iface_n_ip(int n)
{
struct interface *i;
return NULL;
}
-/****************************************************************************
+/**
return bcast of the Nth interface
- **************************************************************************/
-_PUBLIC_ const char *iface_n_bcast(int n)
+ **/
+const char *iface_n_bcast(int n)
{
struct interface *i;
return NULL;
}
-/****************************************************************************
+/**
return netmask of the Nth interface
- **************************************************************************/
-_PUBLIC_ const char *iface_n_netmask(int n)
+ **/
+const char *iface_n_netmask(int n)
{
struct interface *i;
return NULL;
}
-/*
+/**
return the local IP address that best matches a destination IP, or
our first interface if none match
*/
-_PUBLIC_ const char *iface_best_ip(const char *dest)
+const char *iface_best_ip(const char *dest)
{
struct interface *iface;
struct in_addr ip;
return iface_n_ip(0);
}
-/*
+/**
return True if an IP is one one of our local networks
*/
-_PUBLIC_ BOOL iface_is_local(const char *dest)
+BOOL iface_is_local(const char *dest)
{
struct in_addr ip;
return False;
}
-/*
+/**
return True if a IP matches a IP/netmask pair
*/
-_PUBLIC_ BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask)
+BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask)
{
return same_net(interpret_addr2(ip1),
interpret_addr2(ip2),