+ def _joinAddrIPv6(self, interface, addr, join): + addr = socket.inet_pton(socket.AF_INET6, addr) + interface = socket.inet_pton(socket.AF_INET6, interface) + if join: + cmd = socket.IPV6_JOIN_GROUP + else: + cmd = socket.IPV6_LEAVE_GROUP + try: + self.socket.setsockopt(socket.IPPROTO_IPV6, cmd, addr + interface) + except socket.error as e: + return failure.Failure(error.MulticastJoinError(addr, interface, *e.args)) To make sure its out there, the above is completely wrong. It happens to work, but is wrong. The argument to setsockopt for v6 is very different from v4. The above happens to work with "::" as the interface, but is very very wrong.
-Jason