getaddrinfo.c (298226) | getaddrinfo.c (298830) |
---|---|
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 --- 38 unchanged lines hidden (view full) --- 47 * against NULL hostname (3) what is AI_ADDRCONFIG itself. AF not ready? 48 * non-loopback address configured? global address configured? 49 * 50 * OS specific notes for freebsd4: 51 * - FreeBSD supported $GAI. The code does not. 52 */ 53 54#include <sys/cdefs.h> | 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 --- 38 unchanged lines hidden (view full) --- 47 * against NULL hostname (3) what is AI_ADDRCONFIG itself. AF not ready? 48 * non-loopback address configured? global address configured? 49 * 50 * OS specific notes for freebsd4: 51 * - FreeBSD supported $GAI. The code does not. 52 */ 53 54#include <sys/cdefs.h> |
55__FBSDID("$FreeBSD: head/lib/libc/net/getaddrinfo.c 298226 2016-04-18 21:05:15Z avos $"); | 55__FBSDID("$FreeBSD: head/lib/libc/net/getaddrinfo.c 298830 2016-04-30 01:24:24Z pfg $"); |
56 57#include "namespace.h" 58#include <sys/param.h> 59#include <sys/socket.h> 60#include <net/if.h> 61#include <netinet/in.h> 62#include <net/if_types.h> 63#include <ifaddrs.h> --- 403 unchanged lines hidden (view full) --- 467 if (ex->e_af < 0) 468 ERR(EAI_BADHINTS); 469 } 470 } 471 472 /* 473 * RFC 3493: AI_ALL and AI_V4MAPPED are effective only against 474 * AF_INET6 query. They need to be ignored if specified in other | 56 57#include "namespace.h" 58#include <sys/param.h> 59#include <sys/socket.h> 60#include <net/if.h> 61#include <netinet/in.h> 62#include <net/if_types.h> 63#include <ifaddrs.h> --- 403 unchanged lines hidden (view full) --- 467 if (ex->e_af < 0) 468 ERR(EAI_BADHINTS); 469 } 470 } 471 472 /* 473 * RFC 3493: AI_ALL and AI_V4MAPPED are effective only against 474 * AF_INET6 query. They need to be ignored if specified in other |
475 * occassions. | 475 * occasions. |
476 */ 477 switch (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) { 478 case AI_V4MAPPED: 479 case AI_ALL | AI_V4MAPPED: 480#ifdef INET6 481 if (pai->ai_family != AF_INET6) 482 pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); 483 break; --- 2533 unchanged lines hidden --- | 476 */ 477 switch (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) { 478 case AI_V4MAPPED: 479 case AI_ALL | AI_V4MAPPED: 480#ifdef INET6 481 if (pai->ai_family != AF_INET6) 482 pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); 483 break; --- 2533 unchanged lines hidden --- |