diff --git a/p4app/controller.py b/p4app/controller.py index 5a1f327..2064b80 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -9,7 +9,7 @@ from p4utils.utils.sswitch_API import SimpleSwitchAPI from scapy.all import sniff, get_if_list, Ether, get_if_hwaddr, sendp from scapy.all import IP, Raw, IPv6, TCP, TCP_client, Ether from scapy.all import sniff -from scapy.all import Packet, BitField, IntEnumField, ShortField, XShortEnumField +from scapy.all import Packet, BitField, IntEnumField, ShortField, XShortEnumField, ShortEnumField from scapy.all import ICMPv6ND_NS from scapy.data import ETHER_TYPES @@ -36,7 +36,7 @@ cpu_fields = { class CpuHeader(Packet): name = 'CpuPacket' fields_desc = [ - IntEnumField('task', 1, cpu_fields ), + ShortEnumField('task', 1, cpu_fields ), ShortField('ingress_port', 0), XShortEnumField("type", 0x9000, ETHER_TYPES) ]