Error writing scapy RTP packet with payload type to pcap
问题 When I create an RTP packet in scapy with the following code, I get an error: "TypeError: clone_with() got multiple values for keyword argument 'payload'" from scapy.all import IP, UDP, RTP, Ether from scapy.utils import PcapWriter pktdump = PcapWriter("banana.pcap", append=False, sync=True) rtp = { "sequence": 1, "timestamp": 1, "marker": 1, "payload": 17 } pkt = Ether()/IP()/UDP(sport=12345,dport=12346)/RTP(**rtp) pktdump.write(pkt) but removing payload works. rtp = { "sequence": 1,