in reply to Re: HP-UX 11.11 Your vendor has not defined Socket macro AF_INET6
in thread HP-UX 11.11 Your vendor has not defined Socket macro AF_INET6

Nope, that wasn't it but I you did start to get me thinking about the original Socket module. I checked the changelog of Socket6 and saw that they made the export of AF_INET6 optional in the Socket6 module I was building. It's optional because in perl 5.10 the Socket module was exporting AF_INET6 and then were would be a conflict with the Socket6 export. I removed the check making it 'optional' since I am using perl 5.82.

Here are the lines I changed in Socket6.pm:
Original: push @EXPORT, qw(AF_INET6) unless defined Socket::AF_INET6; push @EXPORT, qw(PF_INET6) unless defined Socket::PF_INET6; Fixed: push @EXPORT, qw(AF_INET6); push @EXPORT, qw(PF_INET6);

Now I don't get the error that AF_INET6 isn't defined I've tested that I can indeed communicate via SNMP using an IPv6 address. Hooray!
  • Comment on Re^2: HP-UX 11.11 Your vendor has not defined Socket macro AF_INET6
  • Download Code

Replies are listed 'Best First'.
Re^3: HP-UX 11.11 Your vendor has not defined Socket macro AF_INET6
by parv (Parson) on Apr 09, 2008 at 23:26 UTC
    If you have perl 5.8 version of Socket module, which apparently does not export AF_INET6, then should not the original code (in new Socket6) have stuffed *F_INET6 in @EXPORT? That raises the question: do you have perl 5.10 installed too?
      I am seeing this very same issue on Solaris. Not only did I have to remove the if statement from Socket6.pm, I also had to explicitly import AF_INET6 in INET6.pm, to get everything working. This doesn't make much sense to me. With ActiveState Perl 5.10 everything works as I would expect, I don't have to do anything special, but with 5.8 I have issues. I compared the Socket.pm file between the two and as far as AF_INET6 is concerned they are the same.