Get the ipv6 address from a interface

2009-04-09 Thread Kai Timmer
Hello, i need a function that returns the ipv6 address from a given interface name. For ipv4 i use this one: def get_ip_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), 0x8915, # SIOCGIFADDR struct.pack('25

sending and receiving ipv6 multicasts

2009-04-13 Thread Kai Timmer
I am trying to send and receive packages via an ipv6 multicast. But I can't get it working. What I thought was, that on the listener site, I just need to bind my socket to the interfaces ipv6 local link address and on the sender site, to the multicast address (in my case ff02::). That doesn't work

Re: sending and receiving ipv6 multicasts

2009-04-14 Thread Kai Timmer
On 13 Apr., 19:51, "Martin v. Löwis" wrote: > On the receiving side, you also need to set the IPV6_JOIN_GROUP > socket option - else your kernel doesn't know you are interested in > packets for that address. You need to bind to the multicast port, > and optionally to the multicast address. If I d