From 3af48b5b3106e1bb1de4efcabb86cd1fafdff8af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Apr 2006 21:34:32 +0000 Subject: * include/ifaddrs.h: Define struct in6addrinfo. Add two more parameters to __check_pf. * sysdeps/unix/sysv/linux/check_pf.c: When using the netlink interface, determine whether IPv6 addresses are deprecated or temporary. Create array of those addresses. * inet/check_pf.c: Always tell caller there are no depracated and temporary addresses. * sysdeps/posix/getaddrinfo.c: Pretty printing. (struct sort_result): Add source_addr_flags field. (rfc3484_sort): Implement rule 3 and 7. (in6aicmp): New function. (getaddrinfo): Call __check_pf also when we need info about IPv6 source addresses. When creating array for sorting addresses, look up deprecated and temporary addresses returned by __check_pf and add flag if necessary. --- inet/check_pf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inet') diff --git a/inet/check_pf.c b/inet/check_pf.c index 5d98c98..b015432 100644 --- a/inet/check_pf.c +++ b/inet/check_pf.c @@ -1,5 +1,5 @@ /* Determine protocol families for which interfaces exist. Generic version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,8 +23,14 @@ void attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6) +__check_pf (bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) { + /* By default we have no way to determine information about + deprecated and temporary addresses. */ + *in6ai = NULL; + *in6ailen = 0; + /* Get the interface list via getifaddrs. */ struct ifaddrs *ifa = NULL; if (getifaddrs (&ifa) != 0) -- cgit v1.1