From 1df2a0fce427fab7754f6ac572cf68cef2e95696 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 15 Jun 2011 16:49:24 +0200 Subject: Use legacy getifaddrs() on GNU/kFreeBSD --- netlink.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'netlink.c') diff --git a/netlink.c b/netlink.c index e7a3863..29f38e3 100644 --- a/netlink.c +++ b/netlink.c @@ -35,32 +35,9 @@ #include #include -#include "netlink.h" +#include "ifconf.h" -static int address_compare(const void *_a, const void *_b) { - const struct address *a = _a, *b = _b; - - /* Order lowest scope first, IPv4 before IPv6, lowest interface index first */ - - if (a->scope < b->scope) - return -1; - if (a->scope > b->scope) - return 1; - - if (a->family == AF_INET && b->family == AF_INET6) - return -1; - if (a->family == AF_INET6 && b->family == AF_INET) - return 1; - - if (a->ifindex < b->ifindex) - return -1; - if (a->ifindex > b->ifindex) - return 1; - - return 0; -} - -int netlink_acquire_addresses(struct address **_list, unsigned *_n_list) { +int ifconf_acquire_addresses(struct address **_list, unsigned *_n_list) { struct { struct nlmsghdr hdr; -- cgit