1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
|
#define ATTR_NORETURN __attribute__((__noreturn__))
#define BIND8_STATS /**/
/* #undef CHROOTDIR */
#define CONFCMDLINE "--prefix= --sbindir=/bin --with-zonesdir=/etc/nsd/zone --with-pidfile=/run/nsd.pid --without-ssl --without-libevent"
#define CONFIGDIR "/etc/nsd"
#define CONFIGFILE "/etc/nsd/nsd.conf"
#define CPU_OR_THREE_ARGS 1
/* #undef DARWIN_BROKEN_SETREUID */
#define DBFILE "/var/db/nsd/nsd.db"
/* #undef DNSTAP_SOCKET_PATH */
#define EDNS_MAX_MESSAGE_LEN 1232
#define FACILITY LOG_DAEMON
#define HAVE_ACCEPT4 1
#define HAVE_ALARM 1
#define HAVE_ARC4RANDOM 1
#define HAVE_ARC4RANDOM_UNIFORM 1
#define HAVE_ARPA_INET_H 1
#define HAVE_ATTR_FORMAT 1
#define HAVE_ATTR_NORETURN 1
#define HAVE_ATTR_UNUSED 1
/* #undef HAVE_B64_NTOP */
/* #undef HAVE_B64_PTON */
#define HAVE_BASENAME 1
#define HAVE_CHOWN 1
#define HAVE_CHROOT 1
#define HAVE_CLOCK_GETTIME 1
/* #undef HAVE_CPUID_T */
/* #undef HAVE_CPUSET_T */
#define HAVE_CPU_SET_T 1
/* #undef HAVE_CRYPTO_MEMCMP */
#define HAVE_CTIME_R_PROTO 1
#define HAVE_DECL_REALLOCARRAY 1
/* #undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO */
/* #undef HAVE_DECL_SSL_CTX_SET_TMP_ECDH */
#define HAVE_DUP2 1
/* #undef HAVE_EC_KEY_NEW_BY_CURVE_NAME */
#define HAVE_ENDIAN_H 1
#define HAVE_ENDPWENT 1
/* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
/* #undef HAVE_EVENT_BASE_FREE */
/* #undef HAVE_EVENT_BASE_GET_METHOD */
/* #undef HAVE_EVENT_BASE_NEW */
/* #undef HAVE_EVENT_BASE_ONCE */
/* #undef HAVE_EVENT_H */
/* #undef HAVE_EVP_CLEANUP */
/* #undef HAVE_EVP_MAC_CTX_NEW */
/* #undef HAVE_EVP_MAC_CTX_SET_PARAMS */
/* #undef HAVE_EV_DEFAULT_LOOP */
/* #undef HAVE_EV_LOOP */
#define HAVE_FCNTL_H 1
#define HAVE_FORK 1
#define HAVE_FREEADDRINFO 1
#define HAVE_FSEEKO 1
#define HAVE_GAI_STRERROR 1
#define HAVE_GETADDRINFO 1
#define HAVE_GETHOSTNAME 1
#define HAVE_GETIFADDRS 1
#define HAVE_GETNAMEINFO 1
#define HAVE_GETPWNAM 1
#define HAVE_GETRANDOM 1
#define HAVE_GLOB 1
#define HAVE_GLOB_H 1
#define HAVE_GRP_H 1
/* #undef HAVE_HMAC_CTX_NEW */
/* #undef HAVE_HMAC_CTX_RESET */
#define HAVE_IFADDRS_H 1
#define HAVE_INET_ATON 1
#define HAVE_INET_NTOP 1
#define HAVE_INET_PTON 1
#define HAVE_INITGROUPS 1
#define HAVE_INTTYPES_H 1
/* #undef HAVE_LIBCRYPTO */
#define HAVE_LIMITS_H 1
#define HAVE_LOCALTIME_R 1
/* #undef HAVE_LOGIN_CAP_H */
#define HAVE_MALLOC 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMORY_H 1
#define HAVE_MEMSET 1
#define HAVE_MMAP 1
#define HAVE_MMSGHDR 1
/* #undef HAVE_MUNMAP */
#define HAVE_NETDB_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_NETINET_TCP_H 1
/* #undef HAVE_OPENSSL_CORE_NAMES_H */
/* #undef HAVE_OPENSSL_ERR_H */
/* #undef HAVE_OPENSSL_INIT_CRYPTO */
/* #undef HAVE_OPENSSL_INIT_SSL */
/* #undef HAVE_OPENSSL_OCSP_H */
/* #undef HAVE_OPENSSL_RAND_H */
/* #undef HAVE_OPENSSL_SSL_H */
#define HAVE_PPOLL 1
#define HAVE_PSELECT 1
#define HAVE_PSELECT_PROTO 1
#define HAVE_PWRITE 1
#define HAVE_REALLOCARRAY 1
/* #undef HAVE_RECVMMSG */
#define HAVE_SCHED_H 1
#define HAVE_SCHED_SETAFFINITY 1
/* #undef HAVE_SENDMMSG */
/* #undef HAVE_SETPROCTITLE */
#define HAVE_SETREGID 1
#define HAVE_SETRESGID 1
#define HAVE_SETRESUID 1
#define HAVE_SETREUID 1
/* #undef HAVE_SETUSERCONTEXT */
#define HAVE_SIGACTION 1
#define HAVE_SIGNAL_H 1
#define HAVE_SIGPROCMASK 1
#define HAVE_SNPRINTF 1
#define HAVE_SOCKET 1
/* #undef HAVE_SSL */
/* #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL */
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRCASECMP 1
#define HAVE_STRCHR 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRLCAT 1
#define HAVE_STRLCPY 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRPTIME 1
#define HAVE_STRTOL 1
/* #undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN */
/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */
#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
#define HAVE_STRUCT_TIMESPEC 1
#define HAVE_SYSCONF 1
/* #undef HAVE_SYSLOG_H */
/* #undef HAVE_SYSTEMD */
/* #undef HAVE_SYS_BITYPES_H */
/* #undef HAVE_SYS_CPUSET_H */
/* #undef HAVE_SYS_MMAN_H */
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_RANDOM_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_SYS_WAIT_H 1
/* #undef HAVE_TCPD_H */
#define HAVE_TIME_H 1
#define HAVE_TIMINGSAFE_MEMCMP 1
#define HAVE_TZSET 1
#define HAVE_UNISTD_H 1
/* #undef HAVE_VA_LIST_DOUBLE_DEF */
#define HAVE_VFORK 1
/* #undef HAVE_VFORK_H */
#define HAVE_WORKING_FORK 1
#define HAVE_WORKING_VFORK 1
#define HAVE_WRITEV 1
#define IDENTITY "unidentified server"
#define INET6 /**/
/* #undef LEX_DEFINES_YY_CURRENT_BUFFER */
#define MAXSYSLOGMSGLEN 512
/* #undef MEMCLEAN */
/* #undef MEMCMP_IS_BROKEN */
#define MINIMAL_RESPONSES /**/
/* #undef MKDIR_HAS_ONE_ARG */
#define NDEBUG /**/
/* #undef NONBLOCKING_IS_BROKEN */
#define NSD_CONTROL_PORT 8952
#define NSD_CONTROL_VERSION 1
#define NSD_START_PATH "/bin/nsd"
/* #undef NSEC3 */
#define PACKAGE_BUGREPORT "nsd-bugs@nlnetlabs.nl"
#define PACKAGE_NAME "NSD"
#define PACKAGE_STRING "NSD 4.3.6"
#define PACKAGE_TARNAME "nsd"
#define PACKAGE_URL ""
#define PACKAGE_VERSION "4.3.6"
/* #undef PACKED_STRUCTS */
#define PIDFILE "/run/nsd.pid"
/* #undef RATELIMIT */
/* #undef RATELIMIT_DEFAULT_OFF */
/* #undef REALLOCARRAY_NEEDS_DEFINES */
#define RETSIGTYPE void
/* #undef ROOT_SERVER */
#define SIZEOF_OFF_T 8
#define SIZEOF_VOIDP 8
#define STDC_HEADERS 1
/* #undef STRPTIME_NEEDS_DEFINES */
#define STRPTIME_WORKS 1
#define TCP_BACKLOG 256
#define TCP_MAX_MESSAGE_LEN 65535
#define TCP_PORT "53"
#define TCP_TIMEOUT 120
#define TLS_PORT "853"
#define UDP_MAX_MESSAGE_LEN 512
#define UDP_PORT "53"
#define USER "nsd"
/* #undef USE_DNSTAP */
#define USE_MINI_EVENT 1
/* #undef USE_MMAP_ALLOC */
#define USE_RADIX_TREE /**/
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* #undef USE_TCP_FASTOPEN */
/* #undef USE_ZONE_STATS */
#define VERSION PACKAGE_STRING
#define XFRDFILE "/var/db/nsd/xfrd.state"
#define XFRDIR "/tmp"
/* #undef YYTEXT_POINTER */
#define ZONELISTFILE "/var/db/nsd/zone.list"
#define ZONESDIR "/etc/nsd/zone"
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* #undef _FILE_OFFSET_BITS */
/* #undef _LARGEFILE_SOURCE */
/* #undef _LARGE_FILES */
/* #undef _MINIX */
/* #undef _NETBSD_SOURCE */
/* #undef _POSIX_1_SOURCE */
/* #undef _POSIX_SOURCE */
/* #undef const */
/* #undef gid_t */
/* #undef in_addr_t */
#ifndef __cplusplus
/* #undef inline */
#endif
/* #undef int16_t */
/* #undef int32_t */
/* #undef int64_t */
/* #undef int8_t */
/* #undef malloc */
/* #undef off_t */
/* #undef pid_t */
/* #undef sig_atomic_t */
/* #undef size_t */
/* #undef socklen_t */
/* #undef ss_family */
/* #undef ssize_t */
/* #undef suseconds_t */
/* #undef uid_t */
/* #undef uint16_t */
/* #undef uint32_t */
/* #undef uint64_t */
/* #undef uint8_t */
/* #undef uintptr_t */
/* #undef vfork */
#if (defined(HAVE_PSELECT) && !defined (HAVE_PSELECT_PROTO)) \
|| !defined (HAVE_CTIME_R_PROTO) \
|| defined (STRPTIME_NEEDS_DEFINES) || defined(REALLOCARRAY_NEEDS_DEFINES)
# ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
# endif
# ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200112
# endif
# ifndef _BSD_SOURCE
# define _BSD_SOURCE 1
# endif
# ifndef _OPENBSD_SOURCE
# define _OPENBSD_SOURCE 1
# endif
# ifndef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
# endif
# ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
# endif
# ifndef _STDC_C99
# define _STDC_C99 1
# endif
# ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
# endif
#endif
#ifdef HAVE_VA_LIST_DOUBLE_DEF
# ifndef _VA_LIST_DEFINED
# define _VA_LIST_DEFINED
# endif
#endif
#include <sys/types.h>
#include <stdlib.h>
#include <stddef.h>
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_SYS_BITYPES_H
#include <sys/bitypes.h>
#endif
#ifdef HAVE_ATTR_FORMAT
#define ATTR_FORMAT(archetype, string_index, first_to_check) \
__attribute__ ((format (archetype, string_index, first_to_check)))
#else /* !HAVE_ATTR_FORMAT */
#define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
#endif /* !HAVE_ATTR_FORMAT */
#if defined(__cplusplus)
#define ATTR_UNUSED(x)
#elif defined(HAVE_ATTR_UNUSED)
#define ATTR_UNUSED(x) x __attribute__((unused))
#else /* !HAVE_ATTR_UNUSED */
#define ATTR_UNUSED(x) x
#endif /* !HAVE_ATTR_UNUSED */
#ifndef IPV6_MIN_MTU
#define IPV6_MIN_MTU 1280
#endif /* IPV6_MIN_MTU */
#ifndef AF_INET6
#define AF_INET6 28
#endif /* AF_INET6 */
#define MAXINCLUDES 10
#ifndef HAVE_B64_NTOP
int b64_ntop(uint8_t const *src, size_t srclength,
char *target, size_t targsize);
#endif /* !HAVE_B64_NTOP */
#ifndef HAVE_B64_PTON
int b64_pton(char const *src, uint8_t *target, size_t targsize);
#endif /* !HAVE_B64_PTON */
#ifndef HAVE_FSEEKO
#define fseeko fseek
#define ftello ftell
#endif /* HAVE_FSEEKO */
#ifndef HAVE_SNPRINTF
#include <stdarg.h>
int snprintf (char *str, size_t count, const char *fmt, ...);
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif /* HAVE_SNPRINTF */
#ifndef HAVE_INET_PTON
int inet_pton(int af, const char* src, void* dst);
#endif /* HAVE_INET_PTON */
#ifndef HAVE_INET_NTOP
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#ifndef HAVE_INET_ATON
int inet_aton(const char *cp, struct in_addr *addr);
#endif
#ifndef HAVE_MEMMOVE
void *memmove(void *dest, const void *src, size_t n);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_REALLOCARRAY
void* reallocarray(void *ptr, size_t nmemb, size_t size);
#endif
#ifndef HAVE_GETADDRINFO
#include "compat/fake-rfc2553.h"
#endif
#ifndef HAVE_STRPTIME
#define HAVE_STRPTIME 1
char *strptime(const char *s, const char *format, struct tm *tm);
#endif
#ifndef STRPTIME_WORKS
#define STRPTIME_WORKS 1
char *nsd_strptime(const char *s, const char *format, struct tm *tm);
#define strptime(a,b,c) nsd_strptime((a),(b),(c))
#endif
#if (HAVE_CPU_SET_T || HAVE_CPUSET_T)
#include "compat/cpuset.h"
#endif
#ifndef HAVE_SETPROCTITLE
#ifdef __linux__
#define HAVE_SETPROCTITLE 1
#include <stdarg.h>
void setproctitle(const char *fmt, ...);
#endif
#endif
#ifdef MEMCMP_IS_BROKEN
#include "compat/memcmp.h"
#define memcmp memcmp_nsd
int memcmp(const void *x, const void *y, size_t n);
#endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
#ifndef CONFIG_DEFINES
#define CONFIG_DEFINES
#ifndef HAVE_STRUCT_TIMESPEC
#ifndef __timespec_defined
#define __timespec_defined 1
struct timespec {
long tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
#endif /* !__timespec_defined */
#endif /* !HAVE_STRUCT_TIMESPEC */
#endif /* !CONFIG_DEFINES */
#ifdef PACKED_STRUCTS
#define ATTR_PACKED __attribute__((packed))
#else
#define ATTR_PACKED
#endif
|