diff options
| author | dartraiden <wowemuh@gmail.com> | 2025-06-04 09:49:23 +0300 |
|---|---|---|
| committer | dartraiden <wowemuh@gmail.com> | 2025-06-04 10:27:11 +0300 |
| commit | 86d1a677fd310d7d90d6f7545c02a4bd68e1d955 (patch) | |
| tree | 7fd5f46ef18038d10dcdf9fa19ffee547d51d6ad /libs/libcurl/src/doh.h | |
| parent | e8e2a816fbbcec0d6a64496928fecff19c281d82 (diff) | |
libcurl: update to 8.14.0
Diffstat (limited to 'libs/libcurl/src/doh.h')
| -rw-r--r-- | libs/libcurl/src/doh.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/libs/libcurl/src/doh.h b/libs/libcurl/src/doh.h index 4f0e2501b2..65312c113d 100644 --- a/libs/libcurl/src/doh.h +++ b/libs/libcurl/src/doh.h @@ -59,15 +59,6 @@ typedef enum { DNS_TYPE_HTTPS = 65
} DNStype;
-/* one of these for each DoH request */
-struct doh_probe {
- curl_off_t easy_mid; /* multi id of easy handle doing the lookup */
- DNStype dnstype;
- unsigned char req_body[512];
- size_t req_body_len;
- struct dynbuf resp_body;
-};
-
enum doh_slot_num {
/* Explicit values for first two symbols so as to match hard-coded
* constants in existing code
@@ -89,9 +80,32 @@ enum doh_slot_num { DOH_SLOT_COUNT
};
-struct doh_probes {
+#define CURL_EZM_DOH_PROBE "ezm:doh-p"
+
+/* the largest one we can make, based on RFCs 1034, 1035 */
+#define DOH_MAX_DNSREQ_SIZE (256 + 16)
+
+/* each DoH probe request has this
+ * as easy meta for CURL_EZM_DOH_PROBE */
+struct doh_request {
+ unsigned char req_body[DOH_MAX_DNSREQ_SIZE];
struct curl_slist *req_hds;
- struct doh_probe probe[DOH_SLOT_COUNT];
+ struct dynbuf resp_body;
+ size_t req_body_len;
+ DNStype dnstype;
+};
+
+struct doh_response {
+ unsigned int probe_mid;
+ struct dynbuf body;
+ DNStype dnstype;
+ CURLcode result;
+};
+
+/* each transfer firing off DoH requests has this
+ * as easy meta for CURL_EZM_DOH_MASTER */
+struct doh_probes {
+ struct doh_response probe_resp[DOH_SLOT_COUNT];
unsigned int pending; /* still outstanding probes */
int port;
const char *host;
@@ -105,6 +119,7 @@ struct doh_probes { struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
const char *hostname,
int port,
+ int ip_version,
int *waitp);
CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
@@ -168,7 +183,7 @@ UNITTEST void de_cleanup(struct dohentry *d); #endif
#else /* if DoH is disabled */
-#define Curl_doh(a,b,c,d) NULL
+#define Curl_doh(a,b,c,d,e) NULL
#define Curl_doh_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST
#endif
|
