res_findzonecut.c (158783) | res_findzonecut.c (158787) |
---|---|
1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00:48:16 marka Exp $"; 3#endif /* not lint */ 4 5/* 6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 7 * Copyright (c) 1999 by Internet Software Consortium. 8 * --- 5 unchanged lines hidden (view full) --- 14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 | 1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00:48:16 marka Exp $"; 3#endif /* not lint */ 4 5/* 6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 7 * Copyright (c) 1999 by Internet Software Consortium. 8 * --- 5 unchanged lines hidden (view full) --- 14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 |
22#include <sys/cdefs.h> 23__FBSDID("$FreeBSD: head/lib/libc/resolv/res_findzonecut.c 158787 2006-05-21 11:19:36Z ume $"); 24 |
|
22/* Import. */ 23 24#include "port_before.h" 25 26#include <sys/param.h> 27#include <sys/socket.h> 28#include <sys/time.h> 29 --- 114 unchanged lines hidden (view full) --- 144 * so the second phase (after we find an SOA) is to go looking for the 145 * NS RRset for that SOA's zone. 146 * 147 * no answer section processed by this code is allowed to contain CNAME 148 * or DNAME RR's. for the SOA query this means we strip a label and 149 * keep going. for the NS and A queries this means we just give up. 150 */ 151 | 25/* Import. */ 26 27#include "port_before.h" 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <sys/time.h> 32 --- 114 unchanged lines hidden (view full) --- 147 * so the second phase (after we find an SOA) is to go looking for the 148 * NS RRset for that SOA's zone. 149 * 150 * no answer section processed by this code is allowed to contain CNAME 151 * or DNAME RR's. for the SOA query this means we strip a label and 152 * keep going. for the NS and A queries this means we just give up. 153 */ 154 |
155#ifndef _LIBC |
|
152int 153res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, 154 char *zname, size_t zsize, struct in_addr *addrs, int naddrs) 155{ 156 int result, i; 157 union res_sockaddr_union *u; 158 159 --- 8 unchanged lines hidden (view full) --- 168 u, naddrs); 169 170 for (i = 0; i < result; i++) { 171 addrs[i] = u[i].sin.sin_addr; 172 } 173 free(u); 174 return (result); 175} | 156int 157res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, 158 char *zname, size_t zsize, struct in_addr *addrs, int naddrs) 159{ 160 int result, i; 161 union res_sockaddr_union *u; 162 163 --- 8 unchanged lines hidden (view full) --- 172 u, naddrs); 173 174 for (i = 0; i < result; i++) { 175 addrs[i] = u[i].sin.sin_addr; 176 } 177 free(u); 178 return (result); 179} |
180#endif |
|
176 177int 178res_findzonecut2(res_state statp, const char *dname, ns_class class, int opts, 179 char *zname, size_t zsize, union res_sockaddr_union *addrs, 180 int naddrs) 181{ 182 char mname[NS_MAXDNAME]; 183 u_long save_pfcode; --- 536 unchanged lines hidden --- | 181 182int 183res_findzonecut2(res_state statp, const char *dname, ns_class class, int opts, 184 char *zname, size_t zsize, union res_sockaddr_union *addrs, 185 int naddrs) 186{ 187 char mname[NS_MAXDNAME]; 188 u_long save_pfcode; --- 536 unchanged lines hidden --- |