aboutsummaryrefslogtreecommitdiff
path: root/dns.h
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-08-16 15:40:25 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-08-16 15:40:25 +0300
commit6b286788c724b12da99661eec1d9a40cf82a046b (patch)
tree3f51f43d05ee58d4e2f1c12e8bcc43a397b79314 /dns.h
parentacf41993d4d699ff12238e943d7112dfdd5ace12 (diff)
downloadvsdns-6b286788c724b12da99661eec1d9a40cf82a046b.tar
vsdns-6b286788c724b12da99661eec1d9a40cf82a046b.tar.xz
vsdns-6b286788c724b12da99661eec1d9a40cf82a046b.zip
SRV parsing added.
Diffstat (limited to 'dns.h')
-rw-r--r--dns.h12
1 files changed, 8 insertions, 4 deletions
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);