scapy.contrib.pnio

class scapy.contrib.pnio.PNIORealTimeCyclicDefaultRawData

Bases: scapy.packet.Packet

aliastypes
fields_desc
PNIORealTimeCyclicDefaultRawData fields

data

StrField

b''

guess_payload_class(payload)
class scapy.contrib.pnio.PNIORealTimeCyclicPDU

Bases: scapy.packet.Packet

PROFINET cyclic real-time

aliastypes
static build_fixed_len_raw_type(length)
fields_desc
PNIORealTimeCyclicPDU fields

data

PacketListField

[]

padding

StrFixedLenField

b''

cycleCounter

ShortField

0

dataStatus

FlagsField (8 bits)

<Flag 53 (primary+validData+run+no_problem)>

transferStatus

ByteField

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

Bases: scapy.packet.Packet

IOCS and IOPS packets for PROFINET Real-Time payload

aliastypes
fields_desc
PNIORealTime_IOxS fields

dataState

BitEnumField (1 bit)

1

instance

BitEnumField (2 bits)

0

reserved

XBitField (4 bits)

0

extension

BitField (1 bit)

0

classmethod get_len()
guess_payload_class(p)
classmethod is_extension_set(_pkt, _lst, p, _remain)
class scapy.contrib.pnio.PROFIsafe

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

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

Bases: scapy.contrib.pnio.PROFIsafe

aliastypes
fields_desc
PROFIsafeControl fields

data

StrFixedLenField

b''

control

FlagsField (8 bits)

<Flag 0 ()>

crc

X3BytesField

0

class scapy.contrib.pnio.PROFIsafeControlCRCSeed

Bases: scapy.contrib.pnio.PROFIsafeCRCSeed

aliastypes
fields_desc
PROFIsafeControlCRCSeed fields

data

StrFixedLenField

b''

control

FlagsField (8 bits)

<Flag 0 ()>

crc

XIntField

0

class scapy.contrib.pnio.PROFIsafeStatus

Bases: scapy.contrib.pnio.PROFIsafe

aliastypes
fields_desc
PROFIsafeStatus fields

data

StrFixedLenField

b''

status

FlagsField (8 bits)

<Flag 0 ()>

crc

X3BytesField

0

class scapy.contrib.pnio.PROFIsafeStatusCRCSeed

Bases: scapy.contrib.pnio.PROFIsafeCRCSeed

aliastypes
fields_desc
PROFIsafeStatusCRCSeed fields

data

StrFixedLenField

b''

status

FlagsField (8 bits)

<Flag 0 ()>

crc

XIntField

0

class scapy.contrib.pnio.ProfinetIO

Bases: scapy.packet.Packet

Basic PROFINET IO dispatcher

aliastypes
fields_desc
ProfinetIO fields

frameID

XShortEnumField

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