[HPADM] Trouble with IPv6 / getnameinfo() on HPUX-11.11



I'm running: "HP-UX glade B.11.11 U 9000/800 unknown"

I can look up IPv6 names with getaddrinfo(), but getnameinfo() is failing. This C++ test program:

#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>

int main (int argc, char**argv) {
sockaddr_in6 sin6;
int err = inet_pton (AF_INET6,
"2001:470:1f00:1056:202:b3ff:fe1d:b515",
&sin6.sin6_addr);
printf ("inet_pton() returned %d\n", err);

sin6.sin6_family = AF_INET6;
sin6.sin6_port = htons(0);
sin6.sin6_flowinfo = 0;
sin6.sin6_scope_id = 0;

char hostbuf[NI_MAXHOST];
int flags = NI_NAMEREQD;
err = getnameinfo (reinterpret_cast<sockaddr *>(&sin6),
sizeof (sin6),
hostbuf,
sizeof (hostbuf),
0,
0,
flags);

printf ("getnameinfo() returned %d (%s)\n", err, gai_strerror (err));
}

prints:

inet_pton() returned 1
getnameinfo() returned 8 (host nor service provided, or not known)

The address translates fine from the command line:

glade:test$ nslookup -type=ptr 5.1.5.b.d.1.e.f.f.f.3.b. 2.0.2.0.6.5.0.1.0.0.f.1.0.7.4.0.1.0.0.2.ip6.arpa.
Using /etc/hosts on: glade

looking up FILES
Trying DNS
Non-authoritative answer:
5.1.5.b.d.1.e.f.f.f.3.b.2.0.2.0.6.5.0.1.0.0.f. 1.0.7.4.0.1.0.0.2.ip6.arpa name = kohaku.sarna.org

so I know it's a good address, and I know IPv6 is enabled on the box. This works on my linux and solaris systems. Does anybody have any idea what might be going wrong?


-------------------
Roy Smith
smith_roy@xxxxxxx

This signature is still under construction.
Please excuse the debris and mind the gap.






Relevant Pages

  • Re: plugins as maps (was: Feature request: Internal map function - to "reverse" an IP.)
    ... However, converting an IPv6 ... address literal into its reverse zone format is not trivial like it is ... +void reverse_address(unsigned int family, unsigned char *ip, unsigned char ... +#if NETINET ...
    (comp.mail.sendmail)
  • CFR/CFT: IPv6 patch for quota (PR 42004)
    ... PR 42004, which has been open for nearly five years, includes the patch ... below to add IPv6 support to /usr/bin/quota. ... If someone who uses IPv6 and quotas over NFS can test this patch, ... callaurpc(char *host, int prognum, int versnum, int procnum, ...
    (freebsd-current)
  • Problem with getnameinfo and IPv6 on HPUX-11.11
    ... I can look up IPv6 names with getaddrinfo, but getnameinfo() is ... int main { ... int err = inet_pton (AF_INET6, ... so I know it's a good address, and I know IPv6 is enabled on the box. ...
    (comp.sys.hp.hpux)
  • Re: Basic IPv6 Connectivity
    ... I would try configing IPv6 global address directly on the Serial ... interface instead of using unnumbered ... int s 2/0/1:0 ...
    (comp.dcom.sys.cisco)
  • [RFC] [PATCH] sysfs support for Xen attributes
    ... GNU General Public License for more details. ... +static inline int ... +valid_chars(const char *path) ... int err = EINVAL; ...
    (Linux-Kernel)