From 6b286788c724b12da99661eec1d9a40cf82a046b Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 16 Aug 2020 15:40:25 +0300 Subject: SRV parsing added. --- dns.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dns.h') diff --git a/dns.h b/dns.h index 208dda0..61478ae 100644 --- a/dns.h +++ b/dns.h @@ -6,7 +6,8 @@ enum { /* Some of DNS types: */ dns_type_a = 1, dns_type_cname = 5, dns_type_mx = 15, - dns_type_txt = 16 + dns_type_txt = 16, + dns_type_srv = 33 }; struct dns_answers { @@ -20,12 +21,15 @@ struct dns_answers { /* For CNAME & TXT data is just 'char *', * For A data is 'unsigned char *' of size 4. */ -int dns_mx_preference(void *data); char *dns_mx_server(void *data); +int dns_mx_preference(void *data); +char *dns_srv_server(void *data); +int dns_srv_port(void *data); +int dns_srv_priority(void *data); +int dns_srv_weight(void *data); -/* In case of error result is 0. - * It's not the-best-effort attempt to get answer, just simple working one. */ +/* In case of error result is 0. */ struct dns_answers *dns_get(const char *server, const char *host, int query); void dns_free(struct dns_answers *answers); -- cgit v1.2.3