scapy.contrib.pnio_rpc module

PNIO RPC endpoints

class scapy.contrib.pnio_rpc.ARBlockReq

Bases: scapy.contrib.pnio_rpc.Block

Application relationship block request

aliastypes = [<class 'scapy.contrib.pnio_rpc.ARBlockReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,ARBlockReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (ARBlockReq).ARType>, <Field (ARBlockReq).ARUUID>, <Field (ARBlockReq).SessionKey>, <Field (ARBlockReq).CMInitiatorMacAdd>, <Field (ARBlockReq).CMInitiatorObjectUUID>, <Field (ARBlockReq).ARProperties_PullModuleAlarmAllowed>, <Field (ARBlockReq).ARProperties_StartupMode>, <Field (ARBlockReq).ARProperties_reserved_3>, <Field (ARBlockReq).ARProperties_reserved_2>, <Field (ARBlockReq).ARProperties_AcknowledgeCompanionAR>, <Field (ARBlockReq).ARProperties_CompanionAR>, <Field (ARBlockReq).ARProperties_DeviceAccess>, <Field (ARBlockReq).ARProperties_reserved_1>, <Field (ARBlockReq).ARProperties_ParametrizationServer>, <Field (ARBlockReq).ARProperties_SupervisorTakeoverAllowed>, <Field (ARBlockReq).ARProperties_State>, <Field (ARBlockReq).CMInitiatorActivityTimeoutFactor>, <Field (ARBlockReq).CMInitiatorUDPRTPort>, <Field (ARBlockReq).StationNameLength>, <Field (ARBlockReq).CMInitiatorStationName>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

class scapy.contrib.pnio_rpc.ARBlockRes

Bases: scapy.contrib.pnio_rpc.Block

Application relationship block response

aliastypes = [<class 'scapy.contrib.pnio_rpc.ARBlockRes'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,ARBlockRes).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (ARBlockRes).ARType>, <Field (ARBlockRes).ARUUID>, <Field (ARBlockRes).SessionKey>, <Field (ARBlockRes).CMResponderMacAdd>, <Field (ARBlockRes).CMResponderUDPRTPort>]
class scapy.contrib.pnio_rpc.Block

Bases: scapy.packet.Packet

A generic block packet for PNIO RPC

aliastypes = [<class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (BlockHeader,Block).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (Block).load>]
payload_length()

A function for each block, to determine the length of the payload

post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.pnio_rpc.BlockHeader

Bases: scapy.packet.Packet

Abstract packet to centralize block headers fields

aliastypes = [<class 'scapy.contrib.pnio_rpc.BlockHeader'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>]
class scapy.contrib.pnio_rpc.ExpectedSubmodule

Bases: scapy.packet.Packet

Description of a submodule in an API of an expected submodule

aliastypes = [<class 'scapy.contrib.pnio_rpc.ExpectedSubmodule'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (ExpectedSubmodule).SubslotNumber>, <Field (ExpectedSubmodule).SubmoduleIdentNumber>, <Field (ExpectedSubmodule).SubmoduleProperties_reserved_2>, <Field (ExpectedSubmodule).SubmoduleProperties_reserved_1>, <Field (ExpectedSubmodule).SubmoduleProperties_DiscardIOXS>, <Field (ExpectedSubmodule).SubmoduleProperties_ReduceOutputSubmoduleDataLength>, <Field (ExpectedSubmodule).SubmoduleProperties_ReduceInputSubmoduleDataLength>, <Field (ExpectedSubmodule).SubmoduleProperties_SharedInput>, <Field (ExpectedSubmodule).SubmoduleProperties_Type>, <Field (ExpectedSubmodule).DataDescription>]
class scapy.contrib.pnio_rpc.ExpectedSubmoduleAPI

Bases: scapy.packet.Packet

Description of an API in the expected submodules blocks

aliastypes = [<class 'scapy.contrib.pnio_rpc.ExpectedSubmoduleAPI'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (ExpectedSubmoduleAPI).API>, <Field (ExpectedSubmoduleAPI).SlotNumber>, <Field (ExpectedSubmoduleAPI).ModuleIdentNumber>, <Field (ExpectedSubmoduleAPI).ModuleProperties>, <Field (ExpectedSubmoduleAPI).NumberOfSubmodules>, <Field (ExpectedSubmoduleAPI).Submodules>]
class scapy.contrib.pnio_rpc.ExpectedSubmoduleBlockReq

Bases: scapy.contrib.pnio_rpc.Block

Expected submodule block request

aliastypes = [<class 'scapy.contrib.pnio_rpc.ExpectedSubmoduleBlockReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,ExpectedSubmoduleBlockReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (ExpectedSubmoduleBlockReq).NumberOfAPIs>, <Field (ExpectedSubmoduleBlockReq).APIs>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

class scapy.contrib.pnio_rpc.ExpectedSubmoduleDataDescription

Bases: scapy.packet.Packet

Description of the data of a submodule

aliastypes = [<class 'scapy.contrib.pnio_rpc.ExpectedSubmoduleDataDescription'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (ExpectedSubmoduleDataDescription).DataDescription>, <Field (ExpectedSubmoduleDataDescription).SubmoduleDataLength>, <Field (ExpectedSubmoduleDataDescription).LengthIOCS>, <Field (ExpectedSubmoduleDataDescription).LengthIOPS>]
class scapy.contrib.pnio_rpc.FParametersBlock

Bases: scapy.packet.Packet

F-Parameters configuration block

aliastypes = [<class 'scapy.contrib.pnio_rpc.FParametersBlock'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (FParametersBlock).F_Prm_Flag1_Reserved_7>, <Field (FParametersBlock).F_CRC_Seed>, <Field (FParametersBlock).F_CRC_Length>, <Field (FParametersBlock).F_SIL>, <Field (FParametersBlock).F_Check_iPar>, <Field (FParametersBlock).F_Check_SeqNr>, <Field (FParametersBlock).F_Par_Version>, <Field (FParametersBlock).F_Block_ID>, <Field (FParametersBlock).F_Prm_Flag2_Reserved>, <Field (FParametersBlock).F_Passivation>, <Field (FParametersBlock).F_Source_Add>, <Field (FParametersBlock).F_Dest_Add>, <Field (FParametersBlock).F_WD_Time>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (FParametersBlock).F_Par_CRC>]
payload_guess = [({}, <class 'scapy.packet.Padding'>)]
class scapy.contrib.pnio_rpc.IOCRAPI

Bases: scapy.packet.Packet

API description used in IOCR block

aliastypes = [<class 'scapy.contrib.pnio_rpc.IOCRAPI'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (IOCRAPI).API>, <Field (IOCRAPI).NumberOfIODataObjects>, <Field (IOCRAPI).IODataObjects>, <Field (IOCRAPI).NumberOfIOCS>, <Field (IOCRAPI).IOCSs>]
class scapy.contrib.pnio_rpc.IOCRAPIObject

Bases: scapy.packet.Packet

API item descriptor used in API description of IOCR blocks

aliastypes = [<class 'scapy.contrib.pnio_rpc.IOCRAPIObject'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (IOCRAPIObject).SlotNumber>, <Field (IOCRAPIObject).SubslotNumber>, <Field (IOCRAPIObject).FrameOffset>]
class scapy.contrib.pnio_rpc.IOCRBlockReq

Bases: scapy.contrib.pnio_rpc.Block

IO Connection Relationship block request

aliastypes = [<class 'scapy.contrib.pnio_rpc.IOCRBlockReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IOCRBlockReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IOCRBlockReq).IOCRType>, <Field (IOCRBlockReq).IOCRReference>, <Field (IOCRBlockReq).LT>, <Field (IOCRBlockReq).IOCRProperties_reserved3>, <Field (IOCRBlockReq).IOCRProperties_reserved2>, <Field (IOCRBlockReq).IOCRProperties_reserved1>, <Field (IOCRBlockReq).IOCRProperties_RTClass>, <Field (IOCRBlockReq).DataLength>, <Field (IOCRBlockReq).FrameID>, <Field (IOCRBlockReq).SendClockFactor>, <Field (IOCRBlockReq).ReductionRatio>, <Field (IOCRBlockReq).Phase>, <Field (IOCRBlockReq).Sequence>, <Field (IOCRBlockReq).FrameSendOffset>, <Field (IOCRBlockReq).WatchdogFactor>, <Field (IOCRBlockReq).DataHoldFactor>, <Field (IOCRBlockReq).IOCRTagHeader_IOUserPriority>, <Field (IOCRBlockReq).IOCRTagHeader_reserved>, <Field (IOCRBlockReq).IOCRTagHeader_IOCRVLANID>, <Field (IOCRBlockReq).IOCRMulticastMACAdd>, <Field (IOCRBlockReq).NumberOfAPIs>, <Field (IOCRBlockReq).APIs>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

class scapy.contrib.pnio_rpc.IOCRBlockRes

Bases: scapy.contrib.pnio_rpc.Block

IO Connection Relationship block response

aliastypes = [<class 'scapy.contrib.pnio_rpc.IOCRBlockRes'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IOCRBlockRes).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IOCRBlockRes).IOCRType>, <Field (IOCRBlockRes).IOCRReference>, <Field (IOCRBlockRes).FrameID>]
class scapy.contrib.pnio_rpc.IODControlReq

Bases: scapy.contrib.pnio_rpc.Block

IODControl request block

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODControlReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODControlReq).padding>, <Field (IODControlReq).ARUUID>, <Field (IODControlReq).SessionKey>, <Field (IODControlReq).AlarmSequenceNumber>, <Field (IODControlReq).ControlCommand_reserved>, <Field (IODControlReq).ControlCommand_PrmBegin>, <Field (IODControlReq).ControlCommand_ReadyForRT_CLASS_3>, <Field (IODControlReq).ControlCommand_ReadyForCompanion>, <Field (IODControlReq).ControlCommand_Done>, <Field (IODControlReq).ControlCommand_Release>, <Field (IODControlReq).ControlCommand_ApplicationReady>, <Field (IODControlReq).ControlCommand_PrmEnd>, <Field (IODControlReq).ControlBlockProperties>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.pnio_rpc.IODControlRes

Bases: scapy.contrib.pnio_rpc.Block

IODControl response block

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODControlRes'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IODControlRes).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODControlRes).padding>, <Field (IODControlRes).ARUUID>, <Field (IODControlRes).SessionKey>, <Field (IODControlRes).AlarmSequenceNumber>, <Field (IODControlRes).ControlCommand_reserved>, <Field (IODControlRes).ControlCommand_PrmBegin>, <Field (IODControlRes).ControlCommand_ReadyForRT_CLASS_3>, <Field (IODControlRes).ControlCommand_ReadyForCompanion>, <Field (IODControlRes).ControlCommand_Done>, <Field (IODControlRes).ControlCommand_Release>, <Field (IODControlRes).ControlCommand_ApplicationReady>, <Field (IODControlRes).ControlCommand_PrmEnd>, <Field (IODControlRes).ControlBlockProperties>]
class scapy.contrib.pnio_rpc.IODWriteMultipleReq

Bases: scapy.contrib.pnio_rpc.Block

IODWriteMultiple request

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODWriteMultipleReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IODWriteMultipleReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODWriteMultipleReq).seqNum>, <Field (IODWriteMultipleReq).ARUUID>, <Field (IODWriteMultipleReq).API>, <Field (IODWriteMultipleReq).slotNumber>, <Field (IODWriteMultipleReq).subslotNumber>, <Field (IODWriteMultipleReq).padding>, <Field (IODWriteMultipleReq).index>, <Field (IODWriteMultipleReq).recordDataLength>, <Field (IODWriteMultipleReq).RWPadding>, <Field (IODWriteMultipleReq).blocks>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.pnio_rpc.IODWriteMultipleRes

Bases: scapy.contrib.pnio_rpc.Block

IODWriteMultiple response

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODWriteMultipleRes'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IODWriteMultipleRes).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODWriteMultipleRes).seqNum>, <Field (IODWriteMultipleRes).ARUUID>, <Field (IODWriteMultipleRes).API>, <Field (IODWriteMultipleRes).slotNumber>, <Field (IODWriteMultipleRes).subslotNumber>, <Field (IODWriteMultipleRes).padding>, <Field (IODWriteMultipleRes).index>, <Field (IODWriteMultipleRes).recordDataLength>, <Field (IODWriteMultipleRes).additionalValue1>, <Field (IODWriteMultipleRes).additionalValue2>, <Field (IODWriteMultipleRes).status>, <Field (IODWriteMultipleRes).RWPadding>, <Field (IODWriteMultipleRes).blocks>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.pnio_rpc.IODWriteReq

Bases: scapy.contrib.pnio_rpc.Block

IODWrite request block

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODWriteReq'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IODWriteReq).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODWriteReq).seqNum>, <Field (IODWriteReq).ARUUID>, <Field (IODWriteReq).API>, <Field (IODWriteReq).slotNumber>, <Field (IODWriteReq).subslotNumber>, <Field (IODWriteReq).padding>, <Field (IODWriteReq).index>, <Field (IODWriteReq).recordDataLength>, <Field (IODWriteReq).RWPadding>]
get_response()

Generate the response block of this request. Careful: it only sets the fields which can be set from the request

payload_guess = [({'index': 256}, <class 'scapy.contrib.pnio_rpc.FParametersBlock'>)]
payload_length()

A function for each block, to determine the length of the payload

class scapy.contrib.pnio_rpc.IODWriteRes

Bases: scapy.contrib.pnio_rpc.Block

IODWrite response block

aliastypes = [<class 'scapy.contrib.pnio_rpc.IODWriteRes'>, <class 'scapy.contrib.pnio_rpc.Block'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (BlockHeader,IODControlReq,IODWriteRes).block_type>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_length>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_high>, <Field (BlockHeader,Block,IODControlReq,IODControlRes,IODWriteReq,IODWriteRes,IODWriteMultipleReq,IODWriteMultipleRes,ARBlockReq,ARBlockRes,IOCRBlockReq,IOCRBlockRes,ExpectedSubmoduleBlockReq).block_version_low>, <Field (IODWriteRes).seqNum>, <Field (IODWriteRes).ARUUID>, <Field (IODWriteRes).API>, <Field (IODWriteRes).slotNumber>, <Field (IODWriteRes).subslotNumber>, <Field (IODWriteRes).padding>, <Field (IODWriteRes).index>, <Field (IODWriteRes).recordDataLength>, <Field (IODWriteRes).additionalValue1>, <Field (IODWriteRes).additionalValue2>, <Field (IODWriteRes).status>, <Field (IODWriteRes).RWPadding>]
class scapy.contrib.pnio_rpc.NDRData

Bases: scapy.packet.Packet

Base NDRData to centralize some fields. It can’t be instantiated

aliastypes = [<class 'scapy.contrib.pnio_rpc.NDRData'>, <class 'scapy.packet.Packet'>]
fields_desc = [<scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <Field (NDRData,PNIOServiceReqPDU,PNIOServiceResPDU).blocks>]
class scapy.contrib.pnio_rpc.PNIOServiceReqPDU

Bases: scapy.packet.Packet

PNIO PDU for RPC Request

aliastypes = [<class 'scapy.contrib.pnio_rpc.PNIOServiceReqPDU'>, <class 'scapy.packet.Packet'>]
classmethod can_handle(pkt, rpc)

heuristic guess_payload_class

fields_desc = [<scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <Field (NDRData,PNIOServiceReqPDU,PNIOServiceResPDU).blocks>]
class scapy.contrib.pnio_rpc.PNIOServiceResPDU

Bases: scapy.packet.Packet

PNIO PDU for RPC Response

aliastypes = [<class 'scapy.contrib.pnio_rpc.PNIOServiceResPDU'>, <class 'scapy.packet.Packet'>]
classmethod can_handle(pkt, rpc)

heuristic guess_payload_class

fields_desc = [<scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <scapy.contrib.dce_rpc.EndiannessField object>, <Field (NDRData,PNIOServiceReqPDU,PNIOServiceResPDU).blocks>]
class scapy.contrib.pnio_rpc.PadFieldWithLen(fld, align, padwith=None)

Bases: scapy.fields.PadField

PadField which handles the i2len function to include padding

i2len(pkt, val)

get the length of the field, including the padding length

scapy.contrib.pnio_rpc.dce_rpc_endianess(pkt)

determine the symbol for the endianness of a the DCE/RPC