While data = '\0': data = data # Strip trailing \0's S.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) S.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) Mreq = group_bin struct.pack('=I', socket.INADDR_ANY) Group_bin = socket.inet_pton(addrinfo, addrinfo) S.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # Allow multiple copies of this program on one machine S = socket.socket(addrinfo, socket.SOCK_DGRAM) # Look up multicast group address in name server and find out IP versionĪddrinfo = socket.getaddrinfo(group, None)` I have tested that my python application on a different machine and it is working fine. I even tried putting the interface in promiscuous mode as suggested in one post. ![]() ![]() I have checked that I join the correct group using netstat -gn. If I do a tcpdump -i enp130s0f0 -n I can see multicast packets being received by the interface.īut when I try to read packets in my test python application, I cannot read anything. I need to read multicast packets that are being received on enp130s0f0. I have two of them connected to different LANs - ens20f3 (my home LAN) enp130s0f0 (for accessing a different network).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |