getaddrinfo.c (17f53388d61cb5c8848dc63ee3410ae83ed97673) getaddrinfo.c (5d9d18f283e2274f1320bd37d0ec59aae0af94dd)
1/* $KAME: getaddrinfo.c,v 1.15 2000/07/09 04:37:24 itojun Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1532 unchanged lines hidden (view full) ---

1541 * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with
1542 * _dns_getaddrinfo.
1543 */
1544static int
1545addrconfig(struct addrinfo *pai)
1546{
1547 struct ifaddrs *ifaddrs, *ifa;
1548 struct sockaddr_in *sin;
1/* $KAME: getaddrinfo.c,v 1.15 2000/07/09 04:37:24 itojun Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1532 unchanged lines hidden (view full) ---

1541 * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with
1542 * _dns_getaddrinfo.
1543 */
1544static int
1545addrconfig(struct addrinfo *pai)
1546{
1547 struct ifaddrs *ifaddrs, *ifa;
1548 struct sockaddr_in *sin;
1549#ifdef INET6
1549 struct sockaddr_in6 *sin6;
1550 struct sockaddr_in6 *sin6;
1551#endif
1550 int seen_inet = 0, seen_inet6 = 0;
1551
1552 if (getifaddrs(&ifaddrs) != 0)
1553 return (0);
1554
1555 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
1556 if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0)
1557 continue;

--- 1346 unchanged lines hidden ---
1552 int seen_inet = 0, seen_inet6 = 0;
1553
1554 if (getifaddrs(&ifaddrs) != 0)
1555 return (0);
1556
1557 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
1558 if (ifa->ifa_addr == NULL || (ifa->ifa_flags & IFF_UP) == 0)
1559 continue;

--- 1346 unchanged lines hidden ---