Blame
Date:
Thu Sep 10 14:45:56 2020 UTC
Message:
I want to stick with ldns-verify-zone
001
2016-07-06
pjp
/*
002
2020-06-28
pjp
* Copyright (c) 2002-2020 Peter J. Philipp
003
2016-07-06
pjp
* All rights reserved.
004
2016-07-06
pjp
*
005
2016-07-06
pjp
* Redistribution and use in source and binary forms, with or without
006
2016-07-06
pjp
* modification, are permitted provided that the following conditions
007
2016-07-06
pjp
* are met:
008
2016-07-06
pjp
* 1. Redistributions of source code must retain the above copyright
009
2016-07-06
pjp
* notice, this list of conditions and the following disclaimer.
010
2016-07-06
pjp
* 2. Redistributions in binary form must reproduce the above copyright
011
2016-07-06
pjp
* notice, this list of conditions and the following disclaimer in the
012
2016-07-06
pjp
* documentation and/or other materials provided with the distribution.
013
2016-07-06
pjp
* 3. The name of the author may not be used to endorse or promote products
014
2016-07-06
pjp
* derived from this software without specific prior written permission
015
2016-07-06
pjp
*
016
2016-07-06
pjp
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
017
2016-07-06
pjp
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
018
2016-07-06
pjp
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
019
2016-07-06
pjp
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
020
2016-07-06
pjp
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
021
2016-07-06
pjp
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
022
2016-07-06
pjp
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
023
2016-07-06
pjp
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
024
2016-07-06
pjp
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
025
2016-07-06
pjp
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
026
2016-07-06
pjp
*
027
2016-07-06
pjp
*/
028
2017-10-26
pjp
029
2017-10-26
pjp
/*
030
2020-08-01
pjp
* $Id: ddd-dns.h,v 1.30 2020/08/01 09:01:52 pjp Exp $
031
2017-10-26
pjp
*/
032
2017-10-26
pjp
033
2016-07-06
pjp
#ifndef _DNS_H
034
2016-07-06
pjp
#define _DNS_H
035
2016-07-06
pjp
036
2016-07-06
pjp
037
2016-07-06
pjp
/* RFC 1035 - page 26 */
038
2016-07-06
pjp
039
2016-07-06
pjp
struct dns_header {
040
2016-07-06
pjp
u_int16_t id; /* ID of header */
041
2016-07-06
pjp
u_int16_t query;
042
2016-07-06
pjp
u_int16_t question; /* # of question entries */
043
2016-07-06
pjp
u_int16_t answer; /* # of answer RR's */
044
2016-07-06
pjp
u_int16_t nsrr; /* # of NS RR's */
045
2016-07-06
pjp
u_int16_t additional; /* # additional RR's */
046
2016-07-06
pjp
};
047
2016-07-06
pjp
048
2016-07-06
pjp
struct dns_hints {
049
2016-07-06
pjp
int proto;
050
2016-07-06
pjp
u_int16_t id;
051
2016-07-06
pjp
u_int16_t query;
052
2016-07-06
pjp
u_int16_t question;
053
2016-07-06
pjp
u_int16_t answer;
054
2016-07-06
pjp
u_int16_t nsrr;
055
2016-07-06
pjp
u_int16_t additional;
056
2016-07-06
pjp
};
057
2016-07-06
pjp
058
2016-07-06
pjp
/*
059
2016-07-06
pjp
* resource record structure
060
2016-07-06
pjp
* RFC 1035 - page 9
061
2016-07-06
pjp
*/
062
2016-07-06
pjp
063
2016-07-06
pjp
struct dns_rr {
064
2016-07-06
pjp
char *name; /* name of zone */
065
2016-07-06
pjp
char *question; /* pointer to question */
066
2016-07-06
pjp
u_int16_t type; /* type of RR */
067
2016-07-06
pjp
u_int16_t class; /* class of reply */
068
2016-07-06
pjp
u_int32_t ttl; /* ttl of record */
069
2016-07-06
pjp
u_int16_t rdlen; /* length of record */
070
2016-07-06
pjp
char *rdata; /* data of record */
071
2016-07-06
pjp
};
072
2016-07-06
pjp
073
2016-07-06
pjp
/*
074
2016-07-06
pjp
* EDNS0 OPT RR, based on dns_rr
075
2016-07-06
pjp
* RFC 6891 - page 7
076
2016-07-06
pjp
*/
077
2016-07-06
pjp
078
2016-07-06
pjp
struct dns_optrr {
079
2016-07-06
pjp
char name[1]; /* always 0 */
080
2016-07-06
pjp
u_int16_t type; /* must be 41 */
081
2016-07-06
pjp
u_int16_t class; /* UDP payload size (4096) */
082
2016-07-06
pjp
u_int32_t ttl; /* extended RCODE */
083
2016-07-06
pjp
u_int16_t rdlen; /* length of all RDATA */
084
2016-07-06
pjp
char rdata[0]; /* attribute, value pairs */
085
2016-07-06
pjp
}__attribute__((packed));
086
2016-07-06
pjp
087
2019-02-24
pjp
/*
088
2019-02-24
pjp
* TSIG RR, based on dns_rr
089
2019-02-24
pjp
* RFC 2845 and RFC 4635 (for SHA-256)
090
2019-02-24
pjp
*/
091
2019-02-24
pjp
092
2019-02-24
pjp
struct dns_tsigrr {
093
2019-02-24
pjp
u_int64_t timefudge; /* time (48 bits) and fudge */
094
2019-02-24
pjp
u_int16_t macsize; /* MAC size == 32 */
095
2019-02-24
pjp
char mac[32]; /* SHA-256 MAC */
096
2019-02-24
pjp
/* empty unless error == badtime */
097
2019-02-24
pjp
} __attribute__((packed));
098
2019-02-24
pjp
099
2016-07-06
pjp
/* RFC 1035 - page 28 */
100
2016-07-06
pjp
struct dns_question_hdr {
101
2016-07-06
pjp
char *name;
102
2020-07-16
pjp
char *original_name;
103
2016-07-06
pjp
u_int namelen;
104
2016-07-06
pjp
u_int16_t qtype;
105
2016-07-06
pjp
u_int16_t qclass;
106
2016-07-06
pjp
};
107
2016-07-06
pjp
108
2016-07-06
pjp
/*
109
2016-07-06
pjp
* flags RFC 1035, page 26
110
2016-07-06
pjp
*/
111
2016-07-06
pjp
112
2016-07-06
pjp
#define DNS_REPLY 0x8000 /* if set response if not set query */
113
2020-06-28
pjp
#define DNS_UPDATE 0x2800 /* a DNS Update RFC 2136 */
114
2016-07-06
pjp
#define DNS_NOTIFY 0x2000 /* a NOTIFY query RFC 1996 */
115
2016-07-06
pjp
#define DNS_SREQ 0x1000 /* if set a server status request (STATUS) */
116
2016-07-06
pjp
#define DNS_INV 0x800 /* if set an inverse query */
117
2016-07-06
pjp
#define DNS_AUTH 0x400 /* Authoritative Answer (AA) in replies */
118
2016-07-06
pjp
#define DNS_TRUNC 0x200 /* Truncated (TC) */
119
2016-07-06
pjp
#define DNS_RECURSE 0x100 /* if set Recursion Desired (RD) */
120
2016-07-06
pjp
#define DNS_RECAVAIL 0x80 /* if set Recursion Available (RA) */
121
2020-07-18
pjp
#define DNS_AD 0x20 /* if set, Authentic Data (AD), RFC 2535 */
122
2020-07-18
pjp
#define DNS_CD 0x10 /* if set, Checking Disabled (CD), RFC 2535 */
123
2020-08-01
pjp
/* lower 4 bits of RCODE's 0x00 through 0x0F, below */
124
2020-06-27
pjp
#define DNS_NOTZONE 0xA /* RCODE - Not within zone section RFC 2136 */
125
2019-02-24
pjp
#define DNS_NOTAUTH 0x9 /* RCODE - Not Authenticated RFC 2845 */
126
2020-06-27
pjp
#define DNS_NXRRSET 0x8 /* RCODE - RRSET should exist, but doesn't */
127
2020-06-27
pjp
#define DNS_YXRRSET 0x7 /* RCODE - RRSET should not exist, but does */
128
2020-06-27
pjp
#define DNS_YXDOMAIN 0x6 /* RCODE - Should not exist but does RFC 2136 */
129
2016-07-06
pjp
#define DNS_REFUSED 0x5 /* RCODE - Refused */
130
2016-07-06
pjp
#define DNS_NOTIMPL 0x4 /* RCODE - Not Implemented */
131
2016-07-06
pjp
#define DNS_NAMEERR 0x3 /* RCODE - Name Error, NXDOMAIN */
132
2016-07-06
pjp
#define DNS_SERVFAIL 0x2 /* RCODE - Server Failure */
133
2016-07-06
pjp
#define DNS_FORMATERR 0x1 /* RCODE - Format Error */
134
2016-07-06
pjp
#define DNS_NOERR 0x0 /* RCODE - No error */
135
2016-07-06
pjp
136
2020-08-01
pjp
/* Extended RCODE's (part of EDNS0 RFC 2671) */
137
2020-08-01
pjp
138
2020-08-01
pjp
#define DNS_BADALG 0x15 /* RCODE (21) BADALG RFC 2930 sect. 2.6 */
139
2020-08-01
pjp
#define DNS_BADNAME 0x14 /* RCODE (20) BADNAME RFC 2930 sect. 2.6 */
140
2020-08-01
pjp
#define DNS_BADMODE 0x13 /* RCODE (19) BADMODE RFC 2930 sect. 2.6 */
141
2020-08-01
pjp
142
2020-08-01
pjp
/* When DNS_NOTAUTH, add a TSIG header with the following error codes */
143
2020-08-01
pjp
144
2019-02-24
pjp
#define DNS_BADTIME 0x12 /* RCODE (18) BADTIME RFC 2845 p. 3 */
145
2019-02-24
pjp
#define DNS_BADKEY 0x11 /* RCODE (17) BADKEY RFC 2845 p. 3 */
146
2019-02-24
pjp
#define DNS_BADSIG 0x10 /* RCODE (16) BADSIG RFC 2845 p. 3 */
147
2020-08-01
pjp
#define DNS_BADVERS 0x10 /* RCODE (16) BADVERS RFC 2671 p. 6 */
148
2020-08-01
pjp
149
2020-08-01
pjp
/* END of Extended RCODE's */
150
2020-08-01
pjp
151
2016-07-06
pjp
/*
152
2016-07-06
pjp
* macros to set flags (must be converted to network byte order after)
153
2016-07-06
pjp
*/
154
2016-07-06
pjp
155
2016-07-06
pjp
#define SET_DNS_REPLY(x) ((x)->query |= (DNS_REPLY))
156
2016-07-06
pjp
#define SET_DNS_QUERY(x) ((x)->query &= ~(DNS_REPLY))
157
2016-07-06
pjp
#define SET_DNS_NOTIFY(x) ((x)->query |= (DNS_NOTIFY))
158
2016-07-06
pjp
#define SET_DNS_STATUS_REQ(x) ((x)->query |= (DNS_SREQ))
159
2016-07-06
pjp
#define SET_DNS_INVERSE_QUERY(x) ((x)->query |= (DNS_INV))
160
2016-07-06
pjp
#define SET_DNS_AUTHORITATIVE(x) ((x)->query |= (DNS_AUTH))
161
2016-07-06
pjp
#define SET_DNS_TRUNCATION(x) ((x)->query |= (DNS_TRUNC))
162
2016-07-06
pjp
#define SET_DNS_RECURSION(x) ((x)->query |= (DNS_RECURSE))
163
2016-07-06
pjp
#define SET_DNS_RECURSION_AVAIL(x) ((x)->query |= (DNS_RECAVAIL))
164
2020-07-18
pjp
#define SET_DNS_AUTHENTIC_DATA(x) ((x)->query |= (DNS_AD))
165
2020-07-18
pjp
#define SET_DNS_CHECKING_DISABLED(x) ((x)->query |= (DNS_CD))
166
2016-07-06
pjp
#define SET_DNS_RCODE_REFUSED(x) ((x)->query |= (DNS_REFUSED))
167
2016-07-06
pjp
#define SET_DNS_RCODE_NOTIMPL(x) ((x)->query |= (DNS_NOTIMPL))
168
2016-07-06
pjp
#define SET_DNS_RCODE_NAMEERR(x) ((x)->query |= (DNS_NAMEERR))
169
2016-07-06
pjp
#define SET_DNS_RCODE_SERVFAIL(x) ((x)->query |= (DNS_SERVFAIL))
170
2016-07-06
pjp
#define SET_DNS_RCODE_FORMATERR(x) ((x)->query |= (DNS_FORMATERR))
171
2016-07-06
pjp
#define SET_DNS_RCODE_NOERR(x) ((x)->query |= (DNS_NOERR))
172
2019-02-24
pjp
#define SET_DNS_RCODE_NOTAUTH(x) ((x)->query |= (DNS_NOTAUTH))
173
2016-07-06
pjp
174
2016-07-06
pjp
#define UNSET_DNS_NOTIFY(x) ((x)->query &= ~(DNS_NOTIFY))
175
2016-07-06
pjp
#define UNSET_DNS_STATUS_REQ(x) ((x)->query &= ~(DNS_SREQ))
176
2016-07-06
pjp
#define UNSET_DNS_INVERSE_QUERY(x) ((x)->query &= ~(DNS_INV))
177
2016-07-06
pjp
#define UNSET_DNS_AUTHORITATIVE(x) ((x)->query &= ~(DNS_AUTH))
178
2016-07-06
pjp
#define UNSET_DNS_TRUNCATION(x) ((x)->query &= ~(DNS_TRUNC))
179
2016-07-06
pjp
#define UNSET_DNS_RECURSION(x) ((x)->query &= ~(DNS_RECURSE))
180
2016-07-06
pjp
#define UNSET_DNS_RECURSION_AVAIL(x) ((x)->query &= ~(DNS_RECAVAIL))
181
2020-07-18
pjp
#define UNSET_DNS_AUTHENTIC_DATA(x) ((x)->query &= ~(DNS_AD))
182
2020-07-18
pjp
#define UNSET_DNS_CHECKING_DISABLED(x) ((x)->query &= ~(DNS_CD))
183
2016-07-06
pjp
#define UNSET_DNS_RCODE_REFUSED(x) ((x)->query &= ~(DNS_REFUSED))
184
2016-07-06
pjp
#define UNSET_DNS_RCODE_NOTIMPL(x) ((x)->query &= ~(DNS_NOTIMPL))
185
2016-07-06
pjp
#define UNSET_DNS_RCODE_NAMEERR(x) ((x)->query &= ~(DNS_NAMEERR))
186
2016-07-06
pjp
#define UNSET_DNS_RCODE_SERVFAIL(x) ((x)->query &= ~(DNS_SERVFAIL))
187
2016-07-06
pjp
#define UNSET_DNS_RCODE_FORMATERR(x) ((x)->query &= ~(DNS_FORMATERR))
188
2016-07-06
pjp
#define UNSET_DNS_RCODE_NOERR(x) ((x)->query &= ~(DNS_NOERR))
189
2019-02-24
pjp
#define UNSET_DNS_RCODE_NOTAUTH(x) ((x)->query &= ~(DNS_NOTAUTH))
190
2016-07-06
pjp
191
2016-07-06
pjp
/* DNSSEC/EDNS0 options RFC 3225 */
192
2016-07-06
pjp
193
2016-07-06
pjp
#define DNSSEC_OK 0x8000
194
2016-07-06
pjp
195
2016-07-06
pjp
#define SET_DNS_ERCODE_DNSSECOK(x) ((x)->ttl |= (DNSSEC_OK))
196
2016-07-06
pjp
#define UNSET_DNS_ERCODE_DNSSECOK(x) ((x)->ttl &= ~(DNSSEC_OK))
197
2016-07-06
pjp
198
2016-07-06
pjp
/* DNS types - RFC 1035 page 12 */
199
2016-07-06
pjp
200
2020-07-20
pjp
#define DNS_TYPE_A 1 /* start of RFC 1035 */
201
2016-07-06
pjp
#define DNS_TYPE_NS 2
202
2016-07-06
pjp
#define DNS_TYPE_CNAME 5
203
2016-07-06
pjp
#define DNS_TYPE_SOA 6
204
2016-07-06
pjp
#define DNS_TYPE_PTR 12
205
2020-07-20
pjp
#define DNS_TYPE_HINFO 13
206
2016-07-06
pjp
#define DNS_TYPE_MX 15
207
2020-07-20
pjp
#define DNS_TYPE_TXT 16 /* end of RFC 1035 */
208
2020-07-20
pjp
#define DNS_TYPE_RP 17 /* RFC 1183 */
209
2016-07-06
pjp
210
2016-10-20
pjp
#define DNS_TYPE_AAAA 28 /* quad A - RFC 3596 */
211
2016-10-20
pjp
212
2016-07-06
pjp
#define DNS_TYPE_SRV 33 /* RFC 2782, page 8 */
213
2016-07-06
pjp
#define DNS_TYPE_NAPTR 35 /* RFC 2915, page 3 */
214
2016-07-06
pjp
#define DNS_TYPE_OPT 41 /* RFC 6891, page 7 */
215
2016-07-06
pjp
#define DNS_TYPE_DS 43 /* RFC 4034, section 5 */
216
2016-07-06
pjp
#define DNS_TYPE_SSHFP 44 /* RFC 4255 */
217
2016-07-06
pjp
#define DNS_TYPE_RRSIG 46 /* RFC 4034, section 3 */
218
2016-07-06
pjp
#define DNS_TYPE_NSEC 47 /* RFC 4034, section 4 */
219
2016-07-06
pjp
#define DNS_TYPE_DNSKEY 48 /* RFC 4034, section 2 */
220
2016-07-06
pjp
221
2016-07-06
pjp
#define DNS_TYPE_NSEC3 50 /* RFC 5155, section 3 */
222
2016-07-06
pjp
#define DNS_TYPE_NSEC3PARAM 51 /* RFC 5155, section 4 */
223
2016-07-06
pjp
#define DNS_TYPE_TLSA 52 /* RFC 6698, section 7.1 */
224
2016-07-06
pjp
225
2020-08-01
pjp
#define DNS_TYPE_TKEY 249 /* RFC 2930 */
226
2016-07-06
pjp
#define DNS_TYPE_TSIG 250 /* RFC 2845, page 3 */
227
2016-07-06
pjp
#define DNS_TYPE_IXFR 251 /* RFC 1995, page 2 */
228
2016-07-06
pjp
#define DNS_TYPE_AXFR 252 /* RFC 5936, page 10 */
229
2016-07-06
pjp
#define DNS_TYPE_ANY 255
230
2020-07-20
pjp
#define DNS_TYPE_CAA 257 /* RFC 8659 */
231
2016-07-06
pjp
232
2016-07-06
pjp
/* DNS types 0xff00 -> 0xfffe (private use) RFC 5395, page 8 */
233
2016-07-06
pjp
234
2016-07-06
pjp
#define DNS_TYPE_BALANCE 0xfffe /* split horizon dns */
235
2016-07-06
pjp
#define DNS_TYPE_DELEGATE 0xfffd /* ns delegations */
236
2016-07-06
pjp
#define DNS_TYPE_HINT 0xfffc /* root hint */
237
2016-07-06
pjp
238
2016-07-06
pjp
239
2016-07-06
pjp
240
2016-07-06
pjp
/* DNS CLASSES - RFC 1035 page 13 */
241
2016-07-06
pjp
242
2016-07-06
pjp
#define DNS_CLASS_IN 1 /* internet */
243
2016-07-06
pjp
#define DNS_CLASS_CH 3 /* chaos */
244
2016-07-06
pjp
#define DNS_CLASS_HS 4 /* hesiod */
245
2016-07-06
pjp
246
2020-06-28
pjp
#define DNS_CLASS_NONE 254 /* none class RFC 2136 */
247
2016-07-06
pjp
#define DNS_CLASS_ANY 255 /* any class */
248
2016-07-06
pjp
249
2016-07-06
pjp
/* limits */
250
2016-07-06
pjp
251
2016-07-06
pjp
#define DNS_MAXLABEL 63
252
2016-07-06
pjp
#define DNS_MAXNAME 255
253
2016-07-06
pjp
#define DNS_MAXUDP 512
254
2016-07-06
pjp
255
2016-07-06
pjp
/* SSHFP fingerprint sizes */
256
2016-07-06
pjp
257
2016-07-06
pjp
#define DNS_SSHFP_SIZE_SHA1 20 /* RFC 4255 */
258
2016-07-06
pjp
#define DNS_SSHFP_SIZE_SHA256 32 /* RFC 6594 */
259
2016-07-06
pjp
260
2016-07-06
pjp
/* TLSA fingerprint sizes */
261
2016-07-06
pjp
262
2016-07-06
pjp
#define DNS_TLSA_SIZE_SHA256 32 /* RFC 6698 */
263
2016-07-06
pjp
#define DNS_TLSA_SIZE_SHA512 64 /* RFC 6698 */
264
2016-07-06
pjp
265
2019-02-24
pjp
struct tsig {
266
2020-07-14
pjp
int have_tsig; /* 4 */
267
2020-07-14
pjp
int tsigverified; /* 8 */
268
2020-07-14
pjp
int tsigerrorcode; /* 12 */
269
2020-07-14
pjp
char tsigalg[DNS_MAXNAME]; /* 267 */
270
2020-07-14
pjp
int tsigalglen; /* 271 */
271
2020-07-14
pjp
char tsigkey[DNS_MAXNAME]; /* 526 */
272
2020-07-14
pjp
int tsigkeylen; /* 530 */
273
2020-07-14
pjp
char tsigmac[32]; /* 562 */
274
2020-07-14
pjp
int tsigmaclen; /* 566 */
275
2020-07-14
pjp
u_int64_t tsig_timefudge; /* 574 */
276
2020-07-14
pjp
u_int16_t tsigorigid; /* 576 */
277
2020-07-14
pjp
int tsigoffset; /* 580 */
278
2019-02-24
pjp
};
279
2019-02-24
pjp
280
2019-12-11
pjp
#define DEFAULT_TSIG_FUDGE 300
281
2019-12-11
pjp
282
2016-07-06
pjp
struct question {
283
2016-07-06
pjp
struct dns_question_hdr *hdr;
284
2016-07-06
pjp
char *converted_name;
285
2016-07-06
pjp
u_int16_t edns0len;
286
2016-07-06
pjp
u_int8_t ednsversion;
287
2020-07-21
pjp
int rawsocket;
288
2020-07-06
pjp
int aa;
289
2017-09-05
pjp
int rd;
290
2016-07-06
pjp
int dnssecok;
291
2016-07-06
pjp
int badvers;
292
2019-10-25
pjp
int notify;
293
2019-02-24
pjp
struct tsig tsig;
294
2016-07-06
pjp
};
295
2017-11-28
pjp
296
2017-11-28
pjp
struct parsequestion {
297
2017-11-28
pjp
char name[DNS_MAXNAME];
298
2020-07-16
pjp
char original_name[DNS_MAXNAME];
299
2017-11-28
pjp
u_int namelen;
300
2017-11-28
pjp
u_int16_t qtype;
301
2017-11-28
pjp
u_int16_t qclass;
302
2017-11-28
pjp
char converted_name[DNS_MAXNAME + 1];
303
2017-11-28
pjp
u_int16_t edns0len;
304
2017-11-28
pjp
u_int8_t ednsversion;
305
2017-11-28
pjp
int rd;
306
2017-11-28
pjp
int dnssecok;
307
2019-10-25
pjp
int notify;
308
2017-11-28
pjp
int badvers;
309
2019-02-24
pjp
struct tsig tsig;
310
2017-11-28
pjp
int rc; /* return code */
311
2017-11-28
pjp
#define PARSE_RETURN_ACK 0
312
2017-11-28
pjp
#define PARSE_RETURN_NAK 1
313
2017-11-28
pjp
#define PARSE_RETURN_MALFORMED 2
314
2017-11-28
pjp
#define PARSE_RETURN_NOQUESTION 3
315
2017-11-28
pjp
#define PARSE_RETURN_NOTAQUESTION 4
316
2019-02-24
pjp
#define PARSE_RETURN_NOTAUTH 5
317
2020-07-03
pjp
#define PARSE_RETURN_NOTAREPLY 6 /* fwdpq */
318
2020-06-25
pjp
pid_t pid; /* originating pid */
319
2017-11-28
pjp
};
320
2017-11-28
pjp
321
2020-07-03
pjp
struct sforward {
322
2020-07-12
pjp
int family; /* 4 */
323
2020-07-12
pjp
time_t gotit; /* 12 */
324
2020-07-03
pjp
325
2020-07-12
pjp
struct sockaddr_in from4; /* 28 */
326
2020-07-12
pjp
struct sockaddr_in6 from6; /* 56 */
327
2020-07-03
pjp
328
2020-07-12
pjp
int oldsel; /* 60 */
329
2020-07-12
pjp
uint16_t rport; /* 62 */
330
2020-07-12
pjp
char buf[512]; /* 574 */
331
2020-07-12
pjp
int buflen; /* 578 */
332
2020-07-12
pjp
struct dns_header header; /* 592 */
333
2020-07-12
pjp
uint16_t type; /* 594 */
334
2020-07-12
pjp
uint16_t class; /* 596 */
335
2020-07-12
pjp
uint16_t edns0len; /* 598 */
336
2020-07-12
pjp
int dnssecok; /* 602 */
337
2020-07-03
pjp
338
2020-07-12
pjp
int havemac; /* 606 */
339
2020-07-12
pjp
char tsigname[256]; /* 862 */
340
2020-07-12
pjp
int tsignamelen; /* 866 */
341
2020-07-12
pjp
uint64_t tsigtimefudge; /* 874 */
342
2020-07-03
pjp
343
2020-07-12
pjp
char mac[32]; /* 906 */
344
2020-07-03
pjp
};
345
2020-07-03
pjp
346
2017-11-28
pjp
347
2016-07-06
pjp
348
2016-07-06
pjp
#endif /* DNS_H */
repomaster@centroid.eu