Why does the program below produce radically different results when
linked either (a) with just the libc on FreeBSD 4.7 or else (b) with
the BIND library (libbind.a) from the ISC 8.x.x BIND release, and then
with libc?

Is FreeBSD's gethostbyaddr(3) mishandling the classless in-addr.arpa
delegation in the case of 62.23.166.218 ?

======================================================================
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

int
main (void)
{
  auto struct in_addr addr;
  register struct hostent const *hp;

  inet_aton ("62.23.166.218", &addr);
  hp = gethostbyaddr ((char const *)&addr, sizeof addr, AF_INET);
  if (hp)
    printf ("%s\n", hp->h_name);
  else
    printf ("No rDNS for %s\n",  inet_ntoa (addr));

  return 0;
}
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to