Re: Convert IPv6 address to binary representation on 2.x/Windows

2009-03-04 Thread Martin v. Löwis
>> I do wonder why you need a binary representation of an IPv6 address... > I'd like to subscribe to an IPv6 multicast address via > socket.setsockopt(IPPROTO_IPV6, IPV6_JOIN_GROUP, binary_address). I see. >> Yes, writing your own routine is certainly an option. > Is it the preferred one? Prefer

Re: Convert IPv6 address to binary representation on 2.x/Windows

2009-03-04 Thread Philipp Hagemeister
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Martin, Martin v. Löwis wrote: > I do wonder why you need a binary representation of an IPv6 address... I'd like to subscribe to an IPv6 multicast address via socket.setsockopt(IPPROTO_IPV6, IPV6_JOIN_GROUP, binary_address). > Yes, writing your

Re: Convert IPv6 address to binary representation on 2.x/Windows

2009-03-04 Thread Martin v. Löwis
> Neither of these values looks like 0x0001. Am I missing > something or is the documentation just wrong? If so, how am I supposed > to get a binary representation of an IPv6 address in the absence of > socket.inet_pton? Should I write my I own version? I do wonder why you need a binar

Convert IPv6 address to binary representation on 2.x/Windows

2009-03-04 Thread Philipp Hagemeister
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 socket.inet_pton which does exactly what I want is not available on 2.x on Windows. Strangely, the documentation of socket.inet_aton (IPv4 only) reads: "inet_aton() does not support IPv6, and getnameinfo() should be used instead for IPv4/v6 dual sta