mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
doh: move doh related struct definitions to doh.h
and make 'dnstype' in 'struct dnsprobe' use the DNStype to fix the icc compiler warning: doh.c(924): error #188: enumerated type mixed with another type Reported-by: Matthew Thompson Ref #9156 Closes #9174
This commit is contained in:
parent
f9ff59ebe2
commit
fe93bb4d1f
47
lib/doh.h
47
lib/doh.h
@ -29,21 +29,6 @@
|
||||
|
||||
#ifndef CURL_DISABLE_DOH
|
||||
|
||||
/*
|
||||
* Curl_doh() resolve a name using DoH (DNS-over-HTTPS). It resolves a name
|
||||
* and returns a 'Curl_addrinfo *' with the address information.
|
||||
*/
|
||||
|
||||
struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
|
||||
const char *hostname,
|
||||
int port,
|
||||
int *waitp);
|
||||
|
||||
CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
|
||||
struct Curl_dns_entry **dns);
|
||||
|
||||
int Curl_doh_getsock(struct connectdata *conn, curl_socket_t *socks);
|
||||
|
||||
typedef enum {
|
||||
DOH_OK,
|
||||
DOH_DNS_BAD_LABEL, /* 1 */
|
||||
@ -69,6 +54,38 @@ typedef enum {
|
||||
DNS_TYPE_DNAME = 39 /* RFC6672 */
|
||||
} DNStype;
|
||||
|
||||
/* one of these for each DoH request */
|
||||
struct dnsprobe {
|
||||
CURL *easy;
|
||||
DNStype dnstype;
|
||||
unsigned char dohbuffer[512];
|
||||
size_t dohlen;
|
||||
struct dynbuf serverdoh;
|
||||
};
|
||||
|
||||
struct dohdata {
|
||||
struct curl_slist *headers;
|
||||
struct dnsprobe probe[DOH_PROBE_SLOTS];
|
||||
unsigned int pending; /* still outstanding requests */
|
||||
int port;
|
||||
const char *host;
|
||||
};
|
||||
|
||||
/*
|
||||
* Curl_doh() resolve a name using DoH (DNS-over-HTTPS). It resolves a name
|
||||
* and returns a 'Curl_addrinfo *' with the address information.
|
||||
*/
|
||||
|
||||
struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
|
||||
const char *hostname,
|
||||
int port,
|
||||
int *waitp);
|
||||
|
||||
CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
|
||||
struct Curl_dns_entry **dns);
|
||||
|
||||
int Curl_doh_getsock(struct connectdata *conn, curl_socket_t *socks);
|
||||
|
||||
#define DOH_MAX_ADDR 24
|
||||
#define DOH_MAX_CNAME 4
|
||||
|
||||
|
@ -77,6 +77,7 @@
|
||||
bool curl_win32_idn_to_ascii(const char *in, char **out);
|
||||
#endif /* USE_LIBIDN2 */
|
||||
|
||||
#include "doh.h"
|
||||
#include "urldata.h"
|
||||
#include "netrc.h"
|
||||
|
||||
|
@ -598,23 +598,6 @@ enum doh_slots {
|
||||
DOH_PROBE_SLOTS
|
||||
};
|
||||
|
||||
/* one of these for each DoH request */
|
||||
struct dnsprobe {
|
||||
CURL *easy;
|
||||
int dnstype;
|
||||
unsigned char dohbuffer[512];
|
||||
size_t dohlen;
|
||||
struct dynbuf serverdoh;
|
||||
};
|
||||
|
||||
struct dohdata {
|
||||
struct curl_slist *headers;
|
||||
struct dnsprobe probe[DOH_PROBE_SLOTS];
|
||||
unsigned int pending; /* still outstanding requests */
|
||||
int port;
|
||||
const char *host;
|
||||
};
|
||||
|
||||
/*
|
||||
* Request specific data in the easy handle (Curl_easy). Previously,
|
||||
* these members were on the connectdata struct but since a conn struct may
|
||||
|
Loading…
Reference in New Issue
Block a user