From 773e79b3162dff01e080cb152ff77945244f5a17 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Nov 2007 06:58:35 +0000 Subject: * include/ifaddrs.h: Remove in6ai_temporary. (struct in6addrinfo): Add index element. Declare __check_native. * inet/Makefile (aux): Add check_native. * sysdeps/unix/sysv/linux/check_native.c: New file. * sysdeps/unix/sysv/linux/check_pf.c: No need to recognize IFA_F_TEMPORARY. Pass back ifa_index. * sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code. (rfc3484_sort): Add new parameter. Implement rule 7 correctly: call __check_native if necessary. (getaddrinfo): Fill in index field. Use qsort_r instead of qsort to sort addresses. Pass information about the results. * posix/tst-rfc3484.c: Adjust for addition of index field and change of rfc3484_sort interface. * posix/tst-rfc3484-2.c: Likewise. --- include/ifaddrs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ifaddrs.h b/include/ifaddrs.h index 7d52dc6dc8..50e4c48e82 100644 --- a/include/ifaddrs.h +++ b/include/ifaddrs.h @@ -10,16 +10,19 @@ struct in6addrinfo { enum { in6ai_deprecated = 1, - in6ai_temporary = 2, - in6ai_homeaddress = 4 + in6ai_homeaddress = 2 } flags:8; uint8_t prefixlen; uint16_t :16; + uint32_t index; uint32_t addr[4]; }; extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6, struct in6addrinfo **in6ai, size_t *in6ailen) attribute_hidden; +extern void __check_native (uint32_t a1_index, int *a1_native, + uint32_t a2_index, int *a2_native) + attribute_hidden; #endif /* ifaddrs.h */ -- cgit v1.2.3