chiark
/
gitweb
/
~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do PTR checking (multiple PTRs allowed).
[adns]
/
src
/
internal.h
diff --git
a/src/internal.h
b/src/internal.h
index 33086f68c5350b43d7751cb83d3bd9fa2ca093bb..672e3a946d2661500d7323d6a57d63d895c16883 100644
(file)
--- a/
src/internal.h
+++ b/
src/internal.h
@@
-50,6
+50,8
@@
typedef unsigned char byte;
#define DNS_HDRSIZE 12
#define DNS_CLASS_IN 1
#define DNS_HDRSIZE 12
#define DNS_CLASS_IN 1
+#define DNS_INADDR_ARPA "in-addr", "arpa"
+
typedef enum {
rcode_noerror,
rcode_formaterror,
typedef enum {
rcode_noerror,
rcode_formaterror,
@@
-75,16
+77,6
@@
typedef struct {
byte *buf;
} vbuf;
byte *buf;
} vbuf;
-typedef union {
- void *ext;
- struct {
- void (*callback)(adns_query parent, adns_query child);
- union {
- adns_rr_hostaddr *hostaddr;
- } info;
- } intern;
-} qcontext;
-
typedef struct {
adns_state ads;
adns_query qu;
typedef struct {
adns_state ads;
adns_query qu;
@@
-142,6
+134,15
@@
union maxalign {
union maxalign *up;
} data;
union maxalign *up;
} data;
+typedef struct {
+ void *ext;
+ void (*callback)(adns_query parent, adns_query child);
+ union {
+ adns_rr_addr ptr_parent_addr;
+ adns_rr_hostaddr *hostaddr;
+ } info;
+} qcontext;
+
struct adns__query {
adns_state ads;
enum { query_udp, query_tcpwait, query_tcpsent, query_child, query_done } state;
struct adns__query {
adns_state ads;
enum { query_udp, query_tcpwait, query_tcpsent, query_child, query_done } state;
@@
-179,7
+180,8
@@
struct adns__query {
int udpnextserver;
unsigned long udpsent, tcpfailed; /* bitmap indexed by server */
struct timeval timeout;
int udpnextserver;
unsigned long udpsent, tcpfailed; /* bitmap indexed by server */
struct timeval timeout;
- qcontext context;
+
+ qcontext ctx;
/* Possible states:
*
/* Possible states:
*