aboutsummaryrefslogtreecommitdiff
path: root/dns_example.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-08-17 10:42:29 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-08-17 10:42:29 +0300
commita3ed54cc0cf258e780609e67b61e4526cd9641dc (patch)
tree779a139f06368e2a7deccb6a0e35313d7ebd6663 /dns_example.c
parent6b286788c724b12da99661eec1d9a40cf82a046b (diff)
downloadvsdns-a3ed54cc0cf258e780609e67b61e4526cd9641dc.tar
vsdns-a3ed54cc0cf258e780609e67b61e4526cd9641dc.tar.xz
vsdns-a3ed54cc0cf258e780609e67b61e4526cd9641dc.zip
TCP added.
TCP is used as fallback in case if UDP answer is truncated.
Diffstat (limited to 'dns_example.c')
-rw-r--r--dns_example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns_example.c b/dns_example.c
index 9f16dc0..fb0c74a 100644
--- a/dns_example.c
+++ b/dns_example.c
@@ -5,8 +5,8 @@
int main()
{
struct dns_answers *cur;
- const char *router = "10.1.1.1"; /* place here your one */
- struct dns_answers *ans = dns_get(router, "veresov.pro", dns_type_a);
+ const char *server = "8.8.8.8"; /* place your favourite one */
+ struct dns_answers *ans = dns_get(server, "veresov.pro", dns_type_txt);
for (cur = ans; cur; cur = cur->next) {
if (cur->type == dns_type_a) {
unsigned char *ip = cur->data;