You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, all. I want to use scapy to write my own client and server in multi_switch_mininet.p4app. However, I find that if I modify the echo_server.py to enable sniff() function and enable the pcap_dump in p4app.json. The pcap results will contain a strange packet: an IPv4+ICMP packet which container total IP+UDP packet in its payload! But from the sniff() result, the host received a UDP packet instead of IPv4+ICMP packet.
Here is the echo_server.py codes:
import socket, sys
from scapy.all import *
import time
print("Start to sniff packets...")
sniffed = sniff(iface="h1-eth0", filter="ip", prn=custom_action, count = 5)
for pkt in sniffed:
pkt.show()
time.sleep(5)
And here is the echo_client.py codes:
import socket, sys
from scapy.all import *
import os
srv_addr = (sys.argv[1], int(sys.argv[2]))
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(sys.argv[3], srv_addr)
Anyone has any idea? Besides, the pcap result is a little confusing for me. s1-eth1_out.pcap means that the packets leave the s1 from eth1 or go into s1 from eth1?
The text was updated successfully, but these errors were encountered:
Hi, all. I want to use scapy to write my own client and server in multi_switch_mininet.p4app. However, I find that if I modify the echo_server.py to enable sniff() function and enable the pcap_dump in p4app.json. The pcap results will contain a strange packet: an IPv4+ICMP packet which container total IP+UDP packet in its payload! But from the sniff() result, the host received a UDP packet instead of IPv4+ICMP packet.
Here is the echo_server.py codes:
And here is the echo_client.py codes:
Anyone has any idea? Besides, the pcap result is a little confusing for me. s1-eth1_out.pcap means that the packets leave the s1 from eth1 or go into s1 from eth1?
The text was updated successfully, but these errors were encountered: