Scapy: Adding new protocol with complex field groupings
问题 I'm trying to specify a new packet format using scapy . In the packet there is a list of items, and items consist of "grouped fields". By "grouped fields" I mean a sub-sequence of fields of different types. The only way of making "grouped fields" that I know of in scapy is by using Packet class and using FieldLenField / PacketListField to reference the length of the sequence and the type of list members. Is that the way to go? Something that looks like this: from scapy.packet import Packet