Hi,

Could someone help me debug this following program on OBSD?

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <resolv.h>

main() {
        int i;
        res_init();
        printf("Number of NS in resolv.conf is %d\n", _res.nscount);

        for (i=0; i< _res.nscount; i++) {
                printf("NS %d is %s\n", i, 
inet_ntoa(_res.nsaddr_list[i].sin_addr));
        }
}

on linux I get the NS addresses correct
on OBSD I get 0.0.0.0 for all name servers defined in /etc/resolv.conf

is there something I'm missing?

Thanx

G
ps. This is for debugging an old program that fails to resolv on OBSD while it does on linux.

Reply via email to