scapy.contrib.pnio_rpc

PNIO RPC端点

class scapy.contrib.pnio_rpc.ARBlockReq

Bases: scapy.contrib.pnio_rpc.Block

应用程序关系阻止请求

aliastypes
fields_desc
ARBlockReq字段

block_type

ShortEnumField

257

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

ARType

XShortEnumField

1

ARUUID

UUIDField

None

SessionKey

ShortField

0

CMInitiatorMacAdd

MACField

None

CMInitiatorObjectUUID

UUIDField

None

ARProperties_PullModuleAlarmAllowed

BitField (1位)

0

ARProperties_StartupMode

BitEnumField (1位)

0

ARProperties_reserved_3

BitField (6位)

0

ARProperties_reserved_2

BitField (12位)

0

ARProperties_AcknowledgeCompanionAR

BitField (1位)

0

ARProperties_CompanionAR

BitEnumField (2位)

0

ARProperties_DeviceAccess

BitEnumField (1位)

0

ARProperties_reserved_1

BitField (3位)

0

ARProperties_ParametrizationServer

BitEnumField (1位)

0

ARProperties_SupervisorTakeoverAllowed

BitField (1位)

0

ARProperties_State

BitEnumField (3位)

1

CMInitiatorActivityTimeoutFactor

ShortField

1000

CMInitiatorUDPRTPort

ShortField

34962

StationNameLength

FieldLenField

None

CMInitiatorStationName

StrLenField

b''

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

class scapy.contrib.pnio_rpc.ARBlockRes

Bases: scapy.contrib.pnio_rpc.Block

应用程序关系块响应

aliastypes
fields_desc
ARBlockRes字段

block_type

ShortEnumField

33025

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

ARType

XShortEnumField

1

ARUUID

UUIDField

None

SessionKey

ShortField

0

CMResponderMacAdd

MACField

None

CMResponderUDPRTPort

ShortField

34962

class scapy.contrib.pnio_rpc.Block

Bases: scapy.packet.Packet

PNIO RPC的通用块数据包

aliastypes
extract_padding(s)
fields_desc
Block fields

block_type

ShortEnumField

0

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

load

StrLenField

b''

payload_length()

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

post_build(p, pay)
class scapy.contrib.pnio_rpc.BlockHeader

Bases: scapy.packet.Packet

抽象数据包集中块头字段

aliastypes
fields_desc
BlockHeader字段

block_type

ShortEnumField

None

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

class scapy.contrib.pnio_rpc.ExpectedSubmodule

Bases: scapy.packet.Packet

预期子模块的API中的子模块说明

aliastypes
extract_padding(s)
fields_desc
ExpectedSubmodule字段

SubslotNumber

XShortField

0

SubmoduleIdentNumber

XIntField

0

SubmoduleProperties_reserved_2

XByteField

0

SubmoduleProperties_reserved_1

BitField (2位)

0

SubmoduleProperties_DiscardIOXS

BitField (1位)

0

SubmoduleProperties_ReduceOutputSubmoduleDataLength

BitField (1位)

0

SubmoduleProperties_ReduceInputSubmoduleDataLength

BitField (1位)

0

SubmoduleProperties_SharedInput

BitField (1位)

0

SubmoduleProperties_Type

BitEnumField (2位)

0

DataDescription

PacketListField

[]

class scapy.contrib.pnio_rpc.ExpectedSubmoduleAPI

Bases: scapy.packet.Packet

预期子模块块中的API描述

aliastypes
extract_padding(s)
fields_desc
ExpectedSubmoduleAPI字段

API

XIntField

0

SlotNumber

XShortField

0

ModuleIdentNumber

XIntField

0

ModuleProperties

XShortField

0

NumberOfSubmodules

FieldLenField

None

Submodules

PacketListField

[]

class scapy.contrib.pnio_rpc.ExpectedSubmoduleBlockReq

Bases: scapy.contrib.pnio_rpc.Block

预期的子模块块请求

aliastypes
fields_desc
ExpectedSubmoduleBlockReq字段

block_type

ShortEnumField

260

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

NumberOfAPIs

FieldLenField

None

APIs

PacketListField

[]

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

class scapy.contrib.pnio_rpc.ExpectedSubmoduleDataDescription

Bases: scapy.packet.Packet

子模块数据描述

aliastypes
extract_padding(s)
fields_desc
ExpectedSubmoduleDataDescription字段

DataDescription

XShortEnumField

0

SubmoduleDataLength

ShortField

0

LengthIOCS

ByteField

0

LengthIOPS

ByteField

0

class scapy.contrib.pnio_rpc.FParametersBlock

Bases: scapy.packet.Packet

F参数配置块

aliastypes
fields_desc
FParametersBlock字段

F_Prm_Flag1_Reserved_7

BitField (1位)

0

F_CRC_Seed

BitField (1位)

0

F_CRC_Length

BitEnumField (2位)

0

F_SIL

BitEnumField (2位)

2

F_Check_iPar

BitField (1位)

0

F_Check_SeqNr

BitField (1位)

0

F_Par_Version

BitEnumField (2位)

1

F_Block_ID

BitEnumField (3位)

0

F_Prm_Flag2_Reserved

BitField (2位)

0

F_Passivation

BitField (1位)

0

F_Source_Add

XShortField

0

F_Dest_Add

XShortField

0

F_WD_Time

ShortField

0

F_WD_Time_2

ShortField (Cond)

0

F_iPar_CRC

XIntField (Cond)

0

F_Par_CRC

XShortField

0

payload_guess

可能的子层: Padding

class scapy.contrib.pnio_rpc.IOCRAPI

Bases: scapy.packet.Packet

IOCR块中使用的API描述

aliastypes
extract_padding(s)
fields_desc
IOCRAPI字段

API

XIntField

0

NumberOfIODataObjects

FieldLenField

None

IODataObjects

PacketListField

[]

NumberOfIOCS

FieldLenField

None

IOCSs

PacketListField

[]

class scapy.contrib.pnio_rpc.IOCRAPIObject

Bases: scapy.packet.Packet

IOCR块的API描述中使用的API项目描述符

aliastypes
extract_padding(s)
fields_desc
IOCRAPIObject字段

SlotNumber

XShortField

0

SubslotNumber

XShortField

0

FrameOffset

ShortField

0

class scapy.contrib.pnio_rpc.IOCRBlockReq

Bases: scapy.contrib.pnio_rpc.Block

IO连接关系块请求

aliastypes
fields_desc
IOCRBlockReq字段

block_type

ShortEnumField

258

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

IOCRType

XShortEnumField

1

IOCRReference

XShortField

1

LT

XShortField

34962

IOCRProperties_reserved3

BitField (8位)

0

IOCRProperties_reserved2

BitField (11位)

0

IOCRProperties_reserved1

BitField (9位)

0

IOCRProperties_RTClass

BitEnumField (4位)

0

DataLength

ShortField

40

FrameID

XShortField

32768

SendClockFactor

ShortField

32

ReductionRatio

ShortField

32

Phase

ShortField

1

Sequence

ShortField

0

FrameSendOffset

XIntField

4294967295

WatchdogFactor

ShortField

10

DataHoldFactor

ShortField

10

IOCRTagHeader_IOUserPriority

BitEnumField (3位)

6

IOCRTagHeader_reserved

BitField (1位)

0

IOCRTagHeader_IOCRVLANID

BitField (12位)

0

IOCRMulticastMACAdd

MACField

None

NumberOfAPIs

FieldLenField

None

APIs

PacketListField

[]

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

class scapy.contrib.pnio_rpc.IOCRBlockRes

Bases: scapy.contrib.pnio_rpc.Block

IO连接关系块响应

aliastypes
fields_desc
IOCRBlockRes字段

block_type

ShortEnumField

33026

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

IOCRType

XShortEnumField

1

IOCRReference

XShortField

1

FrameID

XShortField

32768

class scapy.contrib.pnio_rpc.IODControlReq

Bases: scapy.contrib.pnio_rpc.Block

IODControl请求块

aliastypes
fields_desc
IODControlReq字段

block_type

ShortEnumField

None

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

padding

StrFixedLenField

b''

ARUUID

UUIDField

None

SessionKey

ShortField

0

AlarmSequenceNumber

XShortField

0

ControlCommand_reserved

BitField (9位)

0

ControlCommand_PrmBegin

BitField (1位)

0

ControlCommand_ReadyForRT_CLASS_3

BitField (1位)

0

ControlCommand_ReadyForCompanion

BitField (1位)

0

ControlCommand_Done

BitField (1位)

0

ControlCommand_Release

BitField (1位)

0

ControlCommand_ApplicationReady

BitField (1位)

0

ControlCommand_PrmEnd

BitField (1位)

0

ControlBlockProperties

XShortField

0

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

post_build(p, pay)
class scapy.contrib.pnio_rpc.IODControlRes

Bases: scapy.contrib.pnio_rpc.Block

IODControl响应块

aliastypes
fields_desc
IODControlRes字段

block_type

ShortEnumField

33040

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

padding

StrFixedLenField

b''

ARUUID

UUIDField

None

SessionKey

ShortField

0

AlarmSequenceNumber

XShortField

0

ControlCommand_reserved

BitField (9位)

0

ControlCommand_PrmBegin

BitField (1位)

0

ControlCommand_ReadyForRT_CLASS_3

BitField (1位)

0

ControlCommand_ReadyForCompanion

BitField (1位)

0

ControlCommand_Done

BitField (1位)

1

ControlCommand_Release

BitField (1位)

0

ControlCommand_ApplicationReady

BitField (1位)

0

ControlCommand_PrmEnd

BitField (1位)

0

ControlBlockProperties

XShortField

0

class scapy.contrib.pnio_rpc.IODWriteMultipleReq

Bases: scapy.contrib.pnio_rpc.Block

IODWriteMultiple请求

aliastypes
fields_desc
IODWriteMultipleReq字段

block_type

ShortEnumField

8

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

seqNum

ShortField

0

ARUUID

UUIDField

None

API

XIntField

4294967295

slotNumber

XShortField

65535

subslotNumber

XShortField

65535

padding

StrFixedLenField

b''

index

XShortEnumField

57408

recordDataLength

FieldLenField

None

RWPadding

StrFixedLenField

b''

blocks

FieldListField

[]

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

post_build(p, pay)
class scapy.contrib.pnio_rpc.IODWriteMultipleRes

Bases: scapy.contrib.pnio_rpc.Block

IODWriteMultiple响应

aliastypes
fields_desc
IODWriteMultipleRes字段

block_type

ShortEnumField

32776

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

seqNum

ShortField

0

ARUUID

UUIDField

None

API

XIntField

4294967295

slotNumber

XShortField

65535

subslotNumber

XShortField

65535

padding

StrFixedLenField

b''

index

XShortEnumField

57408

recordDataLength

FieldLenField

None

additionalValue1

XShortField

0

additionalValue2

XShortField

0

status

IntEnumField

0

RWPadding

StrFixedLenField

b''

blocks

FieldListField

[]

post_build(p, pay)
class scapy.contrib.pnio_rpc.IODWriteReq

Bases: scapy.contrib.pnio_rpc.Block

IODWrite请求块

aliastypes
fields_desc
IODWriteReq字段

block_type

ShortEnumField

8

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

seqNum

ShortField

0

ARUUID

UUIDField

None

API

XIntField

0

slotNumber

XShortField

0

subslotNumber

XShortField

0

padding

StrFixedLenField

b''

index

XShortEnumField

0

recordDataLength

LenField

None

RWPadding

StrFixedLenField

b''

get_response()

生成此请求的响应块. 注意:它仅设置可以从请求中设置的字段

payload_guess

可能的子层: FParametersBlock

payload_length()
class scapy.contrib.pnio_rpc.IODWriteRes

Bases: scapy.contrib.pnio_rpc.Block

IODWrite响应块

aliastypes
fields_desc
IODWriteRes字段

block_type

ShortEnumField

32776

block_length

ShortField

None

block_version_high

ByteField

1

block_version_low

ByteField

0

seqNum

ShortField

0

ARUUID

UUIDField

None

API

XIntField

0

slotNumber

XShortField

0

subslotNumber

XShortField

0

padding

StrFixedLenField

b''

index

XShortEnumField

0

recordDataLength

LenField

None

additionalValue1

XShortField

0

additionalValue2

XShortField

0

status

IntEnumField

0

RWPadding

StrFixedLenField

b''

class scapy.contrib.pnio_rpc.NDRData

Bases: scapy.packet.Packet

基于NDRData集中一些字段. 无法实例化

aliastypes
fields_desc
NDRData字段

args_length

EndiannessField

None

max_count

EndiannessField

None

offset

EndiannessField

0

actual_count

EndiannessField

None

blocks

PacketListField

[]

class scapy.contrib.pnio_rpc.PNIOServiceReqPDU

Bases: scapy.packet.Packet

RPC请求的PNIO PDU

aliastypes
classmethod can_handle(pkt, rpc)

启发式的guess_payload_class

fields_desc
PNIOServiceReqPDU字段

args_max

EndiannessField

None

args_length

EndiannessField

None

max_count

EndiannessField

None

offset

EndiannessField

0

actual_count

EndiannessField

None

blocks

PacketListField

[]

class scapy.contrib.pnio_rpc.PNIOServiceResPDU

Bases: scapy.packet.Packet

用于RPC响应的PNIO PDU

aliastypes
classmethod can_handle(pkt, rpc)

启发式的guess_payload_class

fields_desc
PNIOServiceResPDU字段

status

EndiannessField

0

args_length

EndiannessField

None

max_count

EndiannessField

None

offset

EndiannessField

0

actual_count

EndiannessField

None

blocks

PacketListField

[]

class scapy.contrib.pnio_rpc.PadFieldWithLen(fld, align, padwith=None)

Bases: scapy.fields.PadField

PadField处理i2len函数以包括填充

i2len(pkt, val)

获取字段的长度,包括填充长度

scapy.contrib.pnio_rpc.dce_rpc_endianess(pkt)

确定DCE / RPC字节序的符号