Updated BIND resolver library (libbind.so) to version 9.3.1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15570 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f6486d9d01
commit
c544064d35
@ -61,13 +61,16 @@
|
|||||||
#ifndef _INET_H_
|
#ifndef _INET_H_
|
||||||
#define _INET_H_
|
#define _INET_H_
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
/* External definitions for functions in inet(3) */
|
/* External definitions for functions in inet(3) */
|
||||||
|
|
||||||
/* R5 libnet.so does not have "__" prefix. */
|
#include <sys/param.h>
|
||||||
#ifndef BUILDING_R5_LIBNET
|
#if (!defined(BSD)) || (BSD < 199306)
|
||||||
|
# include <sys/bitypes.h>
|
||||||
|
#else
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#define inet_addr __inet_addr
|
#define inet_addr __inet_addr
|
||||||
#define inet_aton __inet_aton
|
#define inet_aton __inet_aton
|
||||||
#define inet_lnaof __inet_lnaof
|
#define inet_lnaof __inet_lnaof
|
||||||
@ -84,32 +87,38 @@
|
|||||||
#define inet_ntop __inet_ntop
|
#define inet_ntop __inet_ntop
|
||||||
#define inet_nsap_addr __inet_nsap_addr
|
#define inet_nsap_addr __inet_nsap_addr
|
||||||
#define inet_nsap_ntoa __inet_nsap_ntoa
|
#define inet_nsap_ntoa __inet_nsap_ntoa
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
unsigned long inet_addr __P((const char *));
|
||||||
|
int inet_aton __P((const char *, struct in_addr *));
|
||||||
|
unsigned long inet_lnaof __P((struct in_addr));
|
||||||
|
struct in_addr inet_makeaddr __P((u_long , u_long));
|
||||||
|
char * inet_neta __P((u_long, char *, size_t));
|
||||||
|
unsigned long inet_netof __P((struct in_addr));
|
||||||
|
unsigned long inet_network __P((const char *));
|
||||||
|
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
|
||||||
|
int inet_net_pton __P((int, const char *, void *, size_t));
|
||||||
|
char *inet_cidr_ntop __P((int, const void *, int, char *, size_t));
|
||||||
|
int inet_cidr_pton __P((int, const char *, void *, int *));
|
||||||
|
/*const*/ char *inet_ntoa __P((struct in_addr));
|
||||||
|
int inet_pton __P((int, const char *, void *));
|
||||||
|
const char *inet_ntop __P((int, const void *, char *, size_t));
|
||||||
|
u_int inet_nsap_addr __P((const char *, u_char *, int));
|
||||||
|
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||||
|
/*
|
||||||
|
* Macros for number representation conversion.
|
||||||
|
*
|
||||||
|
* netinet/in.h is another location for these macros
|
||||||
|
*/
|
||||||
|
#ifndef ntohl
|
||||||
|
#define ntohl(x) (x)
|
||||||
|
#define ntohs(x) (x)
|
||||||
|
#define htonl(x) (x)
|
||||||
|
#define htons(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned long inet_addr(const char *);
|
|
||||||
int inet_aton(const char *, struct in_addr *);
|
|
||||||
unsigned long inet_lnaof(struct in_addr);
|
|
||||||
struct in_addr inet_makeaddr(u_long , u_long);
|
|
||||||
char * inet_neta(u_long, char *, size_t);
|
|
||||||
unsigned long inet_netof(struct in_addr);
|
|
||||||
unsigned long inet_network(const char *);
|
|
||||||
char *inet_net_ntop(int, const void *, int, char *, size_t);
|
|
||||||
int inet_net_pton(int, const char *, void *, size_t);
|
|
||||||
char *inet_cidr_ntop(int, const void *, int, char *, size_t);
|
|
||||||
int inet_cidr_pton(int, const char *, void *, int *);
|
|
||||||
/*const*/ char *inet_ntoa(struct in_addr);
|
|
||||||
int inet_pton(int, const char *, void *);
|
|
||||||
const char *inet_ntop(int, const void *, char *, size_t);
|
|
||||||
u_int inet_nsap_addr(const char *, u_char *, int);
|
|
||||||
char *inet_nsap_ntoa(int, const u_char *, char *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* !_INET_H_ */
|
#endif /* !_INET_H_ */
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
Modified for [Open]BeOS
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ++Copyright++ 1980, 1983, 1988, 1993
|
* ++Copyright++ 1980, 1983, 1988, 1993
|
||||||
* -
|
* -
|
||||||
@ -93,18 +89,9 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Modified for OpenBeOS
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _NETDB_H_
|
#ifndef _NETDB_H_
|
||||||
#define _NETDB_H_
|
#define _NETDB_H_
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if (!defined(BSD)) || (BSD < 199306)
|
#if (!defined(BSD)) || (BSD < 199306)
|
||||||
@ -114,12 +101,6 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _PATH_HEQUIV
|
#ifndef _PATH_HEQUIV
|
||||||
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||||
@ -137,8 +118,18 @@ extern "C" {
|
|||||||
#define _PATH_SERVICES "/etc/services"
|
#define _PATH_SERVICES "/etc/services"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int * __h_errno (void);
|
#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
|
#define __h_errno __h_errno_location
|
||||||
|
#endif
|
||||||
|
__BEGIN_DECLS
|
||||||
|
extern int * __h_errno __P((void));
|
||||||
|
__END_DECLS
|
||||||
|
#if defined(_REENTRANT) || \
|
||||||
|
(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
#define h_errno (*__h_errno())
|
#define h_errno (*__h_errno())
|
||||||
|
#else
|
||||||
|
extern int h_errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structures returned by network data base library. All addresses are
|
* Structures returned by network data base library. All addresses are
|
||||||
@ -183,9 +174,21 @@ struct addrinfo {
|
|||||||
int ai_family; /* PF_xxx */
|
int ai_family; /* PF_xxx */
|
||||||
int ai_socktype; /* SOCK_xxx */
|
int ai_socktype; /* SOCK_xxx */
|
||||||
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||||
|
#if defined(sun) && defined(_SOCKLEN_T)
|
||||||
|
#ifdef __sparc9
|
||||||
|
int _ai_pad;
|
||||||
|
#endif
|
||||||
|
socklen_t ai_addrlen;
|
||||||
|
#else
|
||||||
size_t ai_addrlen; /* length of ai_addr */
|
size_t ai_addrlen; /* length of ai_addr */
|
||||||
|
#endif
|
||||||
|
#ifdef __linux
|
||||||
|
struct sockaddr *ai_addr; /* binary address */
|
||||||
|
char *ai_canonname; /* canonical name for hostname */
|
||||||
|
#else
|
||||||
char *ai_canonname; /* canonical name for hostname */
|
char *ai_canonname; /* canonical name for hostname */
|
||||||
struct sockaddr *ai_addr; /* binary address */
|
struct sockaddr *ai_addr; /* binary address */
|
||||||
|
#endif
|
||||||
struct addrinfo *ai_next; /* next structure in linked list */
|
struct addrinfo *ai_next; /* next structure in linked list */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -259,6 +262,7 @@ struct addrinfo {
|
|||||||
#define SCOPE_DELIMITER '%'
|
#define SCOPE_DELIMITER '%'
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _REENTRANT
|
||||||
#if defined (__hpux) || defined(__osf__) || defined(_AIX)
|
#if defined (__hpux) || defined(__osf__) || defined(_AIX)
|
||||||
#define _MAXALIASES 35
|
#define _MAXALIASES 35
|
||||||
#define _MAXLINELEN 1024
|
#define _MAXLINELEN 1024
|
||||||
@ -348,9 +352,8 @@ struct servent_data {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#define __P(a) a
|
__BEGIN_DECLS
|
||||||
|
|
||||||
void endhostent __P((void));
|
void endhostent __P((void));
|
||||||
void endnetent __P((void));
|
void endnetent __P((void));
|
||||||
void endprotoent __P((void));
|
void endprotoent __P((void));
|
||||||
@ -387,48 +390,163 @@ const char *gai_strerror __P((int));
|
|||||||
struct hostent *getipnodebyname __P((const char *, int, int, int *));
|
struct hostent *getipnodebyname __P((const char *, int, int, int *));
|
||||||
struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
|
struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
|
||||||
void freehostent __P((struct hostent *));
|
void freehostent __P((struct hostent *));
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int getnetgrent __P((/* const */ char **, /* const */ char **,
|
||||||
|
/* const */ char **));
|
||||||
|
void setnetgrent __P((const char *));
|
||||||
|
void endnetgrent __P((void));
|
||||||
|
int innetgr __P((const char *, const char *, const char *,
|
||||||
|
const char *));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
#if defined(__hpux) || defined(__osf__) || defined(_AIX)
|
||||||
|
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||||
|
struct hostent_data *));
|
||||||
|
int gethostbyname_r __P((const char *, struct hostent *,
|
||||||
|
struct hostent_data *));
|
||||||
|
int gethostent_r __P((struct hostent *, struct hostent_data *));
|
||||||
|
#if defined(_AIX)
|
||||||
|
void sethostent_r __P((int, struct hostent_data *));
|
||||||
|
#else
|
||||||
|
int sethostent_r __P((int, struct hostent_data *));
|
||||||
|
#endif
|
||||||
|
#if defined(__hpux)
|
||||||
|
int endhostent_r __P((struct hostent_data *));
|
||||||
|
#else
|
||||||
|
void endhostent_r __P((struct hostent_data *));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__hpux) || defined(__osf__)
|
||||||
|
int getnetbyaddr_r __P((int, int,
|
||||||
|
struct netent *, struct netent_data *));
|
||||||
|
#else
|
||||||
|
int getnetbyaddr_r __P((long, int,
|
||||||
|
struct netent *, struct netent_data *));
|
||||||
|
#endif
|
||||||
|
int getnetbyname_r __P((const char *,
|
||||||
|
struct netent *, struct netent_data *));
|
||||||
|
int getnetent_r __P((struct netent *, struct netent_data *));
|
||||||
|
int setnetent_r __P((int, struct netent_data *));
|
||||||
|
#ifdef __hpux
|
||||||
|
int endnetent_r __P((struct netent_data *buffer));
|
||||||
|
#else
|
||||||
|
void endnetent_r __P((struct netent_data *buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int getprotobyname_r __P((const char *,
|
||||||
|
struct protoent *, struct protoent_data *));
|
||||||
|
int getprotobynumber_r __P((int,
|
||||||
|
struct protoent *, struct protoent_data *));
|
||||||
|
int getprotoent_r __P((struct protoent *, struct protoent_data *));
|
||||||
|
int setprotoent_r __P((int, struct protoent_data *));
|
||||||
|
#ifdef __hpux
|
||||||
|
int endprotoent_r __P((struct protoent_data *));
|
||||||
|
#else
|
||||||
|
void endprotoent_r __P((struct protoent_data *));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int getservbyname_r __P((const char *, const char *,
|
||||||
|
struct servent *, struct servent_data *));
|
||||||
|
int getservbyport_r __P((int, const char *,
|
||||||
|
struct servent *, struct servent_data *));
|
||||||
|
int getservent_r __P((struct servent *, struct servent_data *));
|
||||||
|
int setservent_r __P((int, struct servent_data *));
|
||||||
|
#ifdef __hpux
|
||||||
|
int endservent_r __P((struct servent_data *));
|
||||||
|
#else
|
||||||
|
void endservent_r __P((struct servent_data *));
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
/* defined(sun) || defined(bsdi) */
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||||
|
char *, size_t, struct hostent **, int *));
|
||||||
|
int gethostbyname_r __P((const char *, struct hostent *,
|
||||||
|
char *, size_t, struct hostent **, int *));
|
||||||
|
int gethostent_r __P((struct hostent *, char *, size_t,
|
||||||
|
struct hostent **, int *));
|
||||||
|
#else
|
||||||
struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||||
char *, int, int *));
|
char *, int, int *));
|
||||||
struct hostent *gethostbyname_r __P((const char *, struct hostent *,
|
struct hostent *gethostbyname_r __P((const char *, struct hostent *,
|
||||||
char *, int, int *));
|
char *, int, int *));
|
||||||
struct hostent *gethostent_r __P((struct hostent *, char *, int, int *));
|
struct hostent *gethostent_r __P((struct hostent *, char *, int, int *));
|
||||||
|
#endif
|
||||||
void sethostent_r __P((int));
|
void sethostent_r __P((int));
|
||||||
void endhostent_r __P((void));
|
void endhostent_r __P((void));
|
||||||
|
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int getnetbyname_r __P((const char *, struct netent *,
|
||||||
|
char *, size_t, struct netent **, int*));
|
||||||
|
int getnetbyaddr_r __P((unsigned long int, int, struct netent *,
|
||||||
|
char *, size_t, struct netent **, int*));
|
||||||
|
int getnetent_r __P((struct netent *, char *, size_t, struct netent **, int*));
|
||||||
|
#else
|
||||||
struct netent *getnetbyname_r __P((const char *, struct netent *,
|
struct netent *getnetbyname_r __P((const char *, struct netent *,
|
||||||
char *, int));
|
char *, int));
|
||||||
struct netent *getnetbyaddr_r __P((long, int, struct netent *,
|
struct netent *getnetbyaddr_r __P((long, int, struct netent *,
|
||||||
char *, int));
|
char *, int));
|
||||||
struct netent *getnetent_r __P((struct netent *, char *, int));
|
struct netent *getnetent_r __P((struct netent *, char *, int));
|
||||||
|
#endif
|
||||||
void setnetent_r __P((int));
|
void setnetent_r __P((int));
|
||||||
void endnetent_r __P((void));
|
void endnetent_r __P((void));
|
||||||
|
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int getprotobyname_r __P((const char *, struct protoent *, char *,
|
||||||
|
size_t, struct protoent **));
|
||||||
|
int getprotobynumber_r __P((int, struct protoent *, char *, size_t,
|
||||||
|
struct protoent **));
|
||||||
|
int getprotoent_r __P((struct protoent *, char *, size_t, struct protoent **));
|
||||||
|
#else
|
||||||
struct protoent *getprotobyname_r __P((const char *,
|
struct protoent *getprotobyname_r __P((const char *,
|
||||||
struct protoent *, char *, int));
|
struct protoent *, char *, int));
|
||||||
struct protoent *getprotobynumber_r __P((int,
|
struct protoent *getprotobynumber_r __P((int,
|
||||||
struct protoent *, char *, int));
|
struct protoent *, char *, int));
|
||||||
struct protoent *getprotoent_r __P((struct protoent *, char *, int));
|
struct protoent *getprotoent_r __P((struct protoent *, char *, int));
|
||||||
|
#endif
|
||||||
void setprotoent_r __P((int));
|
void setprotoent_r __P((int));
|
||||||
void endprotoent_r __P((void));
|
void endprotoent_r __P((void));
|
||||||
|
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int getservbyname_r __P((const char *name, const char *,
|
||||||
|
struct servent *, char *, size_t, struct servent **));
|
||||||
|
int getservbyport_r __P((int port, const char *,
|
||||||
|
struct servent *, char *, size_t, struct servent **));
|
||||||
|
int getservent_r __P((struct servent *, char *, size_t, struct servent **));
|
||||||
|
#else
|
||||||
struct servent *getservbyname_r __P((const char *name, const char *,
|
struct servent *getservbyname_r __P((const char *name, const char *,
|
||||||
struct servent *, char *, int));
|
struct servent *, char *, int));
|
||||||
struct servent *getservbyport_r __P((int port, const char *,
|
struct servent *getservbyport_r __P((int port, const char *,
|
||||||
struct servent *, char *, int));
|
struct servent *, char *, int));
|
||||||
struct servent *getservent_r __P((struct servent *, char *, int));
|
struct servent *getservent_r __P((struct servent *, char *, int));
|
||||||
|
#endif
|
||||||
void setservent_r __P((int));
|
void setservent_r __P((int));
|
||||||
void endservent_r __P((void));
|
void endservent_r __P((void));
|
||||||
|
|
||||||
|
#ifdef __GLIBC__
|
||||||
/* BeOS specific, because of lack of UNIX passwd functions */
|
int getnetgrent_r __P((char **, char **, char **, char *, size_t));
|
||||||
int getusername(char *username, unsigned userlen);
|
#endif
|
||||||
int getpassword(char *password, unsigned passlen);
|
#ifdef _AIX
|
||||||
|
int setnetgrent_r __P((char *, void **));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
/* This is nec'y to make this include file properly replace the sun version. */
|
||||||
|
#ifdef sun
|
||||||
|
#ifdef __GNU_LIBRARY__
|
||||||
|
#include <rpc/netdb.h>
|
||||||
|
#else
|
||||||
|
struct rpcent {
|
||||||
|
char *r_name; /* name of server for this rpc program */
|
||||||
|
char **r_aliases; /* alias list */
|
||||||
|
int r_number; /* rpc program number */
|
||||||
|
};
|
||||||
|
struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
|
||||||
|
#endif /* __GNU_LIBRARY__ */
|
||||||
|
#endif /* sun */
|
||||||
|
|
||||||
#endif /* !_NETDB_H_ */
|
#endif /* !_NETDB_H_ */
|
||||||
|
501
headers/legacy/network/resolv.h
Normal file
501
headers/legacy/network/resolv.h
Normal file
@ -0,0 +1,501 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 1983, 1987, 1989
|
||||||
|
* The Regents of the University of California. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed by the University of
|
||||||
|
* California, Berkeley and its contributors.
|
||||||
|
* 4. Neither the name of the University nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _RESOLV_H_
|
||||||
|
#define _RESOLV_H_
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
#if (!defined(BSD)) || (BSD < 199306)
|
||||||
|
# include <sys/bitypes.h>
|
||||||
|
#else
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <arpa/nameser.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Revision information. This is the release date in YYYYMMDD format.
|
||||||
|
* It can change every day so the right thing to do with it is use it
|
||||||
|
* in preprocessor commands such as "#if (__RES > 19931104)". Do not
|
||||||
|
* compare for equality; rather, use it to determine whether your resolver
|
||||||
|
* is new enough to contain a certain feature.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __RES 20030124
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This used to be defined in res_query.c, now it's in herror.c.
|
||||||
|
* [XXX no it's not. It's in irs/irs_data.c]
|
||||||
|
* It was
|
||||||
|
* never extern'd by any *.h file before it was placed here. For thread
|
||||||
|
* aware programs, the last h_errno value set is stored in res->h_errno.
|
||||||
|
*
|
||||||
|
* XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO
|
||||||
|
* (and __h_errno_set) to the public via <resolv.h>.
|
||||||
|
* XXX: __h_errno_set is really part of IRS, not part of the resolver.
|
||||||
|
* If somebody wants to build and use a resolver that doesn't use IRS,
|
||||||
|
* what do they do? Perhaps something like
|
||||||
|
* #ifdef WANT_IRS
|
||||||
|
* # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
|
||||||
|
* #else
|
||||||
|
* # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x))
|
||||||
|
* #endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
|
||||||
|
struct __res_state; /* forward */
|
||||||
|
__BEGIN_DECLS
|
||||||
|
void __h_errno_set(struct __res_state *res, int err);
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolver configuration file.
|
||||||
|
* Normally not present, but may contain the address of the
|
||||||
|
* initial name server(s) to query and the domain search list.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _PATH_RESCONF
|
||||||
|
#define _PATH_RESCONF "/etc/resolv.conf"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
|
||||||
|
res_sendhookact;
|
||||||
|
|
||||||
|
#ifndef __PMT
|
||||||
|
#if defined(__STDC__) || defined(__cplusplus)
|
||||||
|
#define __PMT(args) args
|
||||||
|
#else
|
||||||
|
#define __PMT(args) ()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef res_sendhookact (*res_send_qhook)__PMT((struct sockaddr * const *,
|
||||||
|
const u_char **, int *,
|
||||||
|
u_char *, int, int *));
|
||||||
|
|
||||||
|
typedef res_sendhookact (*res_send_rhook)__PMT((const struct sockaddr *,
|
||||||
|
const u_char *, int, u_char *,
|
||||||
|
int, int *));
|
||||||
|
|
||||||
|
struct res_sym {
|
||||||
|
int number; /* Identifying number, like T_MX */
|
||||||
|
const char * name; /* Its symbolic name, like "MX" */
|
||||||
|
const char * humanname; /* Its fun name, like "mail exchanger" */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global defines and variables for resolver stub.
|
||||||
|
*/
|
||||||
|
#define MAXNS 3 /* max # name servers we'll track */
|
||||||
|
#define MAXDFLSRCH 3 /* # default domain levels to try */
|
||||||
|
#define MAXDNSRCH 6 /* max # domains in search path */
|
||||||
|
#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
|
||||||
|
|
||||||
|
#define RES_TIMEOUT 5 /* min. seconds between retries */
|
||||||
|
#define MAXRESOLVSORT 10 /* number of net to sort on */
|
||||||
|
#define RES_MAXNDOTS 15 /* should reflect bit field size */
|
||||||
|
#define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */
|
||||||
|
#define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */
|
||||||
|
#define RES_DFLRETRY 2 /* Default #/tries. */
|
||||||
|
#define RES_MAXTIME 65535 /* Infinity, in milliseconds. */
|
||||||
|
|
||||||
|
struct __res_state_ext;
|
||||||
|
|
||||||
|
struct __res_state {
|
||||||
|
int retrans; /* retransmission time interval */
|
||||||
|
int retry; /* number of times to retransmit */
|
||||||
|
#ifdef sun
|
||||||
|
u_int options; /* option flags - see below. */
|
||||||
|
#else
|
||||||
|
u_long options; /* option flags - see below. */
|
||||||
|
#endif
|
||||||
|
int nscount; /* number of name servers */
|
||||||
|
struct sockaddr_in
|
||||||
|
nsaddr_list[MAXNS]; /* address of name server */
|
||||||
|
#define nsaddr nsaddr_list[0] /* for backward compatibility */
|
||||||
|
u_short id; /* current message id */
|
||||||
|
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
|
||||||
|
char defdname[256]; /* default domain (deprecated) */
|
||||||
|
#ifdef sun
|
||||||
|
u_int pfcode; /* RES_PRF_ flags - see below. */
|
||||||
|
#else
|
||||||
|
u_long pfcode; /* RES_PRF_ flags - see below. */
|
||||||
|
#endif
|
||||||
|
unsigned ndots:4; /* threshold for initial abs. query */
|
||||||
|
unsigned nsort:4; /* number of elements in sort_list[] */
|
||||||
|
char unused[3];
|
||||||
|
struct {
|
||||||
|
struct in_addr addr;
|
||||||
|
u_int32_t mask;
|
||||||
|
} sort_list[MAXRESOLVSORT];
|
||||||
|
res_send_qhook qhook; /* query hook */
|
||||||
|
res_send_rhook rhook; /* response hook */
|
||||||
|
int res_h_errno; /* last one set for this context */
|
||||||
|
int _vcsock; /* PRIVATE: for res_send VC i/o */
|
||||||
|
u_int _flags; /* PRIVATE: see below */
|
||||||
|
u_int _pad; /* make _u 64 bit aligned */
|
||||||
|
union {
|
||||||
|
/* On an 32-bit arch this means 512b total. */
|
||||||
|
char pad[72 - 4*sizeof (int) - 2*sizeof (void *)];
|
||||||
|
struct {
|
||||||
|
u_int16_t nscount;
|
||||||
|
u_int16_t nstimes[MAXNS]; /* ms. */
|
||||||
|
int nssocks[MAXNS];
|
||||||
|
struct __res_state_ext *ext; /* extention for IPv6 */
|
||||||
|
} _ext;
|
||||||
|
} _u;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct __res_state *res_state;
|
||||||
|
|
||||||
|
union res_sockaddr_union {
|
||||||
|
struct sockaddr_in sin;
|
||||||
|
#ifdef IN6ADDR_ANY_INIT
|
||||||
|
struct sockaddr_in6 sin6;
|
||||||
|
#endif
|
||||||
|
#ifdef ISC_ALIGN64
|
||||||
|
int64_t __align64; /* 64bit alignment */
|
||||||
|
#else
|
||||||
|
int32_t __align32; /* 32bit alignment */
|
||||||
|
#endif
|
||||||
|
char __space[128]; /* max size */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolver flags (used to be discrete per-module statics ints).
|
||||||
|
*/
|
||||||
|
#define RES_F_VC 0x00000001 /* socket is TCP */
|
||||||
|
#define RES_F_CONN 0x00000002 /* socket is connected */
|
||||||
|
#define RES_F_EDNS0ERR 0x00000004 /* EDNS0 caused errors */
|
||||||
|
#define RES_F__UNUSED 0x00000008 /* (unused) */
|
||||||
|
#define RES_F_LASTMASK 0x000000F0 /* ordinal server of last res_nsend */
|
||||||
|
#define RES_F_LASTSHIFT 4 /* bit position of LASTMASK "flag" */
|
||||||
|
#define RES_GETLAST(res) (((res)._flags & RES_F_LASTMASK) >> RES_F_LASTSHIFT)
|
||||||
|
|
||||||
|
/* res_findzonecut2() options */
|
||||||
|
#define RES_EXHAUSTIVE 0x00000001 /* always do all queries */
|
||||||
|
#define RES_IPV4ONLY 0x00000002 /* IPv4 only */
|
||||||
|
#define RES_IPV6ONLY 0x00000004 /* IPv6 only */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolver options (keep these in synch with res_debug.c, please)
|
||||||
|
*/
|
||||||
|
#define RES_INIT 0x00000001 /* address initialized */
|
||||||
|
#define RES_DEBUG 0x00000002 /* print debug messages */
|
||||||
|
#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
|
||||||
|
#define RES_USEVC 0x00000008 /* use virtual circuit */
|
||||||
|
#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
|
||||||
|
#define RES_IGNTC 0x00000020 /* ignore trucation errors */
|
||||||
|
#define RES_RECURSE 0x00000040 /* recursion desired */
|
||||||
|
#define RES_DEFNAMES 0x00000080 /* use default domain name */
|
||||||
|
#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
|
||||||
|
#define RES_DNSRCH 0x00000200 /* search up local domain tree */
|
||||||
|
#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
|
||||||
|
#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
|
||||||
|
#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
|
||||||
|
#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
|
||||||
|
#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
|
||||||
|
#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
|
||||||
|
#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
|
||||||
|
#define RES_BLAST 0x00020000 /* blast all recursive servers */
|
||||||
|
#define RES_NOTLDQUERY 0x00100000 /* don't unqualified name as a tld */
|
||||||
|
#define RES_USE_DNSSEC 0x00200000 /* use DNSSEC using OK bit in OPT */
|
||||||
|
/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */
|
||||||
|
/* KAME extensions: use higher bit to avoid conflict with ISC use */
|
||||||
|
#define RES_USE_DNAME 0x10000000 /* use DNAME */
|
||||||
|
#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
|
||||||
|
#define RES_NO_NIBBLE2 0x80000000 /* disable alternate nibble lookup */
|
||||||
|
|
||||||
|
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \
|
||||||
|
RES_DNSRCH | RES_NO_NIBBLE2)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolver "pfcode" values. Used by dig.
|
||||||
|
*/
|
||||||
|
#define RES_PRF_STATS 0x00000001
|
||||||
|
#define RES_PRF_UPDATE 0x00000002
|
||||||
|
#define RES_PRF_CLASS 0x00000004
|
||||||
|
#define RES_PRF_CMD 0x00000008
|
||||||
|
#define RES_PRF_QUES 0x00000010
|
||||||
|
#define RES_PRF_ANS 0x00000020
|
||||||
|
#define RES_PRF_AUTH 0x00000040
|
||||||
|
#define RES_PRF_ADD 0x00000080
|
||||||
|
#define RES_PRF_HEAD1 0x00000100
|
||||||
|
#define RES_PRF_HEAD2 0x00000200
|
||||||
|
#define RES_PRF_TTLID 0x00000400
|
||||||
|
#define RES_PRF_HEADX 0x00000800
|
||||||
|
#define RES_PRF_QUERY 0x00001000
|
||||||
|
#define RES_PRF_REPLY 0x00002000
|
||||||
|
#define RES_PRF_INIT 0x00004000
|
||||||
|
#define RES_PRF_TRUNC 0x00008000
|
||||||
|
/* 0x00010000 */
|
||||||
|
|
||||||
|
/* Things involving an internal (static) resolver context. */
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
__BEGIN_DECLS
|
||||||
|
extern struct __res_state *__res_state(void);
|
||||||
|
__END_DECLS
|
||||||
|
#define _res (*__res_state())
|
||||||
|
#else
|
||||||
|
#ifndef __BIND_NOSTATIC
|
||||||
|
extern struct __res_state _res;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __BIND_NOSTATIC
|
||||||
|
#define fp_nquery __fp_nquery
|
||||||
|
#define fp_query __fp_query
|
||||||
|
#define hostalias __hostalias
|
||||||
|
#define p_query __p_query
|
||||||
|
#define res_close __res_close
|
||||||
|
#define res_init __res_init
|
||||||
|
#define res_isourserver __res_isourserver
|
||||||
|
#define res_mkquery __res_mkquery
|
||||||
|
#define res_query __res_query
|
||||||
|
#define res_querydomain __res_querydomain
|
||||||
|
#define res_search __res_search
|
||||||
|
#define res_send __res_send
|
||||||
|
#define res_sendsigned __res_sendsigned
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
void fp_nquery __P((const u_char *, int, FILE *));
|
||||||
|
void fp_query __P((const u_char *, FILE *));
|
||||||
|
const char * hostalias __P((const char *));
|
||||||
|
void p_query __P((const u_char *));
|
||||||
|
void res_close __P((void));
|
||||||
|
int res_init __P((void));
|
||||||
|
int res_isourserver __P((const struct sockaddr_in *));
|
||||||
|
int res_mkquery __P((int, const char *, int, int, const u_char *,
|
||||||
|
int, const u_char *, u_char *, int));
|
||||||
|
int res_query __P((const char *, int, int, u_char *, int));
|
||||||
|
int res_querydomain __P((const char *, const char *, int, int,
|
||||||
|
u_char *, int));
|
||||||
|
int res_search __P((const char *, int, int, u_char *, int));
|
||||||
|
int res_send __P((const u_char *, int, u_char *, int));
|
||||||
|
int res_sendsigned __P((const u_char *, int, ns_tsig_key *,
|
||||||
|
u_char *, int));
|
||||||
|
__END_DECLS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(SHARED_LIBBIND) || defined(LIB)
|
||||||
|
/*
|
||||||
|
* If libbind is a shared object (well, DLL anyway)
|
||||||
|
* these externs break the linker when resolv.h is
|
||||||
|
* included by a lib client (like named)
|
||||||
|
* Make them go away if a client is including this
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
extern const struct res_sym __p_key_syms[];
|
||||||
|
extern const struct res_sym __p_cert_syms[];
|
||||||
|
extern const struct res_sym __p_class_syms[];
|
||||||
|
extern const struct res_sym __p_type_syms[];
|
||||||
|
extern const struct res_sym __p_rcode_syms[];
|
||||||
|
#endif /* SHARED_LIBBIND */
|
||||||
|
|
||||||
|
#define b64_ntop __b64_ntop
|
||||||
|
#define b64_pton __b64_pton
|
||||||
|
#define dn_comp __dn_comp
|
||||||
|
#define dn_count_labels __dn_count_labels
|
||||||
|
#define dn_expand __dn_expand
|
||||||
|
#define dn_skipname __dn_skipname
|
||||||
|
#define fp_resstat __fp_resstat
|
||||||
|
#define loc_aton __loc_aton
|
||||||
|
#define loc_ntoa __loc_ntoa
|
||||||
|
#define p_cdname __p_cdname
|
||||||
|
#define p_cdnname __p_cdnname
|
||||||
|
#define p_class __p_class
|
||||||
|
#define p_fqname __p_fqname
|
||||||
|
#define p_fqnname __p_fqnname
|
||||||
|
#define p_option __p_option
|
||||||
|
#define p_secstodate __p_secstodate
|
||||||
|
#define p_section __p_section
|
||||||
|
#define p_time __p_time
|
||||||
|
#define p_type __p_type
|
||||||
|
#define p_rcode __p_rcode
|
||||||
|
#define p_sockun __p_sockun
|
||||||
|
#define putlong __putlong
|
||||||
|
#define putshort __putshort
|
||||||
|
#define res_dnok __res_dnok
|
||||||
|
#define res_findzonecut __res_findzonecut
|
||||||
|
#define res_findzonecut2 __res_findzonecut2
|
||||||
|
#define res_hnok __res_hnok
|
||||||
|
#define res_hostalias __res_hostalias
|
||||||
|
#define res_mailok __res_mailok
|
||||||
|
#define res_nameinquery __res_nameinquery
|
||||||
|
#define res_nclose __res_nclose
|
||||||
|
#define res_ninit __res_ninit
|
||||||
|
#define res_nmkquery __res_nmkquery
|
||||||
|
#define res_pquery __res_pquery
|
||||||
|
#define res_nquery __res_nquery
|
||||||
|
#define res_nquerydomain __res_nquerydomain
|
||||||
|
#define res_nsearch __res_nsearch
|
||||||
|
#define res_nsend __res_nsend
|
||||||
|
#define res_nsendsigned __res_nsendsigned
|
||||||
|
#define res_nisourserver __res_nisourserver
|
||||||
|
#define res_ownok __res_ownok
|
||||||
|
#define res_queriesmatch __res_queriesmatch
|
||||||
|
#define res_randomid __res_randomid
|
||||||
|
#define sym_ntop __sym_ntop
|
||||||
|
#define sym_ntos __sym_ntos
|
||||||
|
#define sym_ston __sym_ston
|
||||||
|
#define res_nopt __res_nopt
|
||||||
|
#define res_ndestroy __res_ndestroy
|
||||||
|
#define res_nametoclass __res_nametoclass
|
||||||
|
#define res_nametotype __res_nametotype
|
||||||
|
#define res_setservers __res_setservers
|
||||||
|
#define res_getservers __res_getservers
|
||||||
|
#define res_buildprotolist __res_buildprotolist
|
||||||
|
#define res_destroyprotolist __res_destroyprotolist
|
||||||
|
#define res_destroyservicelist __res_destroyservicelist
|
||||||
|
#define res_get_nibblesuffix __res_get_nibblesuffix
|
||||||
|
#define res_get_nibblesuffix2 __res_get_nibblesuffix2
|
||||||
|
#define res_ourserver_p __res_ourserver_p
|
||||||
|
#define res_protocolname __res_protocolname
|
||||||
|
#define res_protocolnumber __res_protocolnumber
|
||||||
|
#define res_send_setqhook __res_send_setqhook
|
||||||
|
#define res_send_setrhook __res_send_setrhook
|
||||||
|
#define res_servicename __res_servicename
|
||||||
|
#define res_servicenumber __res_servicenumber
|
||||||
|
__BEGIN_DECLS
|
||||||
|
int res_hnok __P((const char *));
|
||||||
|
int res_ownok __P((const char *));
|
||||||
|
int res_mailok __P((const char *));
|
||||||
|
int res_dnok __P((const char *));
|
||||||
|
int sym_ston __P((const struct res_sym *, const char *, int *));
|
||||||
|
const char * sym_ntos __P((const struct res_sym *, int, int *));
|
||||||
|
const char * sym_ntop __P((const struct res_sym *, int, int *));
|
||||||
|
int b64_ntop __P((u_char const *, size_t, char *, size_t));
|
||||||
|
int b64_pton __P((char const *, u_char *, size_t));
|
||||||
|
int loc_aton __P((const char *, u_char *));
|
||||||
|
const char * loc_ntoa __P((const u_char *, char *));
|
||||||
|
int dn_skipname __P((const u_char *, const u_char *));
|
||||||
|
void putlong __P((u_int32_t, u_char *));
|
||||||
|
void putshort __P((u_int16_t, u_char *));
|
||||||
|
#ifndef __ultrix__
|
||||||
|
u_int16_t _getshort __P((const u_char *));
|
||||||
|
u_int32_t _getlong __P((const u_char *));
|
||||||
|
#endif
|
||||||
|
const char * p_class __P((int));
|
||||||
|
const char * p_time __P((u_int32_t));
|
||||||
|
const char * p_type __P((int));
|
||||||
|
const char * p_rcode __P((int));
|
||||||
|
const char * p_sockun __P((union res_sockaddr_union, char *, size_t));
|
||||||
|
const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
|
||||||
|
const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
|
||||||
|
const u_char * p_fqnname __P((const u_char *, const u_char *,
|
||||||
|
int, char *, int));
|
||||||
|
const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
|
||||||
|
const char * p_option __P((u_long));
|
||||||
|
char * p_secstodate __P((u_long));
|
||||||
|
int dn_count_labels __P((const char *));
|
||||||
|
int dn_comp __P((const char *, u_char *, int,
|
||||||
|
u_char **, u_char **));
|
||||||
|
int dn_expand __P((const u_char *, const u_char *, const u_char *,
|
||||||
|
char *, int));
|
||||||
|
u_int res_randomid __P((void));
|
||||||
|
int res_nameinquery __P((const char *, int, int, const u_char *,
|
||||||
|
const u_char *));
|
||||||
|
int res_queriesmatch __P((const u_char *, const u_char *,
|
||||||
|
const u_char *, const u_char *));
|
||||||
|
const char * p_section __P((int, int));
|
||||||
|
/* Things involving a resolver context. */
|
||||||
|
int res_ninit __P((res_state));
|
||||||
|
int res_nisourserver __P((const res_state,
|
||||||
|
const struct sockaddr_in *));
|
||||||
|
void fp_resstat __P((const res_state, FILE *));
|
||||||
|
void res_pquery __P((const res_state, const u_char *, int, FILE *));
|
||||||
|
const char * res_hostalias __P((const res_state, const char *,
|
||||||
|
char *, size_t));
|
||||||
|
int res_nquery __P((res_state, const char *, int, int,
|
||||||
|
u_char *, int));
|
||||||
|
int res_nsearch __P((res_state, const char *, int, int, u_char *,
|
||||||
|
int));
|
||||||
|
int res_nquerydomain __P((res_state, const char *, const char *,
|
||||||
|
int, int, u_char *, int));
|
||||||
|
int res_nmkquery __P((res_state, int, const char *, int, int,
|
||||||
|
const u_char *, int, const u_char *,
|
||||||
|
u_char *, int));
|
||||||
|
int res_nsend __P((res_state, const u_char *, int, u_char *, int));
|
||||||
|
int res_nsendsigned __P((res_state, const u_char *, int,
|
||||||
|
ns_tsig_key *, u_char *, int));
|
||||||
|
int res_findzonecut __P((res_state, const char *, ns_class, int,
|
||||||
|
char *, size_t, struct in_addr *, int));
|
||||||
|
int res_findzonecut2 __P((res_state, const char *, ns_class, int,
|
||||||
|
char *, size_t,
|
||||||
|
union res_sockaddr_union *, int));
|
||||||
|
void res_nclose __P((res_state));
|
||||||
|
int res_nopt __P((res_state, int, u_char *, int, int));
|
||||||
|
void res_send_setqhook __P((res_send_qhook));
|
||||||
|
void res_send_setrhook __P((res_send_rhook));
|
||||||
|
int __res_vinit __P((res_state, int));
|
||||||
|
void res_destroyservicelist __P((void));
|
||||||
|
const char * res_servicename __P((u_int16_t, const char *));
|
||||||
|
const char * res_protocolname __P((int));
|
||||||
|
void res_destroyprotolist __P((void));
|
||||||
|
void res_buildprotolist __P((void));
|
||||||
|
const char * res_get_nibblesuffix __P((res_state));
|
||||||
|
const char * res_get_nibblesuffix2 __P((res_state));
|
||||||
|
void res_ndestroy __P((res_state));
|
||||||
|
u_int16_t res_nametoclass __P((const char *, int *));
|
||||||
|
u_int16_t res_nametotype __P((const char *, int *));
|
||||||
|
void res_setservers __P((res_state,
|
||||||
|
const union res_sockaddr_union *, int));
|
||||||
|
int res_getservers __P((res_state,
|
||||||
|
union res_sockaddr_union *, int));
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
#endif /* !_RESOLV_H_ */
|
62
headers/legacy/network/sys/select.h
Normal file
62
headers/legacy/network/sys/select.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#ifndef _SYS_SELECT_H
|
||||||
|
#define _SYS_SELECT_H
|
||||||
|
/*
|
||||||
|
** Distributed under the terms of the OpenBeOS License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* If FD_SET is already defined, only the select() prototype is
|
||||||
|
* exported in this header.
|
||||||
|
*/
|
||||||
|
#ifndef FD_SET
|
||||||
|
|
||||||
|
/* You can define your own FDSETSIZE if you need more bits - but
|
||||||
|
* it should be enough for most uses.
|
||||||
|
*/
|
||||||
|
#ifndef FD_SETSIZE
|
||||||
|
# define FD_SETSIZE 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef unsigned long fd_mask;
|
||||||
|
|
||||||
|
#ifndef _howmany
|
||||||
|
# define _howmany(x, y) (((x) + ((y) - 1)) / (y))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NFDBITS (sizeof(fd_mask) * 8) /* bits per mask */
|
||||||
|
|
||||||
|
typedef struct fd_set {
|
||||||
|
fd_mask bits[_howmany(FD_SETSIZE, NFDBITS)];
|
||||||
|
} fd_set;
|
||||||
|
|
||||||
|
#define _FD_BITSINDEX(fd) ((fd) / NFDBITS)
|
||||||
|
#define _FD_BIT(fd) (1L << ((fd) % NFDBITS))
|
||||||
|
|
||||||
|
#define FD_ZERO(set) memset((set), 0, sizeof(fd_set))
|
||||||
|
#define FD_SET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] |= _FD_BIT(fd))
|
||||||
|
#define FD_CLR(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] &= ~_FD_BIT(fd))
|
||||||
|
#define FD_ISSET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] & _FD_BIT(fd))
|
||||||
|
|
||||||
|
#endif /* FD_SET */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
extern int pselect(int numBits, struct fd_set *readBits, struct fd_set *writeBits,
|
||||||
|
struct fd_set *errorBits, const struct timespec *timeout, const sigset_t *sigMask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int select(int numBits, struct fd_set *readBits, struct fd_set *writeBits,
|
||||||
|
struct fd_set *errorBits, struct timeval *timeout);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _SYS_SELECT_H */
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#if (BSD >= 199103)
|
#if (BSD >= 199103)
|
||||||
# include <machine/endian.h>
|
# include <machine/endian.h>
|
||||||
#else
|
#else
|
||||||
#if defined(linux) || defined(__BEOS__)
|
#if defined(__linux) || defined(__HAIKU__) || defined(__BEOS__)
|
||||||
# include <endian.h>
|
# include <endian.h>
|
||||||
#else
|
#else
|
||||||
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
|
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
|
||||||
@ -65,12 +65,12 @@
|
|||||||
defined(__hppa) || defined(__hp9000) || \
|
defined(__hppa) || defined(__hp9000) || \
|
||||||
defined(__hp9000s300) || defined(__hp9000s700) || \
|
defined(__hp9000s300) || defined(__hp9000s700) || \
|
||||||
defined(__hp3000s900) || defined(__hpux) || defined(MPE) || \
|
defined(__hp3000s900) || defined(__hpux) || defined(MPE) || \
|
||||||
defined (BIT_ZERO_ON_LEFT) || defined(m68k) || \
|
defined (BIT_ZERO_ON_LEFT) || defined(m68k) || defined(__sparc) || \
|
||||||
(defined(__Lynx__) && \
|
(defined(__Lynx__) && \
|
||||||
(defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
|
(defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
|
||||||
#define BYTE_ORDER BIG_ENDIAN
|
#define BYTE_ORDER BIG_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
#endif /* linux */
|
#endif /* __linux */
|
||||||
#endif /* BSD */
|
#endif /* BSD */
|
||||||
#endif /* BYTE_ORDER */
|
#endif /* BYTE_ORDER */
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1999 by Internet Software Consortium.
|
* Copyright (c) 1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1997-1999 by Internet Software Consortium.
|
* Copyright (c) 1997-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
#define ISC_CTL_H
|
#define ISC_CTL_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-1999 by Internet Software Consortium
|
* Copyright (c) 1995-1999 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eventlib.h - exported interfaces for eventlib
|
/* eventlib.h - exported interfaces for eventlib
|
||||||
@ -85,6 +85,8 @@ typedef struct { unsigned char mask[256/8]; } evByteMask;
|
|||||||
#define evDrop __evDrop
|
#define evDrop __evDrop
|
||||||
#define evMainLoop __evMainLoop
|
#define evMainLoop __evMainLoop
|
||||||
#define evHighestFD __evHighestFD
|
#define evHighestFD __evHighestFD
|
||||||
|
#define evGetOption __evGetOption
|
||||||
|
#define evSetOption __evSetOption
|
||||||
|
|
||||||
int evCreate __P((evContext *));
|
int evCreate __P((evContext *));
|
||||||
void evSetDebug __P((evContext, int, FILE *));
|
void evSetDebug __P((evContext, int, FILE *));
|
||||||
@ -94,6 +96,8 @@ int evDispatch __P((evContext, evEvent));
|
|||||||
void evDrop __P((evContext, evEvent));
|
void evDrop __P((evContext, evEvent));
|
||||||
int evMainLoop __P((evContext));
|
int evMainLoop __P((evContext));
|
||||||
int evHighestFD __P((evContext));
|
int evHighestFD __P((evContext));
|
||||||
|
int evGetOption __P((evContext *, const char *, int *));
|
||||||
|
int evSetOption __P((evContext *, const char *, int));
|
||||||
|
|
||||||
/* ev_connects.c */
|
/* ev_connects.c */
|
||||||
#define evListen __evListen
|
#define evListen __evListen
|
||||||
@ -144,9 +148,11 @@ int evCancelRW __P((evContext, evStreamID));
|
|||||||
#define evTimeVal __evTimeVal
|
#define evTimeVal __evTimeVal
|
||||||
|
|
||||||
#define evNowTime __evNowTime
|
#define evNowTime __evNowTime
|
||||||
|
#define evUTCTime __evUTCTime
|
||||||
#define evLastEventTime __evLastEventTime
|
#define evLastEventTime __evLastEventTime
|
||||||
#define evSetTimer __evSetTimer
|
#define evSetTimer __evSetTimer
|
||||||
#define evClearTimer __evClearTimer
|
#define evClearTimer __evClearTimer
|
||||||
|
#define evConfigTimer __evConfigTimer
|
||||||
#define evResetTimer __evResetTimer
|
#define evResetTimer __evResetTimer
|
||||||
#define evSetIdleTimer __evSetIdleTimer
|
#define evSetIdleTimer __evSetIdleTimer
|
||||||
#define evClearIdleTimer __evClearIdleTimer
|
#define evClearIdleTimer __evClearIdleTimer
|
||||||
@ -157,6 +163,7 @@ struct timespec evConsTime __P((time_t sec, long nsec));
|
|||||||
struct timespec evAddTime __P((struct timespec, struct timespec));
|
struct timespec evAddTime __P((struct timespec, struct timespec));
|
||||||
struct timespec evSubTime __P((struct timespec, struct timespec));
|
struct timespec evSubTime __P((struct timespec, struct timespec));
|
||||||
struct timespec evNowTime __P((void));
|
struct timespec evNowTime __P((void));
|
||||||
|
struct timespec evUTCTime __P((void));
|
||||||
struct timespec evLastEventTime __P((evContext));
|
struct timespec evLastEventTime __P((evContext));
|
||||||
struct timespec evTimeSpec __P((struct timeval));
|
struct timespec evTimeSpec __P((struct timeval));
|
||||||
struct timeval evTimeVal __P((struct timespec));
|
struct timeval evTimeVal __P((struct timespec));
|
||||||
@ -164,6 +171,8 @@ int evCmpTime __P((struct timespec, struct timespec));
|
|||||||
int evSetTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
int evSetTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
||||||
struct timespec, evTimerID *));
|
struct timespec, evTimerID *));
|
||||||
int evClearTimer __P((evContext, evTimerID));
|
int evClearTimer __P((evContext, evTimerID));
|
||||||
|
int evConfigTimer __P((evContext, evTimerID, const char *param,
|
||||||
|
int value));
|
||||||
int evResetTimer __P((evContext, evTimerID, evTimerFunc, void *,
|
int evResetTimer __P((evContext, evTimerID, evTimerFunc, void *,
|
||||||
struct timespec, struct timespec));
|
struct timespec, struct timespec));
|
||||||
int evSetIdleTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
int evSetIdleTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef int (*heap_higher_priority_func)(void *, void *);
|
typedef int (*heap_higher_priority_func)(void *, void *);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1999 by Internet Software Consortium.
|
* Copyright (c) 1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIST_H
|
#ifndef LIST_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LOGGING_H
|
#ifndef LOGGING_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
* Copyright (c) 1997,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MEMCLUSTER_H
|
#ifndef MEMCLUSTER_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-1999 by Internet Software Consortium
|
* Copyright (c) 1995-1999 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
#ifndef netgroup_h
|
#ifndef netgroup_h
|
||||||
#define netgroup_h
|
#define netgroup_h
|
||||||
|
#ifndef __GLIBC__
|
||||||
|
|
||||||
int getnetgrent(const char **machinep, const char **userp,
|
/*
|
||||||
const char **domainp);
|
* The standard is crazy. These values "belong" to getnetgrent() and
|
||||||
|
* shouldn't be altered by the caller.
|
||||||
|
*/
|
||||||
|
int getnetgrent __P((/* const */ char **, /* const */ char **,
|
||||||
|
/* const */ char **));
|
||||||
|
|
||||||
int getnetgrent_r(char **machinep, char **userp, char **domainp,
|
int getnetgrent_r __P((char **, char **, char **, char *, int));
|
||||||
char *buffer, int buflen);
|
|
||||||
|
|
||||||
void setnetgrent(const char *netgroup);
|
void endnetgrent __P((void));
|
||||||
|
|
||||||
void endnetgrent(void);
|
|
||||||
|
|
||||||
int innetgr(const char *netgroup, const char *machine,
|
|
||||||
const char *user, const char *domain);
|
|
||||||
|
|
||||||
|
#ifdef __osf__
|
||||||
|
int innetgr __P((char *, char *, char *, char *));
|
||||||
|
void setnetgrent __P((char *));
|
||||||
|
#else
|
||||||
|
void setnetgrent __P((const char *));
|
||||||
|
int innetgr __P((const char *, const char *, const char *, const char *));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1999 by Internet Software Consortium, Inc.
|
* Copyright (c) 1999 by Internet Software Consortium, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
BIND 9.2.3 ported to Haiku
|
BIND 9.3.1
|
||||||
|
ported to Haiku
|
||||||
|
|
||||||
This file contains important information for developers who want to port BIND to Haiku.
|
This file contains important information for developers who want to update this BIND port.
|
||||||
I created config.h, port_before.h, and port_after.h with the BIND configure script and fixed some mistakes that the script made.
|
I created config.h, port_before.h, and port_after.h with "configure --enable-threads --disable-ipv6" on a BONE-compatible system and fixed some mistakes that the script made. All changes to these three files are marked with a comment containing the keyword CHANGED.
|
||||||
|
|
||||||
Our private folder are:
|
Our private folder are:
|
||||||
headers (some headers are not defined in Haiku)
|
headers (some headers are not defined in Haiku)
|
||||||
@ -10,15 +11,12 @@ Our private folder are:
|
|||||||
Porting issues:
|
Porting issues:
|
||||||
BIND wants to include sys/un.h and utmp.h. We do not have these, so I put empty headers into the private headers folder.
|
BIND wants to include sys/un.h and utmp.h. We do not have these, so I put empty headers into the private headers folder.
|
||||||
|
|
||||||
strsep() is not defined although we #define NEED_STRSEP in port_after.h. I put it in our private src folder.
|
Added a hacky workaround when building for non-Haiku targets: select.h (in legacy headers) only declares pselect() for Haiku.
|
||||||
|
|
||||||
Haiku defines pselect(), we turn on NEEDS_PSELECT in port_after.h only if we compile for BeOS.
|
|
||||||
|
|
||||||
Added sources for compatibility:
|
Added sources for compatibility:
|
||||||
src/res_resultcodes.c: BONE's host command wants _res_resultcodes to be defined
|
src/res_resultcodes.c: BONE's host command wants _res_resultcodes to be defined
|
||||||
|
|
||||||
Changes made to the sources and headers:
|
Changes made to the sources and headers:
|
||||||
netdb.h and resolv.h: simplified by removing unneeded checks for other platforms
|
nameser_compat.h: added check for __HAIKU__ and __BEOS__ to not redefine endianness
|
||||||
|
|
||||||
irs/gai_strerror and irs/irs_data.c: Changed the initialization of the mutex lock and rewrote TLS to use BeOS functions
|
irs/gai_strerror and irs/irs_data.c: Changed the initialization of the mutex lock and rewrote two functions to use BeOS-native TLS.
|
||||||
because we do not have full pthread support.
|
|
||||||
|
@ -7,7 +7,7 @@ UsePrivateHeaders net ;
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers legacy network ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers legacy network ] : true ;
|
||||||
SubDirSysHdrs $(SUBDIR) ;
|
SubDirSysHdrs $(SUBDIR) ;
|
||||||
|
|
||||||
if ( $(TARGET_PLATFORM) != haiku ) {
|
if $(TARGET_PLATFORM) != haiku {
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers posix ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers posix ] : true ;
|
||||||
# We need the public network headers also when not compiling for Haiku.
|
# We need the public network headers also when not compiling for Haiku.
|
||||||
# Unfortunately we get more than we want, namely all POSIX headers.
|
# Unfortunately we get more than we want, namely all POSIX headers.
|
||||||
@ -193,6 +193,7 @@ SharedLibrary libbind.so :
|
|||||||
# private functions
|
# private functions
|
||||||
arc4random.c
|
arc4random.c
|
||||||
ethers.c
|
ethers.c
|
||||||
|
gettimeofday.c
|
||||||
linkaddr.c
|
linkaddr.c
|
||||||
pthread_emu.c
|
pthread_emu.c
|
||||||
res_resultcodes.c
|
res_resultcodes.c
|
||||||
|
@ -10,29 +10,29 @@
|
|||||||
/* #undef POSIX_GETGRGID_R */
|
/* #undef POSIX_GETGRGID_R */
|
||||||
/* #undef POSIX_GETGRNAM_R */
|
/* #undef POSIX_GETGRNAM_R */
|
||||||
|
|
||||||
/* #undef NEED_SETGROUPENT */
|
#define NEED_SETGROUPENT 1
|
||||||
/* #undef NEED_GETGROUPLIST */
|
#define NEED_GETGROUPLIST 1
|
||||||
|
|
||||||
/* define if prototype for getgrnam_r() is required */
|
/* define if prototype for getgrnam_r() is required */
|
||||||
/* #undef NEED_GETGRNAM_R */
|
#define NEED_GETGRNAM_R 1
|
||||||
/* #undef NEED_GETGRGID_R */
|
#define NEED_GETGRGID_R 1
|
||||||
/* #undef NEED_GETGRENT_R */
|
#define NEED_GETGRENT_R 1
|
||||||
/* #undef NEED_SETGRENT_R */
|
#define NEED_SETGRENT_R 1
|
||||||
/* #undef NEED_ENDGRENT_R */
|
#define NEED_ENDGRENT_R 1
|
||||||
|
|
||||||
/* #undef NEED_INNETGR_R */
|
#define NEED_INNETGR_R 1
|
||||||
/* #undef NEED_SETNETGRENT_R */
|
/* #undef NEED_SETNETGRENT_R */
|
||||||
/* #undef NEED_ENDNETGRENT_R */
|
#define NEED_ENDNETGRENT_R 1
|
||||||
|
|
||||||
/* #undef NEED_GETPWNAM_R */
|
#define NEED_GETPWNAM_R 1
|
||||||
/* #undef NEED_GETPWUID_R */
|
#define NEED_GETPWUID_R 1
|
||||||
/* #undef NEED_SETPWENT_R */
|
#define NEED_SETPWENT_R 1
|
||||||
/* #undef NEED_SETPASSENT_R */
|
#define NEED_SETPASSENT_R 1
|
||||||
/* #undef NEED_SETPWENT_R */
|
#define NEED_SETPWENT_R 1
|
||||||
/* #undef NEED_GETPWENT_R */
|
#define NEED_GETPWENT_R 1
|
||||||
/* #undef NEED_ENDPWENT_R */
|
#define NEED_ENDPWENT_R 1
|
||||||
|
|
||||||
/* #undef NEED_SETPASSENT */
|
#define NEED_SETPASSENT 1
|
||||||
|
|
||||||
/* #undef HAS_PW_CLASS */
|
/* #undef HAS_PW_CLASS */
|
||||||
|
|
||||||
@ -43,4 +43,12 @@ struct __sFILE;
|
|||||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||||
#endif
|
#endif
|
||||||
/* #undef BROKEN_IN6ADDR_INIT_MACROS */
|
/* #undef BROKEN_IN6ADDR_INIT_MACROS */
|
||||||
#define HAVE_STRLCAT 1
|
/* #undef HAVE_STRLCAT */
|
||||||
|
/* Shut up warnings about missing braces */
|
||||||
|
/* #undef SHUTUP_MUTEX_INITIALIZER */
|
||||||
|
#ifdef SHUTUP_MUTEX_INITIALIZER
|
||||||
|
#define LIBBIND_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
|
||||||
|
#else
|
||||||
|
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef LINT
|
#ifndef LINT
|
||||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/dst_api.c,v 1.1 2004/04/15 16:03:27 wkornew Exp $";
|
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.1 2004/09/16 00:57:33 marka Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -46,6 +46,7 @@ static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/n
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <memory.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -860,7 +861,8 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
|||||||
len = cnt;
|
len = cnt;
|
||||||
p = in_buff;
|
p = in_buff;
|
||||||
|
|
||||||
if (!dst_s_verify_str((const char **) &p, "Private-key-format: v")) {
|
if (!dst_s_verify_str((const char **) (void *)&p,
|
||||||
|
"Private-key-format: v")) {
|
||||||
EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
|
EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -878,7 +880,7 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
|||||||
|
|
||||||
while (*p++ != '\n') ; /* skip to end of line */
|
while (*p++ != '\n') ; /* skip to end of line */
|
||||||
|
|
||||||
if (!dst_s_verify_str((const char **) &p, "Algorithm: "))
|
if (!dst_s_verify_str((const char **) (void *)&p, "Algorithm: "))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (sscanf((char *)p, "%d", &alg) != 1)
|
if (sscanf((char *)p, "%d", &alg) != 1)
|
||||||
|
@ -73,7 +73,7 @@ typedef struct dst_key {
|
|||||||
#ifndef SAFE_FREE
|
#ifndef SAFE_FREE
|
||||||
#define SAFE_FREE(a) \
|
#define SAFE_FREE(a) \
|
||||||
do{if(a != NULL){memset(a,0, sizeof(*a)); free(a); a=NULL;}} while (0)
|
do{if(a != NULL){memset(a,0, sizeof(*a)); free(a); a=NULL;}} while (0)
|
||||||
#define SAFE_FREE2(a,s) if (a != NULL && s > 0){memset(a,0, s);free(a); a=NULL;}
|
#define SAFE_FREE2(a,s) if (a != NULL && (long)s > 0){memset(a,0, s);free(a); a=NULL;}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct dst_func {
|
typedef struct dst_func {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#ifdef HMAC_MD5
|
#ifdef HMAC_MD5
|
||||||
#ifndef LINT
|
#ifndef LINT
|
||||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/hmac_link.c,v 1.1 2004/04/15 16:03:27 wkornew Exp $";
|
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1 2003/06/27 03:51:36 marka Exp $";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
||||||
|
@ -99,7 +99,7 @@ unsigned long len;
|
|||||||
int sw,sc;
|
int sw,sc;
|
||||||
ULONG l;
|
ULONG l;
|
||||||
|
|
||||||
if (len == 0) return;
|
if (len == 0U) return;
|
||||||
|
|
||||||
l=(c->Nl+(len<<3))&0xffffffffL;
|
l=(c->Nl+(len<<3))&0xffffffffL;
|
||||||
/* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
|
/* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
|
||||||
@ -115,7 +115,7 @@ unsigned long len;
|
|||||||
sw=c->num>>2;
|
sw=c->num>>2;
|
||||||
sc=c->num&0x03;
|
sc=c->num&0x03;
|
||||||
|
|
||||||
if ((c->num+len) >= MD5_CBLOCK)
|
if ((c->num+len) >= (size_t)MD5_CBLOCK)
|
||||||
{
|
{
|
||||||
l= p[sw];
|
l= p[sw];
|
||||||
p_c2l(data,l,sc);
|
p_c2l(data,l,sc);
|
||||||
@ -136,7 +136,7 @@ unsigned long len;
|
|||||||
int ew,ec;
|
int ew,ec;
|
||||||
|
|
||||||
c->num+=(int)len;
|
c->num+=(int)len;
|
||||||
if ((sc+len) < 4) /* ugly, add char's to a word */
|
if ((sc+len) < 4U) /* ugly, add char's to a word */
|
||||||
{
|
{
|
||||||
l= p[sw];
|
l= p[sw];
|
||||||
p_c2l_p(data,l,sc,len);
|
p_c2l_p(data,l,sc,len);
|
||||||
@ -163,7 +163,7 @@ unsigned long len;
|
|||||||
/* we now can process the input data in blocks of MD5_CBLOCK
|
/* we now can process the input data in blocks of MD5_CBLOCK
|
||||||
* chars and save the leftovers to c->data. */
|
* chars and save the leftovers to c->data. */
|
||||||
p=c->data;
|
p=c->data;
|
||||||
while (len >= MD5_CBLOCK)
|
while (len >= (size_t)MD5_CBLOCK)
|
||||||
{
|
{
|
||||||
#if defined(L_ENDIAN) || defined(B_ENDIAN)
|
#if defined(L_ENDIAN) || defined(B_ENDIAN)
|
||||||
memcpy(p,data,MD5_CBLOCK);
|
memcpy(p,data,MD5_CBLOCK);
|
||||||
|
@ -101,9 +101,9 @@
|
|||||||
switch (sc) \
|
switch (sc) \
|
||||||
{ \
|
{ \
|
||||||
case 0: l =((unsigned long)(*((c)++))); \
|
case 0: l =((unsigned long)(*((c)++))); \
|
||||||
if (--len == 0) break; \
|
if (--len == 0U) break; \
|
||||||
case 1: l|=((unsigned long)(*((c)++)))<< 8; \
|
case 1: l|=((unsigned long)(*((c)++)))<< 8; \
|
||||||
if (--len == 0) break; \
|
if (--len == 0U) break; \
|
||||||
case 2: l|=((unsigned long)(*((c)++)))<<16; \
|
case 2: l|=((unsigned long)(*((c)++)))<<16; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/support.c,v 1.1 2004/04/15 16:03:28 wkornew Exp $";
|
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/support.c,v 1.2.2.1 2001/11/02 22:25:29 gson Exp $";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -21,8 +21,8 @@ static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/n
|
|||||||
#include "port_before.h"
|
#include "port_before.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <memory.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -52,20 +52,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -156,7 +156,7 @@ inet_aton(const char *cp, struct in_addr *addr) {
|
|||||||
* a.b.c (with c treated as 16 bits)
|
* a.b.c (with c treated as 16 bits)
|
||||||
* a.b (with b treated as 24 bits)
|
* a.b (with b treated as 24 bits)
|
||||||
*/
|
*/
|
||||||
if (pp >= parts + 3 || val > 0xff)
|
if (pp >= parts + 3 || val > 0xffU)
|
||||||
return (0);
|
return (0);
|
||||||
*pp++ = val;
|
*pp++ = val;
|
||||||
c = *++cp;
|
c = *++cp;
|
||||||
@ -183,19 +183,19 @@ inet_aton(const char *cp, struct in_addr *addr) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: /* a.b -- 8.24 bits */
|
case 2: /* a.b -- 8.24 bits */
|
||||||
if (val > 0xffffff)
|
if (val > 0xffffffU)
|
||||||
return (0);
|
return (0);
|
||||||
val |= parts[0] << 24;
|
val |= parts[0] << 24;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: /* a.b.c -- 8.8.16 bits */
|
case 3: /* a.b.c -- 8.8.16 bits */
|
||||||
if (val > 0xffff)
|
if (val > 0xffffU)
|
||||||
return (0);
|
return (0);
|
||||||
val |= (parts[0] << 24) | (parts[1] << 16);
|
val |= (parts[0] << 24) | (parts[1] << 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: /* a.b.c.d -- 8.8.8.8 bits */
|
case 4: /* a.b.c.d -- 8.8.8.8 bits */
|
||||||
if (val > 0xff)
|
if (val > 0xffU)
|
||||||
return (0);
|
return (0);
|
||||||
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
||||||
break;
|
break;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -121,7 +121,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
|
|||||||
if (bits == -1)
|
if (bits == -1)
|
||||||
len = 4;
|
len = 4;
|
||||||
else
|
else
|
||||||
for (len = 1, b = 1 ; b < 4; b++)
|
for (len = 1, b = 1 ; b < 4U; b++)
|
||||||
if (*(src + b))
|
if (*(src + b))
|
||||||
len = b + 1;
|
len = b + 1;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
|
|||||||
if (len > bytes)
|
if (len > bytes)
|
||||||
bytes = len;
|
bytes = len;
|
||||||
b = decoct(src, bytes, dst, size);
|
b = decoct(src, bytes, dst, size);
|
||||||
if (b == 0)
|
if (b == 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
dst += b;
|
dst += b;
|
||||||
size -= b;
|
size -= b;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
* Copyright (c) 1998,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -98,7 +98,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
|
|||||||
if (tmp > 255)
|
if (tmp > 255)
|
||||||
goto enoent;
|
goto enoent;
|
||||||
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
|
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
|
||||||
if (size-- == 0)
|
if (size-- == 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (u_char) tmp;
|
*dst++ = (u_char) tmp;
|
||||||
if (ch == '\0' || ch == '/')
|
if (ch == '\0' || ch == '/')
|
||||||
@ -133,7 +133,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
|
|||||||
goto enoent;
|
goto enoent;
|
||||||
|
|
||||||
/* Extend address to four octets. */
|
/* Extend address to four octets. */
|
||||||
while (size-- > 0)
|
while (size-- > 0U)
|
||||||
*dst++ = 0;
|
*dst++ = 0;
|
||||||
|
|
||||||
*pbits = bits;
|
*pbits = bits;
|
||||||
@ -251,7 +251,7 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, int *pbits) {
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
getbits(const char *src, int ipv6) {
|
getbits(const char *src, int ipv6) {
|
||||||
int bits = 0;
|
int bits = 0;
|
||||||
char *cp, ch;
|
char *cp, ch;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-1999 by Internet Software Consortium.
|
* Copyright (c) 1995-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -51,16 +51,16 @@ struct in_addr
|
|||||||
inet_makeaddr(net, host)
|
inet_makeaddr(net, host)
|
||||||
u_long net, host;
|
u_long net, host;
|
||||||
{
|
{
|
||||||
u_long addr;
|
struct in_addr a;
|
||||||
|
|
||||||
if (net < 128)
|
if (net < 128U)
|
||||||
addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
|
a.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
|
||||||
else if (net < 65536)
|
else if (net < 65536U)
|
||||||
addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
|
a.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
|
||||||
else if (net < 16777216L)
|
else if (net < 16777216L)
|
||||||
addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
|
a.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
|
||||||
else
|
else
|
||||||
addr = net | host;
|
a.s_addr = net | host;
|
||||||
addr = htonl(addr);
|
a.s_addr = htonl(a.s_addr);
|
||||||
return (*(struct in_addr *)&addr);
|
return (a);
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -24,7 +24,6 @@ static const char rcsid[] = "$Id$";
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/nameser.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -59,7 +59,7 @@ static const char rcsid[] = "$Id$";
|
|||||||
* Paul Vixie (ISC), June 1996
|
* Paul Vixie (ISC), June 1996
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
|
||||||
static const char xdigits[] = "0123456789abcdef";
|
static const char xdigits[] = "0123456789abcdef";
|
||||||
static const char digits[] = "0123456789";
|
static const char digits[] = "0123456789";
|
||||||
int n, ch, tmp = 0, dirty, bits;
|
int n, ch, tmp = 0, dirty, bits;
|
||||||
@ -70,7 +70,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
|||||||
&& isascii((unsigned char)(src[1]))
|
&& isascii((unsigned char)(src[1]))
|
||||||
&& isxdigit((unsigned char)(src[1]))) {
|
&& isxdigit((unsigned char)(src[1]))) {
|
||||||
/* Hexadecimal: Eat nybble string. */
|
/* Hexadecimal: Eat nybble string. */
|
||||||
if (size <= 0)
|
if (size <= 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
dirty = 0;
|
dirty = 0;
|
||||||
src++; /* skip x or X. */
|
src++; /* skip x or X. */
|
||||||
@ -84,14 +84,14 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
|||||||
else
|
else
|
||||||
tmp = (tmp << 4) | n;
|
tmp = (tmp << 4) | n;
|
||||||
if (++dirty == 2) {
|
if (++dirty == 2) {
|
||||||
if (size-- <= 0)
|
if (size-- <= 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (u_char) tmp;
|
*dst++ = (u_char) tmp;
|
||||||
dirty = 0;
|
dirty = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dirty) { /* Odd trailing nybble? */
|
if (dirty) { /* Odd trailing nybble? */
|
||||||
if (size-- <= 0)
|
if (size-- <= 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (u_char) (tmp << 4);
|
*dst++ = (u_char) (tmp << 4);
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
|||||||
goto enoent;
|
goto enoent;
|
||||||
} while ((ch = *src++) != '\0' &&
|
} while ((ch = *src++) != '\0' &&
|
||||||
isascii(ch) && isdigit(ch));
|
isascii(ch) && isdigit(ch));
|
||||||
if (size-- <= 0)
|
if (size-- <= 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (u_char) tmp;
|
*dst++ = (u_char) tmp;
|
||||||
if (ch == '\0' || ch == '/')
|
if (ch == '\0' || ch == '/')
|
||||||
@ -152,7 +152,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
|||||||
if (*odst >= 240) /* Class E */
|
if (*odst >= 240) /* Class E */
|
||||||
bits = 32;
|
bits = 32;
|
||||||
else if (*odst >= 224) /* Class D */
|
else if (*odst >= 224) /* Class D */
|
||||||
bits = 4;
|
bits = 8;
|
||||||
else if (*odst >= 192) /* Class C */
|
else if (*odst >= 192) /* Class C */
|
||||||
bits = 24;
|
bits = 24;
|
||||||
else if (*odst >= 128) /* Class B */
|
else if (*odst >= 128) /* Class B */
|
||||||
@ -160,12 +160,18 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
|||||||
else /* Class A */
|
else /* Class A */
|
||||||
bits = 8;
|
bits = 8;
|
||||||
/* If imputed mask is narrower than specified octets, widen. */
|
/* If imputed mask is narrower than specified octets, widen. */
|
||||||
if (bits >= 8 && bits < ((dst - odst) * 8))
|
if (bits < ((dst - odst) * 8))
|
||||||
bits = (dst - odst) * 8;
|
bits = (dst - odst) * 8;
|
||||||
|
/*
|
||||||
|
* If there are no additional bits specified for a class D
|
||||||
|
* address adjust bits to 4.
|
||||||
|
*/
|
||||||
|
if (bits == 8 && *odst == 224)
|
||||||
|
bits = 4;
|
||||||
}
|
}
|
||||||
/* Extend network to cover the actual mask. */
|
/* Extend network to cover the actual mask. */
|
||||||
while (bits > ((dst - odst) * 8)) {
|
while (bits > ((dst - odst) * 8)) {
|
||||||
if (size-- <= 0)
|
if (size-- <= 0U)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = '\0';
|
*dst++ = '\0';
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -66,14 +66,14 @@ again:
|
|||||||
base = 16, cp++;
|
base = 16, cp++;
|
||||||
while ((c = *cp) != 0) {
|
while ((c = *cp) != 0) {
|
||||||
if (isdigit((unsigned char)c)) {
|
if (isdigit((unsigned char)c)) {
|
||||||
if (base == 8 && (c == '8' || c == '9'))
|
if (base == 8U && (c == '8' || c == '9'))
|
||||||
return (INADDR_NONE);
|
return (INADDR_NONE);
|
||||||
val = (val * base) + (c - '0');
|
val = (val * base) + (c - '0');
|
||||||
cp++;
|
cp++;
|
||||||
digit = 1;
|
digit = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (base == 16 && isxdigit((unsigned char)c)) {
|
if (base == 16U && isxdigit((unsigned char)c)) {
|
||||||
val = (val << 4) +
|
val = (val << 4) +
|
||||||
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
|
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
|
||||||
cp++;
|
cp++;
|
||||||
@ -85,7 +85,7 @@ again:
|
|||||||
if (!digit)
|
if (!digit)
|
||||||
return (INADDR_NONE);
|
return (INADDR_NONE);
|
||||||
if (*cp == '.') {
|
if (*cp == '.') {
|
||||||
if (pp >= parts + 4 || val > 0xff)
|
if (pp >= parts + 4 || val > 0xffU)
|
||||||
return (INADDR_NONE);
|
return (INADDR_NONE);
|
||||||
*pp++ = val, cp++;
|
*pp++ = val, cp++;
|
||||||
goto again;
|
goto again;
|
||||||
@ -94,7 +94,7 @@ again:
|
|||||||
return (INADDR_NONE);
|
return (INADDR_NONE);
|
||||||
*pp++ = val;
|
*pp++ = val;
|
||||||
n = pp - parts;
|
n = pp - parts;
|
||||||
if (n > 4)
|
if (n > 4U)
|
||||||
return (INADDR_NONE);
|
return (INADDR_NONE);
|
||||||
for (val = 0, i = 0; i < n; i++) {
|
for (val = 0, i = 0; i < n; i++) {
|
||||||
val <<= 8;
|
val <<= 8;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAI!
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANT!
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF TH!
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -118,7 +118,7 @@ dns_res_get(struct irs_acc *this) {
|
|||||||
dns_res_set(this, res, free);
|
dns_res_set(this, res, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dns->res->options & RES_INIT) == 0 &&
|
if ((dns->res->options & RES_INIT) == 0U &&
|
||||||
res_ninit(dns->res) < 0)
|
res_ninit(dns->res) < 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
||||||
@ -386,7 +386,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
|
|||||||
q2->qtype = T_PTR;
|
q2->qtype = T_PTR;
|
||||||
q2->answer = q2->qbuf.buf;
|
q2->answer = q2->qbuf.buf;
|
||||||
q2->anslen = sizeof(q2->qbuf);
|
q2->anslen = sizeof(q2->qbuf);
|
||||||
if ((pvt->res->options & RES_NO_NIBBLE2) != 0)
|
if ((pvt->res->options & RES_NO_NIBBLE2) != 0U)
|
||||||
q2->action = RESTGT_IGNORE;
|
q2->action = RESTGT_IGNORE;
|
||||||
else
|
else
|
||||||
q2->action = RESTGT_AFTERFAILURE;
|
q2->action = RESTGT_AFTERFAILURE;
|
||||||
@ -414,38 +414,44 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
|
|||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
if (q->action != RESTGT_IGNORE) {
|
if (q->action != RESTGT_IGNORE) {
|
||||||
|
const char *nibsuff = res_get_nibblesuffix(pvt->res);
|
||||||
qp = q->qname;
|
qp = q->qname;
|
||||||
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
||||||
i = SPRINTF((qp, "%x.%x.",
|
i = SPRINTF((qp, "%x.%x.",
|
||||||
uaddr[n] & 0xf,
|
uaddr[n] & 0xf,
|
||||||
(uaddr[n] >> 4) & 0xf));
|
(uaddr[n] >> 4) & 0xf));
|
||||||
if (i < 0)
|
if (i != 4)
|
||||||
abort();
|
abort();
|
||||||
qp += i;
|
qp += i;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCAT
|
if (strlen(q->qname) + strlen(nibsuff) + 1 >
|
||||||
strlcat(q->qname, res_get_nibblesuffix(pvt->res),
|
sizeof q->qname) {
|
||||||
sizeof(q->qname));
|
errno = ENAMETOOLONG;
|
||||||
#else
|
RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
|
||||||
strcpy(qp, res_get_nibblesuffix(pvt->res));
|
hp = NULL;
|
||||||
#endif
|
goto cleanup;
|
||||||
|
}
|
||||||
|
strcpy(qp, nibsuff); /* (checked) */
|
||||||
}
|
}
|
||||||
if (q2->action != RESTGT_IGNORE) {
|
if (q2->action != RESTGT_IGNORE) {
|
||||||
|
const char *nibsuff2 = res_get_nibblesuffix2(pvt->res);
|
||||||
qp = q2->qname;
|
qp = q2->qname;
|
||||||
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
||||||
i = SPRINTF((qp, "%x.%x.",
|
i = SPRINTF((qp, "%x.%x.",
|
||||||
uaddr[n] & 0xf,
|
uaddr[n] & 0xf,
|
||||||
(uaddr[n] >> 4) & 0xf));
|
(uaddr[n] >> 4) & 0xf));
|
||||||
if (i < 0)
|
if (i != 4)
|
||||||
abort();
|
abort();
|
||||||
qp += i;
|
qp += i;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCAT
|
if (strlen(q2->qname) + strlen(nibsuff2) + 1 >
|
||||||
strlcat(q->qname, res_get_nibblesuffix2(pvt->res),
|
sizeof q2->qname) {
|
||||||
sizeof(q->qname));
|
errno = ENAMETOOLONG;
|
||||||
#else
|
RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
|
||||||
strcpy(qp, res_get_nibblesuffix2(pvt->res));
|
hp = NULL;
|
||||||
#endif
|
goto cleanup;
|
||||||
|
}
|
||||||
|
strcpy(qp, nibsuff2); /* (checked) */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -820,11 +826,7 @@ gethostans(struct irs_ho *this,
|
|||||||
had_error++;
|
had_error++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(bp, tbuf); /* (checked) */
|
||||||
strlcpy(bp, tbuf, ep - bp);
|
|
||||||
#else
|
|
||||||
strcpy(bp, tbuf);
|
|
||||||
#endif
|
|
||||||
pvt->host.h_name = bp;
|
pvt->host.h_name = bp;
|
||||||
hname = bp;
|
hname = bp;
|
||||||
bp += n;
|
bp += n;
|
||||||
@ -838,7 +840,7 @@ gethostans(struct irs_ho *this,
|
|||||||
}
|
}
|
||||||
cp += n;
|
cp += n;
|
||||||
#ifdef RES_USE_DNAME
|
#ifdef RES_USE_DNAME
|
||||||
if ((pvt->res->options & RES_USE_DNAME) != 0)
|
if ((pvt->res->options & RES_USE_DNAME) != 0U)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -856,11 +858,7 @@ gethostans(struct irs_ho *this,
|
|||||||
had_error++;
|
had_error++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(bp, tbuf); /* (checked) */
|
||||||
strlcpy(bp, tbuf, ep - bp);
|
|
||||||
#else
|
|
||||||
strcpy(bp, tbuf);
|
|
||||||
#endif
|
|
||||||
tname = bp;
|
tname = bp;
|
||||||
bp += n;
|
bp += n;
|
||||||
continue;
|
continue;
|
||||||
@ -996,11 +994,7 @@ gethostans(struct irs_ho *this,
|
|||||||
n = strlen(qname) + 1; /* for the \0 */
|
n = strlen(qname) + 1; /* for the \0 */
|
||||||
if (n > (ep - bp) || n >= MAXHOSTNAMELEN)
|
if (n > (ep - bp) || n >= MAXHOSTNAMELEN)
|
||||||
goto no_recovery;
|
goto no_recovery;
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(bp, qname); /* (checked) */
|
||||||
strlcpy(bp, qname, ep - bp);
|
|
||||||
#else
|
|
||||||
strcpy(bp, qname);
|
|
||||||
#endif
|
|
||||||
pvt->host.h_name = bp;
|
pvt->host.h_name = bp;
|
||||||
bp += n;
|
bp += n;
|
||||||
}
|
}
|
||||||
@ -1149,7 +1143,7 @@ init(struct irs_ho *this) {
|
|||||||
|
|
||||||
if (!pvt->res && !ho_res_get(this))
|
if (!pvt->res && !ho_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
res_ninit(pvt->res) == -1)
|
res_ninit(pvt->res) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -349,12 +349,7 @@ get1101answer(struct irs_nw *this,
|
|||||||
RES_SET_H_ERRNO(pvt->res, NO_RECOVERY);
|
RES_SET_H_ERRNO(pvt->res, NO_RECOVERY);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCPY
|
pvt->net.n_name = strcpy(bp, name); /* (checked) */
|
||||||
strlcpy(bp, name, ep - bp);
|
|
||||||
pvt->net.n_name = bp;
|
|
||||||
#else
|
|
||||||
pvt->net.n_name = strcpy(bp, name);
|
|
||||||
#endif
|
|
||||||
bp += n;
|
bp += n;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -574,7 +569,7 @@ normalize_name(char *name) {
|
|||||||
/* Make lower case. */
|
/* Make lower case. */
|
||||||
for (t = name; *t; t++)
|
for (t = name; *t; t++)
|
||||||
if (isascii((unsigned char)*t) && isupper((unsigned char)*t))
|
if (isascii((unsigned char)*t) && isupper((unsigned char)*t))
|
||||||
*t = tolower(*t);
|
*t = tolower((*t)&0xff);
|
||||||
|
|
||||||
/* Remove trailing dots. */
|
/* Remove trailing dots. */
|
||||||
while (t > name && t[-1] == '.')
|
while (t > name && t[-1] == '.')
|
||||||
@ -587,7 +582,7 @@ init(struct irs_nw *this) {
|
|||||||
|
|
||||||
if (!pvt->res && !nw_res_get(this))
|
if (!pvt->res && !nw_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
res_ninit(pvt->res) == -1)
|
res_ninit(pvt->res) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -22,7 +22,7 @@
|
|||||||
#ifndef _DNS_P_H_INCLUDED
|
#ifndef _DNS_P_H_INCLUDED
|
||||||
#define _DNS_P_H_INCLUDED
|
#define _DNS_P_H_INCLUDED
|
||||||
|
|
||||||
#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0 || \
|
#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
|
||||||
(ok)(nm) != 0)
|
(ok)(nm) != 0)
|
||||||
#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
|
#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
|
||||||
#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
|
#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 2001 by Internet Software Consortium.
|
* Copyright (c) 2001 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <port_before.h>
|
#include <port_before.h>
|
||||||
@ -52,6 +52,9 @@ gai_strerror(int ecode) {
|
|||||||
#ifndef DO_PTHREADS
|
#ifndef DO_PTHREADS
|
||||||
static char buf[EAI_BUFSIZE];
|
static char buf[EAI_BUFSIZE];
|
||||||
#else /* DO_PTHREADS */
|
#else /* DO_PTHREADS */
|
||||||
|
#ifndef LIBBIND_MUTEX_INITIALIZER
|
||||||
|
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||||
|
#endif
|
||||||
static pthread_mutex_t lock;
|
static pthread_mutex_t lock;
|
||||||
static pthread_key_t key;
|
static pthread_key_t key;
|
||||||
static int once = 0;
|
static int once = 0;
|
||||||
@ -63,9 +66,8 @@ gai_strerror(int ecode) {
|
|||||||
|
|
||||||
#ifdef DO_PTHREADS
|
#ifdef DO_PTHREADS
|
||||||
if (!once) {
|
if (!once) {
|
||||||
// Haiku compatibility: this is a function call, thus it must be
|
/* XXX: Haiku has non-constant mutex initializer! Must init here. */
|
||||||
// initialized here and not at when allocating 'lock'
|
lock = LIBBIND_MUTEX_INITIALIZER;
|
||||||
lock = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
|
|
||||||
pthread_mutex_lock(&lock);
|
pthread_mutex_lock(&lock);
|
||||||
if (!once++)
|
if (!once++)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -175,7 +175,7 @@ gen_res_get(struct irs_acc *this) {
|
|||||||
gen_res_set(this, res, free);
|
gen_res_set(this, res, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((irs->res->options & RES_INIT) == 0) && res_ninit(irs->res) < 0)
|
if (((irs->res->options & RES_INIT) == 0U) && res_ninit(irs->res) < 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
return (irs->res);
|
return (irs->res);
|
||||||
@ -391,8 +391,10 @@ init_map_rules(struct gen_p *irs, const char *conf_file) {
|
|||||||
default_map_rules(irs);
|
default_map_rules(irs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void) sprintf(pattern, "%%%ds %%%ds %%%ds\n",
|
(void) sprintf(pattern, "%%%lus %%%lus %%%lus\n",
|
||||||
sizeof mapname, sizeof accname, sizeof options);
|
(unsigned long)sizeof mapname,
|
||||||
|
(unsigned long)sizeof accname,
|
||||||
|
(unsigned long)sizeof options);
|
||||||
while (fgets(line, sizeof line, conf)) {
|
while (fgets(line, sizeof line, conf)) {
|
||||||
enum irs_map_id map;
|
enum irs_map_id map;
|
||||||
enum irs_acc_id acc;
|
enum irs_acc_id acc;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -83,7 +83,7 @@ static void gr_res_set(struct irs_gr *,
|
|||||||
struct __res_state *,
|
struct __res_state *,
|
||||||
void (*)(void *));
|
void (*)(void *));
|
||||||
|
|
||||||
static void grmerge(struct irs_gr *gr, const struct group *src,
|
static int grmerge(struct irs_gr *gr, const struct group *src,
|
||||||
int preserve);
|
int preserve);
|
||||||
|
|
||||||
static int countvec(char **vec);
|
static int countvec(char **vec);
|
||||||
@ -92,6 +92,10 @@ static int countnew(char **old, char **new);
|
|||||||
static size_t sizenew(char **old, char **new);
|
static size_t sizenew(char **old, char **new);
|
||||||
static int newgid(int, gid_t *, gid_t);
|
static int newgid(int, gid_t *, gid_t);
|
||||||
|
|
||||||
|
/* Macros */
|
||||||
|
|
||||||
|
#define FREE_IF(x) do { if ((x) != NULL) { free(x); (x) = NULL; } } while (0)
|
||||||
|
|
||||||
/* Public */
|
/* Public */
|
||||||
|
|
||||||
struct irs_gr *
|
struct irs_gr *
|
||||||
@ -171,7 +175,8 @@ gr_byname(struct irs_gr *this, const char *name) {
|
|||||||
gr = rule->inst->gr;
|
gr = rule->inst->gr;
|
||||||
tval = (*gr->byname)(gr, name);
|
tval = (*gr->byname)(gr, name);
|
||||||
if (tval) {
|
if (tval) {
|
||||||
grmerge(this, tval, dirty++);
|
if (!grmerge(this, tval, dirty++))
|
||||||
|
return (NULL);
|
||||||
if (!(rule->flags & IRS_MERGE))
|
if (!(rule->flags & IRS_MERGE))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -197,7 +202,8 @@ gr_bygid(struct irs_gr *this, gid_t gid) {
|
|||||||
gr = rule->inst->gr;
|
gr = rule->inst->gr;
|
||||||
tval = (*gr->bygid)(gr, gid);
|
tval = (*gr->bygid)(gr, gid);
|
||||||
if (tval) {
|
if (tval) {
|
||||||
grmerge(this, tval, dirty++);
|
if (!grmerge(this, tval, dirty++))
|
||||||
|
return (NULL);
|
||||||
if (!(rule->flags & IRS_MERGE))
|
if (!(rule->flags & IRS_MERGE))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -321,7 +327,7 @@ gr_res_set(struct irs_gr *this, struct __res_state *res,
|
|||||||
|
|
||||||
/* Private. */
|
/* Private. */
|
||||||
|
|
||||||
static void
|
static int
|
||||||
grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||||
struct pvt *pvt = (struct pvt *)this->private;
|
struct pvt *pvt = (struct pvt *)this->private;
|
||||||
char *cp, **m, **p, *oldmembuf, *ep;
|
char *cp, **m, **p, *oldmembuf, *ep;
|
||||||
@ -332,9 +338,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
|||||||
pvt->group.gr_gid = src->gr_gid;
|
pvt->group.gr_gid = src->gr_gid;
|
||||||
if (pvt->nmemb < 1) {
|
if (pvt->nmemb < 1) {
|
||||||
m = malloc(sizeof *m);
|
m = malloc(sizeof *m);
|
||||||
if (!m) {
|
if (m == NULL) {
|
||||||
/* No harm done, no work done. */
|
/* No harm done, no work done. */
|
||||||
return;
|
return (0);
|
||||||
}
|
}
|
||||||
pvt->group.gr_mem = m;
|
pvt->group.gr_mem = m;
|
||||||
pvt->nmemb = 1;
|
pvt->nmemb = 1;
|
||||||
@ -351,9 +357,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
|||||||
n = ndst + nnew + 1;
|
n = ndst + nnew + 1;
|
||||||
if ((size_t)n > pvt->nmemb) {
|
if ((size_t)n > pvt->nmemb) {
|
||||||
m = realloc(pvt->group.gr_mem, n * sizeof *m);
|
m = realloc(pvt->group.gr_mem, n * sizeof *m);
|
||||||
if (!m) {
|
if (m == NULL) {
|
||||||
/* No harm done, no work done. */
|
/* No harm done, no work done. */
|
||||||
return;
|
return (0);
|
||||||
}
|
}
|
||||||
pvt->group.gr_mem = m;
|
pvt->group.gr_mem = m;
|
||||||
pvt->nmemb = n;
|
pvt->nmemb = n;
|
||||||
@ -371,13 +377,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
|||||||
}
|
}
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
/* No work to do. */
|
/* No work to do. */
|
||||||
return;
|
return (1);
|
||||||
}
|
}
|
||||||
used = preserve ? pvt->membufsize : 0;
|
used = preserve ? pvt->membufsize : 0;
|
||||||
cp = malloc(used + n);
|
cp = malloc(used + n);
|
||||||
if (!cp) {
|
if (cp == NULL) {
|
||||||
/* No harm done, no work done. */
|
/* No harm done, no work done. */
|
||||||
return;
|
return (0);
|
||||||
}
|
}
|
||||||
ep = cp + used + n;
|
ep = cp + used + n;
|
||||||
if (used != 0)
|
if (used != 0)
|
||||||
@ -401,12 +407,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
|||||||
if (isnew(pvt->group.gr_mem, *m)) {
|
if (isnew(pvt->group.gr_mem, *m)) {
|
||||||
*p++ = cp;
|
*p++ = cp;
|
||||||
*p = NULL;
|
*p = NULL;
|
||||||
#ifdef HAVE_STRLCPY
|
n = strlen(*m) + 1;
|
||||||
strlcpy(cp, *m, ep - cp);
|
if (n > ep - cp) {
|
||||||
#else
|
FREE_IF(oldmembuf);
|
||||||
strcpy(cp, *m);
|
return (0);
|
||||||
#endif
|
}
|
||||||
cp += strlen(cp) + 1;
|
strcpy(cp, *m); /* (checked) */
|
||||||
|
cp += n;
|
||||||
}
|
}
|
||||||
if (preserve) {
|
if (preserve) {
|
||||||
pvt->group.gr_name = pvt->membuf +
|
pvt->group.gr_name = pvt->membuf +
|
||||||
@ -415,23 +422,26 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
|||||||
(pvt->group.gr_passwd - oldmembuf);
|
(pvt->group.gr_passwd - oldmembuf);
|
||||||
} else {
|
} else {
|
||||||
pvt->group.gr_name = cp;
|
pvt->group.gr_name = cp;
|
||||||
#ifdef HAVE_STRLCPY
|
n = strlen(src->gr_name) + 1;
|
||||||
strlcpy(cp, src->gr_name, ep - cp);
|
if (n > ep - cp) {
|
||||||
#else
|
FREE_IF(oldmembuf);
|
||||||
strcpy(cp, src->gr_name);
|
return (0);
|
||||||
#endif
|
|
||||||
cp += strlen(src->gr_name) + 1;
|
|
||||||
pvt->group.gr_passwd = cp;
|
|
||||||
#ifdef HAVE_STRLCPY
|
|
||||||
strlcpy(cp, src->gr_passwd, ep - cp);
|
|
||||||
#else
|
|
||||||
strcpy(cp, src->gr_passwd);
|
|
||||||
#endif
|
|
||||||
cp += strlen(src->gr_passwd) + 1;
|
|
||||||
}
|
}
|
||||||
if (oldmembuf != NULL)
|
strcpy(cp, src->gr_name); /* (checked) */
|
||||||
free(oldmembuf);
|
cp += n;
|
||||||
|
|
||||||
|
pvt->group.gr_passwd = cp;
|
||||||
|
n = strlen(src->gr_passwd) + 1;
|
||||||
|
if (n > ep - cp) {
|
||||||
|
FREE_IF(oldmembuf);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
strcpy(cp, src->gr_passwd); /* (checked) */
|
||||||
|
cp += n;
|
||||||
|
}
|
||||||
|
FREE_IF(oldmembuf);
|
||||||
INSIST(cp >= pvt->membuf && cp <= &pvt->membuf[pvt->membufsize]);
|
INSIST(cp >= pvt->membuf && cp <= &pvt->membuf[pvt->membufsize]);
|
||||||
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -383,7 +383,7 @@ init(struct irs_ho *this) {
|
|||||||
if (!pvt->res && !ho_res_get(this))
|
if (!pvt->res && !ho_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
(res_ninit(pvt->res) == -1))
|
(res_ninit(pvt->res) == -1))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -255,7 +255,7 @@ init(struct irs_nw *this) {
|
|||||||
|
|
||||||
if (!pvt->res && !nw_res_get(this))
|
if (!pvt->res && !nw_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
res_ninit(pvt->res) == -1)
|
res_ninit(pvt->res) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -937,11 +937,7 @@ copy_ai(pai)
|
|||||||
free(ai);
|
free(ai);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(ai->ai_canonname, pai->ai_canonname); /* (checked) */
|
||||||
strlcpy(ai->ai_canonname, pai->ai_canonname, l);
|
|
||||||
#else
|
|
||||||
strncpy(ai->ai_canonname, pai->ai_canonname, l);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
/* just to make sure */
|
/* just to make sure */
|
||||||
ai->ai_canonname = NULL;
|
ai->ai_canonname = NULL;
|
||||||
@ -1096,7 +1092,8 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6,
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
#ifdef USE_IFNAMELINKID
|
#ifdef USE_IFNAMELINKID
|
||||||
if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) {
|
if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) ||
|
||||||
|
IN6_IS_ADDR_MC_NODELOCAL(a6)) {
|
||||||
/*
|
/*
|
||||||
* Using interface names as link indices can be allowed
|
* Using interface names as link indices can be allowed
|
||||||
* only when we can assume a one-to-one mappings between
|
* only when we can assume a one-to-one mappings between
|
||||||
@ -1104,6 +1101,7 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6,
|
|||||||
*/
|
*/
|
||||||
scopeid = if_nametoindex(scope);
|
scopeid = if_nametoindex(scope);
|
||||||
if (scopeid == 0)
|
if (scopeid == 0)
|
||||||
|
goto trynumeric;
|
||||||
*scopeidp = scopeid;
|
*scopeidp = scopeid;
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -187,7 +187,7 @@ gethostent_p(struct net_data *net_data) {
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
while ((hp = (*ho->next)(ho)) != NULL &&
|
while ((hp = (*ho->next)(ho)) != NULL &&
|
||||||
hp->h_addrtype == AF_INET6 &&
|
hp->h_addrtype == AF_INET6 &&
|
||||||
(net_data->res->options & RES_USE_INET6) == 0)
|
(net_data->res->options & RES_USE_INET6) == 0U)
|
||||||
continue;
|
continue;
|
||||||
net_data->ho_last = hp;
|
net_data->ho_last = hp;
|
||||||
return (net_data->ho_last);
|
return (net_data->ho_last);
|
||||||
@ -356,13 +356,13 @@ getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
|
|||||||
|
|
||||||
switch (af) {
|
switch (af) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
if (len != INADDRSZ) {
|
if (len != (size_t)INADDRSZ) {
|
||||||
*error_num = NO_RECOVERY;
|
*error_num = NO_RECOVERY;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
if (len != IN6ADDRSZ) {
|
if (len != (size_t)IN6ADDRSZ) {
|
||||||
*error_num = NO_RECOVERY;
|
*error_num = NO_RECOVERY;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -1007,7 +1007,7 @@ fakeaddr(const char *name, int af, struct net_data *net_data) {
|
|||||||
}
|
}
|
||||||
strncpy(pvt->name, name, NS_MAXDNAME);
|
strncpy(pvt->name, name, NS_MAXDNAME);
|
||||||
pvt->name[NS_MAXDNAME] = '\0';
|
pvt->name[NS_MAXDNAME] = '\0';
|
||||||
if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0) {
|
if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0U) {
|
||||||
map_v4v6_address(pvt->addr, pvt->addr);
|
map_v4v6_address(pvt->addr, pvt->addr);
|
||||||
af = AF_INET6;
|
af = AF_INET6;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -47,7 +47,7 @@ gethostbyname_r(const char *name, struct hostent *hptr, HOST_R_ARGS) {
|
|||||||
HOST_R_ERRNO;
|
HOST_R_ERRNO;
|
||||||
|
|
||||||
#ifdef HOST_R_SETANSWER
|
#ifdef HOST_R_SETANSWER
|
||||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||||
*answerp = NULL;
|
*answerp = NULL;
|
||||||
else
|
else
|
||||||
*answerp = hptr;
|
*answerp = hptr;
|
||||||
@ -72,7 +72,7 @@ gethostbyaddr_r(const char *addr, int len, int type,
|
|||||||
HOST_R_ERRNO;
|
HOST_R_ERRNO;
|
||||||
|
|
||||||
#ifdef HOST_R_SETANSWER
|
#ifdef HOST_R_SETANSWER
|
||||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||||
*answerp = NULL;
|
*answerp = NULL;
|
||||||
else
|
else
|
||||||
*answerp = hptr;
|
*answerp = hptr;
|
||||||
@ -102,7 +102,7 @@ gethostent_r(struct hostent *hptr, HOST_R_ARGS) {
|
|||||||
HOST_R_ERRNO;
|
HOST_R_ERRNO;
|
||||||
|
|
||||||
#ifdef HOST_R_SETANSWER
|
#ifdef HOST_R_SETANSWER
|
||||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||||
*answerp = NULL;
|
*answerp = NULL;
|
||||||
else
|
else
|
||||||
*answerp = hptr;
|
*answerp = hptr;
|
||||||
@ -214,8 +214,8 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
|
|||||||
|
|
||||||
/* copy up to first 35 addresses */
|
/* copy up to first 35 addresses */
|
||||||
i = 0;
|
i = 0;
|
||||||
cp = hdptr->hostaddr;
|
cp = hdptr->hostbuf;
|
||||||
eob = hdptr->hostaddr + sizeof(hdptr->hostaddr);
|
eob = hdptr->hostbuf + sizeof(hdptr->hostbuf);
|
||||||
hptr->h_addr_list = hdptr->h_addr_ptrs;
|
hptr->h_addr_list = hdptr->h_addr_ptrs;
|
||||||
while (he->h_addr_list[i] && i < (_MAXADDRS)) {
|
while (he->h_addr_list[i] && i < (_MAXADDRS)) {
|
||||||
if (n < (eob - cp)) {
|
if (n < (eob - cp)) {
|
||||||
@ -230,8 +230,6 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
|
|||||||
hptr->h_addr_list[i] = NULL;
|
hptr->h_addr_list[i] = NULL;
|
||||||
|
|
||||||
/* copy official name */
|
/* copy official name */
|
||||||
cp = hdptr->hostbuf;
|
|
||||||
eob = hdptr->hostbuf + sizeof(hdptr->hostbuf);
|
|
||||||
if ((n = strlen(he->h_name) + 1) < (eob - cp)) {
|
if ((n = strlen(he->h_name) + 1) < (eob - cp)) {
|
||||||
strcpy(cp, he->h_name);
|
strcpy(cp, he->h_name);
|
||||||
hptr->h_name = cp;
|
hptr->h_name = cp;
|
||||||
|
@ -132,7 +132,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
|||||||
port = ((const struct sockinet *)sa)->si_port; /* network byte order */
|
port = ((const struct sockinet *)sa)->si_port; /* network byte order */
|
||||||
addr = (const char *)sa + afd->a_off;
|
addr = (const char *)sa + afd->a_off;
|
||||||
|
|
||||||
if (serv == NULL || servlen == 0) {
|
if (serv == NULL || servlen == 0U) {
|
||||||
/*
|
/*
|
||||||
* rfc2553bis says that serv == NULL or servlen == 0 means that
|
* rfc2553bis says that serv == NULL or servlen == 0 means that
|
||||||
* the caller does not want the result.
|
* the caller does not want the result.
|
||||||
@ -154,7 +154,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
|||||||
|
|
||||||
switch (sa->sa_family) {
|
switch (sa->sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
if (ntohl(*(const u_long *)addr) >> IN_CLASSA_NSHIFT == 0)
|
if (ntohl(*(const u_int32_t *)addr) >> IN_CLASSA_NSHIFT == 0)
|
||||||
flags |= NI_NUMERICHOST;
|
flags |= NI_NUMERICHOST;
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@ -177,7 +177,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (host == NULL || hostlen == 0) {
|
if (host == NULL || hostlen == 0U) {
|
||||||
/*
|
/*
|
||||||
* rfc2553bis says that host == NULL or hostlen == 0 means that
|
* rfc2553bis says that host == NULL or hostlen == 0 means that
|
||||||
* the caller does not want the result.
|
* the caller does not want the result.
|
||||||
@ -283,7 +283,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
|
|||||||
#ifdef NI_NUMERICSCOPE
|
#ifdef NI_NUMERICSCOPE
|
||||||
if (flags & NI_NUMERICSCOPE) {
|
if (flags & NI_NUMERICSCOPE) {
|
||||||
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
||||||
if (bufsiz != 0) {
|
if (bufsiz != 0U) {
|
||||||
strncpy(buf, tmp, bufsiz - 1);
|
strncpy(buf, tmp, bufsiz - 1);
|
||||||
buf[bufsiz - 1] = '\0';
|
buf[bufsiz - 1] = '\0';
|
||||||
}
|
}
|
||||||
@ -313,7 +313,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
|
|||||||
|
|
||||||
/* last resort */
|
/* last resort */
|
||||||
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
||||||
if (bufsiz != 0) {
|
if (bufsiz != 0U) {
|
||||||
strncpy(buf, tmp, bufsiz - 1);
|
strncpy(buf, tmp, bufsiz - 1);
|
||||||
buf[bufsiz - 1] = '\0';
|
buf[bufsiz - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -156,13 +156,13 @@ getnetbyaddr_p(unsigned long net, int type, struct net_data *net_data) {
|
|||||||
return (net_data->nw_last);
|
return (net_data->nw_last);
|
||||||
|
|
||||||
/* cannonize net(host order) */
|
/* cannonize net(host order) */
|
||||||
if (net < 256) {
|
if (net < 256UL) {
|
||||||
net <<= 24;
|
net <<= 24;
|
||||||
bits = 8;
|
bits = 8;
|
||||||
} else if (net < 65536) {
|
} else if (net < 65536UL) {
|
||||||
net <<= 16;
|
net <<= 16;
|
||||||
bits = 16;
|
bits = 16;
|
||||||
} else if (net < 16777216) {
|
} else if (net < 16777216UL) {
|
||||||
net <<= 8;
|
net <<= 8;
|
||||||
bits = 24;
|
bits = 24;
|
||||||
} else
|
} else
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -76,7 +76,9 @@ setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS)
|
|||||||
setnetgrent_r(const char *netgroup)
|
setnetgrent_r(const char *netgroup)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
setnetgrent(netgroup);
|
char *tmp;
|
||||||
|
DE_CONST(netgroup, tmp);
|
||||||
|
setnetgrent(tmp);
|
||||||
#ifdef NGR_R_PRIVATE
|
#ifdef NGR_R_PRIVATE
|
||||||
*buf = NULL;
|
*buf = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -36,6 +36,7 @@ static int __bind_irs_pw_unneeded;
|
|||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <irs.h>
|
#include <irs.h>
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -130,7 +130,7 @@ getpwuid_r(uid_t uid, struct passwd *pwptr, char *buf, int buflen) {
|
|||||||
PASS_R_RETURN
|
PASS_R_RETURN
|
||||||
getpwent_r(struct passwd *pwptr, PASS_R_ARGS) {
|
getpwent_r(struct passwd *pwptr, PASS_R_ARGS) {
|
||||||
struct passwd *pw = getpwent();
|
struct passwd *pw = getpwent();
|
||||||
int res;
|
int res = 0;
|
||||||
|
|
||||||
if (pw == NULL)
|
if (pw == NULL)
|
||||||
return (PASS_R_BAD);
|
return (PASS_R_BAD);
|
||||||
@ -184,7 +184,7 @@ endpwent_r(void)
|
|||||||
PASS_R_RETURN
|
PASS_R_RETURN
|
||||||
fgetpwent_r(FILE *f, struct passwd *pwptr, PASS_R_COPY_ARGS) {
|
fgetpwent_r(FILE *f, struct passwd *pwptr, PASS_R_COPY_ARGS) {
|
||||||
struct passwd *pw = fgetpwent(f);
|
struct passwd *pw = fgetpwent(f);
|
||||||
int res;
|
int res = 0;
|
||||||
|
|
||||||
if (pw == NULL)
|
if (pw == NULL)
|
||||||
return (PASS_R_BAD);
|
return (PASS_R_BAD);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
* Copyright (c) 1998-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -3,20 +3,20 @@ static const char rcsid[] = "$Id$";
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -92,19 +92,14 @@ hesiod_init(void **context) {
|
|||||||
/*
|
/*
|
||||||
* Use compiled in defaults.
|
* Use compiled in defaults.
|
||||||
*/
|
*/
|
||||||
ctx->LHS = malloc(strlen(DEF_LHS)+1);
|
ctx->LHS = malloc(strlen(DEF_LHS) + 1);
|
||||||
ctx->RHS = malloc(strlen(DEF_RHS)+1);
|
ctx->RHS = malloc(strlen(DEF_RHS) + 1);
|
||||||
if (ctx->LHS == 0 || ctx->RHS == 0) {
|
if (ctx->LHS == NULL || ctx->RHS == NULL) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(ctx->LHS, DEF_LHS); /* (checked) */
|
||||||
strlcpy(ctx->LHS, DEF_LHS, strlen(DEF_LHS) + 1);
|
strcpy(ctx->RHS, DEF_RHS); /* (checked) */
|
||||||
strlcpy(ctx->RHS, DEF_RHS, strlen(DEF_RHS) + 1);
|
|
||||||
#else
|
|
||||||
strcpy(ctx->LHS, DEF_LHS);
|
|
||||||
strcpy(ctx->RHS, DEF_RHS);
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
#endif
|
#endif
|
||||||
@ -123,22 +118,10 @@ hesiod_init(void **context) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (cp[0] == '.') {
|
if (cp[0] == '.') {
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(ctx->RHS, cp); /* (checked) */
|
||||||
strlcpy(ctx->RHS, cp, RHSlen);
|
|
||||||
#else
|
|
||||||
strcpy(ctx->RHS, cp);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAVE_STRLCPY
|
strcpy(ctx->RHS, "."); /* (checked) */
|
||||||
strlcpy(ctx->RHS, ".", RHSlen);
|
strcat(ctx->RHS, cp); /* (checked) */
|
||||||
#else
|
|
||||||
strcpy(ctx->RHS, ".");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_STRLCAT
|
|
||||||
strlcat(ctx->RHS, cp, RHSlen);
|
|
||||||
#else
|
|
||||||
strcat(ctx->RHS, cp);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +499,7 @@ init(struct hesiod_p *ctx) {
|
|||||||
if (!ctx->res && !__hesiod_res_get(ctx))
|
if (!ctx->res && !__hesiod_res_get(ctx))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (((ctx->res->options & RES_INIT) == 0) &&
|
if (((ctx->res->options & RES_INIT) == 0U) &&
|
||||||
(res_ninit(ctx->res) == -1))
|
(res_ninit(ctx->res) == -1))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -387,7 +387,7 @@ irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen) {
|
|||||||
|
|
||||||
if (sscanf(line, "%d", &code) != 1) {
|
if (sscanf(line, "%d", &code) != 1) {
|
||||||
code = 0;
|
code = 0;
|
||||||
} else if (text != NULL && textlen > 0) {
|
} else if (text != NULL && textlen > 0U) {
|
||||||
p = line;
|
p = line;
|
||||||
while (isspace((unsigned char)*p)) p++;
|
while (isspace((unsigned char)*p)) p++;
|
||||||
while (isdigit((unsigned char)*p)) p++;
|
while (isdigit((unsigned char)*p)) p++;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright(c) 1996, 1998 by Internet Software Consortium.
|
* Portions Copyright(c) 1996, 1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996 by Internet Software Consortium.
|
* Copyright (c) 1996 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
* Portions Copyright (c) 1996,1998 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
* Portions Copyright (c) 1996 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -508,7 +508,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
|
|||||||
|
|
||||||
/* gr_name field */
|
/* gr_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,7 +523,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
|
|||||||
/* gr_gid field */
|
/* gr_gid field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
t = strtol(tmpbuf, &tb, 10);
|
t = strtol(tmpbuf, &tb, 10);
|
||||||
@ -679,7 +679,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
|
|||||||
|
|
||||||
/* s_name field */
|
/* s_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -700,7 +700,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
|
|||||||
/* s_port field */
|
/* s_port field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
t = strtol(tmpbuf, &tb, 10);
|
t = strtol(tmpbuf, &tb, 10);
|
||||||
@ -837,7 +837,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
|
|||||||
|
|
||||||
/* p_name field */
|
/* p_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,7 +858,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
|
|||||||
/* p_proto field */
|
/* p_proto field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
t = strtol(tmpbuf, &tb, 10);
|
t = strtol(tmpbuf, &tb, 10);
|
||||||
@ -1040,7 +1040,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
|||||||
|
|
||||||
/* h_name field */
|
/* h_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1061,7 +1061,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
|||||||
/* h_addrtype field */
|
/* h_addrtype field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||||
@ -1075,7 +1075,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
|||||||
/* h_length field */
|
/* h_length field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
t = strtol(tmpbuf, &tb, 10);
|
t = strtol(tmpbuf, &tb, 10);
|
||||||
@ -1428,7 +1428,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
|||||||
|
|
||||||
/* n_name field */
|
/* n_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1449,7 +1449,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
|||||||
/* h_addrtype field */
|
/* h_addrtype field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||||
@ -1463,7 +1463,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
|||||||
/* n_net field */
|
/* n_net field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
nnet = 0;
|
nnet = 0;
|
||||||
@ -1605,7 +1605,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
|||||||
|
|
||||||
/* n_name field */
|
/* n_name field */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1626,7 +1626,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
|||||||
/* h_addrtype field */
|
/* h_addrtype field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||||
@ -1640,7 +1640,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
|||||||
/* n_net field */
|
/* n_net field */
|
||||||
tb = tmpbuf;
|
tb = tmpbuf;
|
||||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||||
strlen(tb) == 0) {
|
strlen(tb) == 0U) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
|
bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
|
||||||
@ -1961,12 +1961,12 @@ strcmp_nws(const char *a, const char *b) {
|
|||||||
static void
|
static void
|
||||||
free_array(char **argv, size_t entries) {
|
free_array(char **argv, size_t entries) {
|
||||||
char **p = argv;
|
char **p = argv;
|
||||||
int useEntries = (entries > 0);
|
int useEntries = (entries > 0U);
|
||||||
|
|
||||||
if (argv == NULL)
|
if (argv == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while ((useEntries && entries > 0) || *p) {
|
while ((useEntries && entries > 0U) || *p) {
|
||||||
if (*p)
|
if (*p)
|
||||||
free(*p);
|
free(*p);
|
||||||
p++;
|
p++;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -44,10 +44,12 @@ static const char rcsid[] = "$Id$";
|
|||||||
|
|
||||||
#include "irs_data.h"
|
#include "irs_data.h"
|
||||||
#undef _res
|
#undef _res
|
||||||
|
#if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
#undef h_errno
|
#undef h_errno
|
||||||
|
extern int h_errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern struct __res_state _res;
|
extern struct __res_state _res;
|
||||||
extern int h_errno;
|
|
||||||
|
|
||||||
#ifdef DO_PTHREADS
|
#ifdef DO_PTHREADS
|
||||||
static pthread_key_t key;
|
static pthread_key_t key;
|
||||||
@ -119,12 +121,15 @@ net_data_destroy(void *p) {
|
|||||||
struct net_data *
|
struct net_data *
|
||||||
net_data_init(const char *conf_file) {
|
net_data_init(const char *conf_file) {
|
||||||
#ifdef DO_PTHREADS
|
#ifdef DO_PTHREADS
|
||||||
|
#ifndef LIBBIND_MUTEX_INITIALIZER
|
||||||
|
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||||
|
#endif
|
||||||
static pthread_mutex_t keylock;
|
static pthread_mutex_t keylock;
|
||||||
struct net_data *net_data;
|
struct net_data *net_data;
|
||||||
|
|
||||||
if (!once) {
|
if (!once) {
|
||||||
// OpenBeOS compatibility
|
/* XXX: Haiku has non-constant mutex initializer! Must init here. */
|
||||||
keylock = PTHREAD_MUTEX_INITIALIZER;
|
keylock = LIBBIND_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
pthread_mutex_lock(&keylock);
|
pthread_mutex_lock(&keylock);
|
||||||
if (!once++)
|
if (!once++)
|
||||||
@ -133,6 +138,7 @@ net_data_init(const char *conf_file) {
|
|||||||
}
|
}
|
||||||
net_data = tls_get(key);
|
net_data = tls_get(key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (net_data == NULL) {
|
if (net_data == NULL) {
|
||||||
net_data = net_data_create(conf_file);
|
net_data = net_data_create(conf_file);
|
||||||
if (net_data == NULL)
|
if (net_data == NULL)
|
||||||
@ -170,7 +176,7 @@ net_data_create(const char *conf_file) {
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((net_data->res->options & RES_INIT) == 0 &&
|
if ((net_data->res->options & RES_INIT) == 0U &&
|
||||||
res_ninit(net_data->res) == -1) {
|
res_ninit(net_data->res) == -1) {
|
||||||
(*net_data->irs->close)(net_data->irs);
|
(*net_data->irs->close)(net_data->irs);
|
||||||
memput(net_data, sizeof (struct net_data));
|
memput(net_data, sizeof (struct net_data));
|
||||||
@ -180,8 +186,6 @@ net_data_create(const char *conf_file) {
|
|||||||
return (net_data);
|
return (net_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
net_data_minimize(struct net_data *net_data) {
|
net_data_minimize(struct net_data *net_data) {
|
||||||
res_nclose(net_data->res);
|
res_nclose(net_data->res);
|
||||||
@ -197,6 +201,13 @@ __res_state(void) {
|
|||||||
|
|
||||||
return (&_res);
|
return (&_res);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#ifdef __linux
|
||||||
|
struct __res_state *
|
||||||
|
__res_state(void) {
|
||||||
|
return (&_res);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int *
|
int *
|
||||||
@ -205,13 +216,22 @@ __h_errno(void) {
|
|||||||
struct net_data *net_data = net_data_init(NULL);
|
struct net_data *net_data = net_data_init(NULL);
|
||||||
if (net_data && net_data->res)
|
if (net_data && net_data->res)
|
||||||
return (&net_data->res->res_h_errno);
|
return (&net_data->res->res_h_errno);
|
||||||
|
#if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
|
return(&_res.res_h_errno);
|
||||||
|
#else
|
||||||
return (&h_errno);
|
return (&h_errno);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
__h_errno_set(struct __res_state *res, int err) {
|
__h_errno_set(struct __res_state *res, int err) {
|
||||||
|
|
||||||
|
|
||||||
|
#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
|
res->res_h_errno = err;
|
||||||
|
#else
|
||||||
h_errno = res->res_h_errno = err;
|
h_errno = res->res_h_errno = err;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /*__BIND_NOSTATIC*/
|
#endif /*__BIND_NOSTATIC*/
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
@ -106,7 +106,7 @@ lcl_res_get(struct irs_acc *this) {
|
|||||||
lcl_res_set(this, res, free);
|
lcl_res_set(this, res, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lcl->res->options & RES_INIT) == 0 &&
|
if ((lcl->res->options & RES_INIT) == 0U &&
|
||||||
res_ninit(lcl->res) < 0)
|
res_ninit(lcl->res) < 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
||||||
@ -569,7 +569,7 @@ init(struct irs_ho *this) {
|
|||||||
|
|
||||||
if (!pvt->res && !ho_res_get(this))
|
if (!pvt->res && !ho_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
res_ninit(pvt->res) == -1)
|
res_ninit(pvt->res) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(LINT) && !defined(CODECENTER)
|
#if !defined(LINT) && !defined(CODECENTER)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -364,7 +364,7 @@ init(struct irs_nw *this) {
|
|||||||
|
|
||||||
if (!pvt->res && !nw_res_get(this))
|
if (!pvt->res && !nw_res_get(this))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||||
res_ninit(pvt->res) == -1)
|
res_ninit(pvt->res) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996,1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
* copyright notice and this permission notice appear in all copies.
|
* copyright notice and this permission notice appear in all copies.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
@ -36,6 +36,9 @@ static const char rcsid[] = "$Id$";
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#ifdef T_NULL
|
||||||
|
#undef T_NULL /* Silence re-definition warning of T_NULL. */
|
||||||
|
#endif
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user