[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: resolver newbie
>Hi people.
>
>Whats wrong with this picture ?
>
><sarre@lyx101>$ cat testResolv.c
>#include <sys/types.h>
>#include <netinet/in.h>
>#include <arpa/nameser.h>
>#include <resolv.h>
>
>int main()
>{
> int result;
> char domain[] = "openbsd.org";
> unsigned char answer[8192];
>
> res_init();
> _res.options |= RES_DEBUG;
> _res.retry = 2;
>
> result = res_query(domain, C_IN, T_MX, answer, sizeof(answer));
> printf("res_query returned %d\n");
>
> exit(0);
>}
>
try supplying the printf with something to print???? ;-)
><sarre@lyx101>$ gcc testResolv.c
><sarre@lyx101>$ ./a.out
>res_query returned -541075308
do it all the time myself . . .
--
Later . . . 'liam
allenwc@home.com
William C Allen, BLS, EET