scapy.contrib.pnio¶
-
class
scapy.contrib.pnio.PNIORealTimeCyclicDefaultRawData(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PNIORealTimeCyclicDefaultRawDataPNIORealTimeCyclicDefaultRawData fields¶ data
b''
-
guess_payload_class(payload)¶
-
-
class
scapy.contrib.pnio.PNIORealTimeCyclicPDU(*args, **kargs)¶ Bases:
scapy.packet.PacketPROFINET cyclic real-time
-
aliastypes¶
-
static
build_fixed_len_raw_type(length)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | PADDING | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CYCLECOUNTER | DATASTATUS | TRANSFERSTATUS| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PNIORealTimeCyclicPDUPNIORealTimeCyclicPDU fields¶ data
[]padding
b''cycleCounter
0dataStatus
FlagsField(8 bits)<Flag 53 (primary+validData+run+no_problem)>transferStatus
0
-
static
get_layout_from_config(ether_src, ether_dst, frame_id)¶
-
get_padding_length()¶
-
next_cls_cb(_lst, _p, _remain)¶
-
pre_dissect(s)¶
-
-
class
scapy.contrib.pnio.PNIORealTime_IOxS(*args, **kargs)¶ Bases:
scapy.packet.PacketIOCS and IOPS packets for PROFINET Real-Time payload
-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |D|INS|RESERVE|E| +-+-+-+-+-+-+-+-+ Fig. PNIORealTime_IOxSPNIORealTime_IOxS fields¶ dataState
BitEnumField(1 bit)1instance
BitEnumField(2 bits)0reserved
XBitField(4 bits)0extension
BitField(1 bit)0
-
classmethod
get_len()¶
-
guess_payload_class(p)¶
-
classmethod
is_extension_set(_pkt, _lst, p, _remain)¶
-
-
class
scapy.contrib.pnio.PROFIsafe(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
static
build_PROFIsafe_class(cls, data_length)¶
-
default_fields¶
-
direction¶
-
explicit¶
-
fields¶
-
fieldtype¶
-
get_data_length()¶ Must be overridden in a subclass to return the correct value
-
get_mandatory_fields_len()¶
-
static
get_max_data_length()¶
-
guess_payload_class(p)¶
-
name¶
-
original¶
-
overload_fields¶
-
overloaded_fields¶
-
packetfields¶
-
payload¶
-
post_transforms¶
-
raw_packet_cache¶
-
raw_packet_cache_fields¶
-
sent_time¶
-
sniffed_on¶
-
time¶
-
underlayer¶
-
wirelen¶
-
-
class
scapy.contrib.pnio.PROFIsafeCRCSeed(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_fields¶
-
direction¶
-
explicit¶
-
fields¶
-
fieldtype¶
-
get_data_length()¶ Must be overridden in a subclass to return the correct value
-
get_mandatory_fields_len()¶
-
static
get_max_data_length()¶
-
guess_payload_class(p)¶
-
name¶
-
original¶
-
overload_fields¶
-
overloaded_fields¶
-
packetfields¶
-
payload¶
-
post_transforms¶
-
raw_packet_cache¶
-
raw_packet_cache_fields¶
-
sent_time¶
-
sniffed_on¶
-
time¶
-
underlayer¶
-
wirelen¶
-
-
class
scapy.contrib.pnio.PROFIsafeControl(*args, **kargs)¶ Bases:
scapy.contrib.pnio.PROFIsafe-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | CONTROL | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PROFIsafeControlPROFIsafeControl fields¶ data
b''control
FlagsField(8 bits)<Flag 0 ()>crc
0
-
-
class
scapy.contrib.pnio.PROFIsafeControlCRCSeed(*args, **kargs)¶ Bases:
scapy.contrib.pnio.PROFIsafeCRCSeed-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | CONTROL | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PROFIsafeControlCRCSeedPROFIsafeControlCRCSeed fields¶ data
b''control
FlagsField(8 bits)<Flag 0 ()>crc
0
-
-
class
scapy.contrib.pnio.PROFIsafeStatus(*args, **kargs)¶ Bases:
scapy.contrib.pnio.PROFIsafe-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | STATUS | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PROFIsafeStatusPROFIsafeStatus fields¶ data
b''status
FlagsField(8 bits)<Flag 0 ()>crc
0
-
-
class
scapy.contrib.pnio.PROFIsafeStatusCRCSeed(*args, **kargs)¶ Bases:
scapy.contrib.pnio.PROFIsafeCRCSeed-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | STATUS | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. PROFIsafeStatusCRCSeedPROFIsafeStatusCRCSeed fields¶ data
b''status
FlagsField(8 bits)<Flag 0 ()>crc
0
-
-
class
scapy.contrib.pnio.ProfinetIO(*args, **kargs)¶ Bases:
scapy.packet.PacketBasic PROFINET IO dispatcher
-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FRAMEID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ProfinetIOProfinetIO fields¶ frameID
0
-
guess_payload_class(payload)¶
-
-
scapy.contrib.pnio.i2s_frameid(x)¶ Get representation name of a pnio frame ID
- Parameters
x – a key of the PNIO_FRAME_IDS dictionary
- Returns
str
-
scapy.contrib.pnio.s2i_frameid(x)¶ Get pnio frame ID from a representation name
Performs a reverse look-up in PNIO_FRAME_IDS dictionary
- Parameters
x – a value of PNIO_FRAME_IDS dict
- Returns
integer