diff options
author | Robert Millan <rmh@debian.org> | 2011-06-15 16:49:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-15 16:49:56 +0200 |
commit | 1df2a0fce427fab7754f6ac572cf68cef2e95696 (patch) | |
tree | 3a4fcc5f1e9a3cad3d4c875564b48afed73ae926 /netlink.c | |
parent | 87a477c74e2478e94e89e7026cf7207fcdc2dffc (diff) |
Use legacy getifaddrs() on GNU/kFreeBSD
Diffstat (limited to 'netlink.c')
-rw-r--r-- | netlink.c | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -35,32 +35,9 @@ #include <inttypes.h> #include <stdlib.h> -#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; |