class SWAT_P1_RIO_DO(scapy_all.Packet): name = "SWAT_P1_RIO_DO" fields_desc = [ scapy_all.LEShortField('counter', 0), scapy_all.ByteField('number', 0), scapy_all.StrFixedLenField('reserved', 0, length=5), scapy_all.BitField('spare', 0, 4), scapy_all.BitEnumField('valve_close', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('valve_open', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('pump2_start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('pump1_start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.FieldListField( "spare2", [], scapy_all.ByteField('', 0), length_from=lambda p: p.underlayer.length - 9), ]
class SWAT_P2_RIO_DO(scapy_all.Packet): name = "SWAT_P2_RIO_DO" fields_desc = [ scapy_all.LEShortField('counter', 0), scapy_all.ByteField('number', 0), scapy_all.StrFixedLenField('reserved', 0, length=5), scapy_all.BitEnumField('P208_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P207_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P206_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P205_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P204_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P203_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P202_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('P201_Start', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('spare', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('spare', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('spare', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('spare', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('spare', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('LED_RED', 0, 1, {0: 'disable', 1: 'enable'}), #LED_RED scapy_all.BitEnumField('MV201_Close', 0, 1, {0: 'disable', 1: 'enable'}), scapy_all.BitEnumField('MV201_Open', 0, 1, {0: 'disable', 1: 'enable'}), ]
class ENIP_ListIdentity_SocketItem(scapy_all.Packet): name = "Socket_Address" fields_desc = [ scapy_all.ShortField("sin_family", 0), scapy_all.ShortField("sin_port", 0), scapy_all.IPField("sin_address", "0.0.0.0"), scapy_all.StrFixedLenField("name_of_service", "", 8), ] def extract_padding(self, p): # print self.__class__.__name__+": P="+str(p) return "", p
class ENIP_ListServices_TargetItem(scapy_all.Packet): name = "ENIP_ListServicesTarget_Item" fields_desc = [ scapy_all.LEShortField("item_type_code", 0), scapy_all.LEShortField("length", 0), scapy_all.LEShortField("encapsulation_version", 1), scapy_all.LEShortField("capability_flags", 0), scapy_all.StrFixedLenField("name_of_service", "", 16), ] def extract_padding(self, p): return "", p
class SWAT_P4_RIO_DO(scapy_all.Packet): name = "SWAT_P4_RIO_DO" fields_desc = [ scapy_all.LEShortField('counter', 0), scapy_all.ByteField('number', 0), scapy_all.StrFixedLenField('reserved', 0, length=5), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('UV_Start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('P404_Start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('P403_Start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('P402_Start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('P401_Start', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), ]
class SWAT_P5_RIO_DO(scapy_all.Packet): name = "SWAT_P5_RIO_DO" fields_desc = [ scapy_all.LEShortField('counter', 0), scapy_all.ByteField('number', 0), scapy_all.StrFixedLenField('reserved', 0, length=5), scapy_all.BitEnumField('MV504_Close', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV504_Open', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV503_Close', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV503_Open', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV502_Close', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV502_Open', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV501_Close', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('MV501_Open', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), scapy_all.BitEnumField('spare', 0, 1, { 0: 'disable', 1: 'enable' }), ]