getaddrinfo.c (55167) | getaddrinfo.c (55837) |
---|---|
1/* 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/lib/libc/net/getaddrinfo.c 55167 1999-12-28 05:37:39Z shin $ | 29 * $FreeBSD: head/lib/libc/net/getaddrinfo.c 55837 2000-01-12 09:23:48Z jasone $ |
30 */ 31 32/* 33 * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator. 34 * 35 * Issues to be discussed: 36 * - Thread safe-ness must be checked. 37 * - Return values. There are nonstandard return values defined and used --- 439 unchanged lines hidden (view full) --- 477 478 /* 479 * filter out AFs that are not supported by the kernel 480 * XXX errno? 481 */ 482 s = socket(pai->ai_family, SOCK_DGRAM, 0); 483 if (s < 0) 484 return 0; | 30 */ 31 32/* 33 * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator. 34 * 35 * Issues to be discussed: 36 * - Thread safe-ness must be checked. 37 * - Return values. There are nonstandard return values defined and used --- 439 unchanged lines hidden (view full) --- 477 478 /* 479 * filter out AFs that are not supported by the kernel 480 * XXX errno? 481 */ 482 s = socket(pai->ai_family, SOCK_DGRAM, 0); 483 if (s < 0) 484 return 0; |
485 close(s); | 485 _libc_close(s); |
486 487 /* 488 * if the servname does not match socktype/protocol, ignore it. 489 */ 490 if (get_portmatch(pai, servname) != 0) 491 return 0; 492 493 afd = find_afd(pai->ai_family); --- 91 unchanged lines hidden (view full) --- 585 586 /* 587 * filter out AFs that are not supported by the kernel 588 * XXX errno? 589 */ 590 s = socket(pai->ai_family, SOCK_DGRAM, 0); 591 if (s < 0) 592 return 0; | 486 487 /* 488 * if the servname does not match socktype/protocol, ignore it. 489 */ 490 if (get_portmatch(pai, servname) != 0) 491 return 0; 492 493 afd = find_afd(pai->ai_family); --- 91 unchanged lines hidden (view full) --- 585 586 /* 587 * filter out AFs that are not supported by the kernel 588 * XXX errno? 589 */ 590 s = socket(pai->ai_family, SOCK_DGRAM, 0); 591 if (s < 0) 592 return 0; |
593 close(s); | 593 _libc_close(s); |
594 afd = find_afd(pai->ai_family); 595 if (afd == NULL) 596 return 0; 597 598 GET_AI(cur->ai_next, afd, 599 (pai->ai_flags & AI_PASSIVE) ? afd->a_addrany : afd->a_loopback 600 ); 601 /* xxx meaningless? --- 420 unchanged lines hidden --- | 594 afd = find_afd(pai->ai_family); 595 if (afd == NULL) 596 return 0; 597 598 GET_AI(cur->ai_next, afd, 599 (pai->ai_flags & AI_PASSIVE) ? afd->a_addrany : afd->a_loopback 600 ); 601 /* xxx meaningless? --- 420 unchanged lines hidden --- |