[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
resolver newbie
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: resolver newbie
- From: Tony Sarendal <sarre_(_at_)_skalman_(_dot_)_eplay_(_dot_)_se>
- Date: Fri, 5 Jan 2001 19:41:57 +0100
- Reply-to: tony_(_dot_)_sarendal_(_at_)_eplay_(_dot_)_se
Hi people.
Whats wrong with this picture ?
<sarre_(_at_)_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);
}
<sarre_(_at_)_lyx101>$ gcc testResolv.c
<sarre_(_at_)_lyx101>$ ./a.out
res_query returned -541075308
meanwhile:
<root_(_at_)_lyx101># tcpdump -n -p port 53
19:34:55.502322 x.x.x.x.38347 > y.y.y.y.53: 46132+ MX? openbsd.org. (29)
19:34:55.503169 y.y.y.y.53 > x.x.x.x.38347: 46132 2/5/6 MX cvs.openbsd.org. 10, (292)
<root_(_at_)_lyx101># uname -a
OpenBSD lyx101 2.8 GENERIC#399 i386
What am I missing here ?
BTW, whoever implemented the login.conf stuff in 2.8, thanks a lot.
Tony S
Confused and tired network janitor
Visit your host, monkey.org