diff options
author | Niall <Niall.oReilly@ucd.ie> | 2019-11-21 12:15:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-11-28 12:49:44 +0100 |
commit | 8acfad38ca7b8b95f8e419ab47f69057b49bec91 (patch) | |
tree | 64ecffc902d842f066b1f44b1e9365794f3051fa /lib/urldata.h | |
parent | c393b66df96f58a4f4f6914878584cad70c2349a (diff) | |
download | curl-8acfad38ca7b8b95f8e419ab47f69057b49bec91.tar.gz |
doh: use dedicated probe slots
... to easier allow additional DNS transactions.
Closes #4629
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index da7e58f45..a70b2b09a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -528,6 +528,24 @@ enum upgrade101 { UPGR101_WORKING /* talking upgraded protocol */ }; +enum doh_slots { + /* Explicit values for first two symbols so as to match hard-coded + * constants in existing code + */ + DOH_PROBE_SLOT_IPADDR_V4 = 0, /* make 'V4' stand out for readability */ + DOH_PROBE_SLOT_IPADDR_V6 = 1, /* 'V6' likewise */ + + /* Space here for (possibly build-specific) additional slot definitions */ + + /* for example */ + /* #ifdef WANT_DOH_FOOBAR_TXT */ + /* DOH_PROBE_SLOT_FOOBAR_TXT, */ + /* #endif */ + + /* AFTER all slot definitions, establish how many we have */ + DOH_PROBE_SLOTS +}; + struct dohresponse { unsigned char *memory; size_t size; @@ -544,7 +562,7 @@ struct dnsprobe { struct dohdata { struct curl_slist *headers; - struct dnsprobe probe[2]; + struct dnsprobe probe[DOH_PROBE_SLOTS]; unsigned int pending; /* still outstanding requests */ const char *host; int port; |