--- resolver-test.cpp.orig Mon Jun 7 08:37:17 2004 +++ resolver-test.cpp Tue Jul 6 16:16:12 2004 @@ -1,12 +1,15 @@ -#include "resolver.hh" +#include + #include + +#include "resolver.hh" /* Originally Written by John MacPherson */ // grrr... stupid intel little endian! -#define dottedquad(a,b,c,d) (a) + (b << 8) + (c << 16) + (d << 24); +#define dottedquad(a,b,c,d) htonl((d) + (c << 8) + (b << 16) + (a << 24)); int main(void) { @@ -32,16 +35,16 @@ } /* Use Root Servers because they are unlikey to change IP */ - i.s_addr = dottedquad(128,9,0,107); + i.s_addr = dottedquad(192,228,79,201); t = r.get_name(i); if (t) { if (strcasecmp(t, "b.root-servers.net")!=0) { - fprintf(stderr, "FAILED: 128.9.0.107 resolves to %s" + fprintf(stderr, "FAILED: 192.228.79.201 resolves to %s" " expected b.root-servers.net please check " "your resolver!\n", t); } } else { - fprintf(stderr, "FAILED: Unable to resolve 128.9.0.107\n"); + fprintf(stderr, "FAILED: Unable to resolve 192.228.79.201\n"); } i.s_addr = dottedquad(192,203,230,10);