可见,直接在构造器中写dst 和src 字段即可
p_join = Ether(dst='01:00:5e:00:00:16', src='00:0c:29:c8:31:8a') / IP(src='192.168.204.139', dst='224.0.0.22', tos=0xc0) /IGMPv3() /IGMPv3mr(numgrp=1) /IGMPv3gr(rtype=4, maddr="239.1.1.1")
p_join.show()
sendp(p_join,iface='eth0')
eg
