getaddrinfo.c (74393) | getaddrinfo.c (78012) |
---|---|
1/* $FreeBSD: head/lib/libc/net/getaddrinfo.c 74393 2001-03-17 14:25:23Z ume $ */ | 1/* $FreeBSD: head/lib/libc/net/getaddrinfo.c 78012 2001-06-10 20:25:24Z ume $ */ |
2/* $KAME: getaddrinfo.c,v 1.15 2000/07/09 04:37:24 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 64 unchanged lines hidden (view full) --- 74 * This would result in a bit of code duplicate with _dns_ghbyname() and 75 * friends. 76 */ 77/* 78 * diffs with other KAME platforms: 79 * - other KAME platforms already nuked FAITH ($GAI), but as FreeBSD 80 * 4.0-RELEASE supplies it, we still have the code here. 81 * - AI_ADDRCONFIG support is supplied | 2/* $KAME: getaddrinfo.c,v 1.15 2000/07/09 04:37:24 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 64 unchanged lines hidden (view full) --- 74 * This would result in a bit of code duplicate with _dns_ghbyname() and 75 * friends. 76 */ 77/* 78 * diffs with other KAME platforms: 79 * - other KAME platforms already nuked FAITH ($GAI), but as FreeBSD 80 * 4.0-RELEASE supplies it, we still have the code here. 81 * - AI_ADDRCONFIG support is supplied |
82 * - EDNS0 support is not available due to resolver differences | |
83 * - some of FreeBSD style (#define tabify and others) 84 * - classful IPv4 numeric (127.1) is allowed. 85 */ 86 87#include "namespace.h" 88#include <sys/types.h> 89#include <sys/param.h> 90#include <sys/socket.h> --- 5 unchanged lines hidden (view full) --- 96#include <resolv.h> 97#include <string.h> 98#include <stdlib.h> 99#include <stddef.h> 100#include <ctype.h> 101#include <unistd.h> 102#include <stdio.h> 103#include <errno.h> | 82 * - some of FreeBSD style (#define tabify and others) 83 * - classful IPv4 numeric (127.1) is allowed. 84 */ 85 86#include "namespace.h" 87#include <sys/types.h> 88#include <sys/param.h> 89#include <sys/socket.h> --- 5 unchanged lines hidden (view full) --- 95#include <resolv.h> 96#include <string.h> 97#include <stdlib.h> 98#include <stddef.h> 99#include <ctype.h> 100#include <unistd.h> 101#include <stdio.h> 102#include <errno.h> |
103#ifdef DEBUG 104#include <syslog.h> 105#endif |
|
104 105#include <syslog.h> 106#include <stdarg.h> 107#include <nsswitch.h> 108#include "un-namespace.h" 109 110#if defined(__KAME__) && defined(INET6) 111# define FAITH --- 1601 unchanged lines hidden (view full) --- 1713 anslen = t->anslen; 1714#ifdef DEBUG 1715 if (_res.options & RES_DEBUG) 1716 printf(";; res_query(%s, %d, %d)\n", name, class, type); 1717#endif 1718 1719 n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL, 1720 buf, sizeof(buf)); | 106 107#include <syslog.h> 108#include <stdarg.h> 109#include <nsswitch.h> 110#include "un-namespace.h" 111 112#if defined(__KAME__) && defined(INET6) 113# define FAITH --- 1601 unchanged lines hidden (view full) --- 1715 anslen = t->anslen; 1716#ifdef DEBUG 1717 if (_res.options & RES_DEBUG) 1718 printf(";; res_query(%s, %d, %d)\n", name, class, type); 1719#endif 1720 1721 n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL, 1722 buf, sizeof(buf)); |
1723 if (n > 0 && (_res.options & RES_USE_EDNS0) != 0) 1724 n = res_opt(n, buf, sizeof(buf), anslen); |
|
1721 if (n <= 0) { 1722#ifdef DEBUG 1723 if (_res.options & RES_DEBUG) 1724 printf(";; res_query: mkquery failed\n"); 1725#endif 1726 h_errno = NO_RECOVERY; 1727 return (n); 1728 } --- 239 unchanged lines hidden --- | 1725 if (n <= 0) { 1726#ifdef DEBUG 1727 if (_res.options & RES_DEBUG) 1728 printf(";; res_query: mkquery failed\n"); 1729#endif 1730 h_errno = NO_RECOVERY; 1731 return (n); 1732 } --- 239 unchanged lines hidden --- |