3 #include <netinet/in.h>
4 #include <arpa/nameser.h>
10 char* dn
= (char*)arg
;
12 unsigned char buff
[8000];
14 if(-1 == res_search(dn
, 1, 1, buff
, 8000))
16 printf("Error: res_search()\n");
25 int main(int argc
, char** argv
)
30 printf("Usage: %s <domain>\n", argv
[0]);
34 _res
.options
|= RES_DEBUG
;
37 printf("Error: res_init()\n");
41 /* Test it in a different thread -- the failure case */
42 if(0 != pthread_create(&pid
, 0, fn
, (void*)argv
[1]))
44 printf("Failed to create thread.\n");
51 unsigned char buff
[8000];
53 if(-1 == res_search(argv
[1], 1, 1, buff
, 8000))
55 printf("Error: res_search()\n");