scapy.contrib.automotive.ccp

class scapy.contrib.automotive.ccp.ACTION_SERVICE

Bases: scapy.packet.Packet

aliastypes
fields_desc
ACTION_SERVICE字段

action_service

ShortField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.ACTION_SERVICE_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
ACTION_SERVICE_DTO字段

data_length

ByteField

0

data_type

ByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff'

class scapy.contrib.automotive.ccp.BUILD_CHKSUM

Bases: scapy.packet.Packet

aliastypes
fields_desc
BUILD_CHKSUM字段

size

IntField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.BUILD_CHKSUM_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
BUILD_CHKSUM_DTO字段

checksum_size

ByteField

0

checksum_data

StrFixedLenField

b'\x00\x00\x00\x00'

ccp_reserved

StrFixedLenField

b''

class scapy.contrib.automotive.ccp.CCP

Bases: scapy.layers.can.CAN

aliastypes
extract_padding(p)
fields_desc
CCP栏位

flags

FlagsField (3位)

<Flag 0 ()>

identifier

XBitField (29位)

0

length

ByteField

8

reserved

ThreeBytesField

0

payload_guess

可能的子层: DTO

class scapy.contrib.automotive.ccp.CLEAR_MEMORY

Bases: scapy.packet.Packet

aliastypes
fields_desc
CLEAR_MEMORY字段

size

IntField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.CONNECT

Bases: scapy.packet.Packet

aliastypes
fields_desc
CONNECT字段

station_address

LEShortField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.CRO

Bases: scapy.packet.Packet

aliastypes
commands = {1: 'CONNECT', 2: 'SET_MTA', 3: 'DNLOAD', 4: 'UPLOAD', 5: 'TEST', 6: 'START_STOP', 7: 'DISCONNECT', 8: 'START_STOP_ALL', 9: 'GET_ACTIVE_CAL_PAGE', 12: 'SET_S_STATUS', 13: 'GET_S_STATUS', 14: 'BUILD_CHKSUM', 15: 'SHORT_UP', 16: 'CLEAR_MEMORY', 17: 'SELECT_CAL_PAGE', 18: 'GET_SEED', 19: 'UNLOCK', 20: 'GET_DAQ_SIZE', 21: 'SET_DAQ_PTR', 22: 'WRITE_DAQ', 23: 'EXCHANGE_ID', 24: 'PROGRAM', 25: 'MOVE', 27: 'GET_CCP_VERSION', 32: 'DIAG_SERVICE', 33: 'ACTION_SERVICE', 34: 'PROGRAM_6', 35: 'DNLOAD_6'}
fields_desc
CRO领域

cmd

ByteEnumField

1

ctr

ByteField

0

hashret()
payload_guess

可能的子层: ACTION_SERVICEBUILD_CHKSUMCLEAR_MEMORYCONNECTDIAG_SERVICEDISCONNECTDNLOAD_6DNLOADEXCHANGE_IDGET_ACTIVE_CAL_PAGEGET_CCP_VERSIONGET_DAQ_SIZEGET_SEEDGET_S_STATUSMOVEPROGRAM_6PROGRAMSELECT_CAL_PAGESET_DAQ_PTRSET_MTASET_S_STATUSSHORT_UPSTART_STOP_ALLSTART_STOPTESTUNLOCKUPLOADWRITE_DAQ

class scapy.contrib.automotive.ccp.DEFAULT_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DEFAULT_DTO字段

load

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.DIAG_SERVICE

Bases: scapy.packet.Packet

aliastypes
fields_desc
DIAG_SERVICE字段

diag_service

ShortField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.DIAG_SERVICE_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DIAG_SERVICE_DTO字段

data_length

ByteField

0

data_type

ByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff'

class scapy.contrib.automotive.ccp.DISCONNECT

Bases: scapy.packet.Packet

aliastypes
fields_desc
断开字段

type

ByteEnumField

0

ccp_reserved0

StrFixedLenField

b'\xff'

station_address

LEShortField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.DNLOAD

Bases: scapy.packet.Packet

aliastypes
fields_desc
DNLOAD字段

size

XByteField

0

data

StrFixedLenField

b'\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.DNLOAD_6

Bases: scapy.packet.Packet

aliastypes
fields_desc
DNLOAD_6字段

data

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.DNLOAD_6_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DNLOAD_6_DTO字段

MTA0_extension

XByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.DNLOAD_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DNLOAD_DTO字段

MTA0_extension

XByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.DTO(*args, **kwargs)

Bases: scapy.packet.Packet

aliastypes
answers(other)

在CCP中,DTO数据包的有效载荷取决于相应CRO数据包的cmd字段. 如果ctr字段相等,则两个数据包对应. 如果答案检测到相应的CRO,它将使用正确的类解释DTO的有效负载. 在CCP中,没有其他方法可以确定DTO有效负载的类别. 由于答案是在sr和sr1上调用的,因此对原始答案实现的这种修改将提供更好的用户体验.

default_fields
direction
explicit
fields
fields_desc
DTO字段

packet_id

XByteField

255

return_code

ByteEnumField

0

ctr

ByteField

0

fieldtype
static get_dto_cls(cmd)
guess_payload_class(payload)
hashret()
name
original
overload_fields
overloaded_fields
packetfields
payload
payload_cls
post_transforms
raw_packet_cache
raw_packet_cache_fields
return_codes = {0: 'acknowledge / no error', 1: 'DAQ processor overload', 16: 'command processor busy', 17: 'DAQ processor busy', 18: 'internal timeout', 24: 'key request', 25: 'session status request', 32: 'cold start request', 33: 'cal. data init. request', 34: 'DAQ list init. request', 35: 'code update request', 48: 'unknown command', 49: 'command syntax', 50: 'parameter(s) out of range', 51: 'access denied', 52: 'overload', 53: 'access locked', 54: 'resource/function not available'}
sent_time
sniffed_on
time
underlayer
wirelen
class scapy.contrib.automotive.ccp.EXCHANGE_ID

Bases: scapy.packet.Packet

aliastypes
fields_desc
EXCHANGE_ID字段

ccp_master_device_id

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.EXCHANGE_ID_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
EXCHANGE_ID_DTO字段

slave_device_ID_length

ByteField

0

data_type_qualifier

ByteField

0

resource_availability_mask

ByteField

0

resource_protection_mask

ByteField

0

ccp_reserved

StrFixedLenField

b'\xff'

class scapy.contrib.automotive.ccp.GET_ACTIVE_CAL_PAGE

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_ACTIVE_CAL_PAGE字段

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.GET_ACTIVE_CAL_PAGE_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_ACTIVE_CAL_PAGE_DTO字段

address_extension

XByteField

0

address

XIntField

0

class scapy.contrib.automotive.ccp.GET_CCP_VERSION

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_CCP_VERSION字段

main_protocol_version

XByteField

0

release_version

XByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.GET_CCP_VERSION_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_CCP_VERSION_DTO字段

main_protocol_version

XByteField

0

release_version

XByteField

0

ccp_reserved

StrFixedLenField

b'\x00\x00\x00'

class scapy.contrib.automotive.ccp.GET_DAQ_SIZE

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_DAQ_SIZE fields

DAQ_num

XByteField

0

ccp_reserved

XByteField

0

DTO_identifier

XIntField

0

class scapy.contrib.automotive.ccp.GET_DAQ_SIZE_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_DAQ_SIZE_DTO字段

DAQ_list_size

XByteField

0

first_pid

XByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff'

class scapy.contrib.automotive.ccp.GET_SEED

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_SEED字段

resource

XByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.GET_SEED_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_SEED_DTO字段

protection_status

XByteField

0

seed

StrFixedLenField

b'\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.GET_S_STATUS

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_S_STATUS字段

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.GET_S_STATUS_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
GET_S_STATUS_DTO字段

session_status

FlagsField (8位)

<Flag 0 ()>

information_qualifier

ByteField

0

information

StrFixedLenField

b'\x00\x00\x00'

class scapy.contrib.automotive.ccp.MOVE

Bases: scapy.packet.Packet

aliastypes
fields_desc
移动字段

size

IntField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.PROGRAM

Bases: scapy.packet.Packet

aliastypes
fields_desc
节目栏位

size

XByteField

0

data

StrFixedLenField

b''

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.PROGRAM_6

Bases: scapy.packet.Packet

aliastypes
fields_desc
PROGRAM_6栏位

data

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.PROGRAM_6_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
PROGRAM_6_DTO字段

MTA0_extension

ByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.PROGRAM_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
PROGRAM_DTO字段

MTA0_extension

ByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.SELECT_CAL_PAGE

Bases: scapy.packet.Packet

aliastypes
fields_desc
SELECT_CAL_PAGE栏位

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.SET_DAQ_PTR

Bases: scapy.packet.Packet

aliastypes
fields_desc
SET_DAQ_PTR字段

DAQ_num

XByteField

0

ODT_num

XByteField

0

ODT_element

XByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff'

class scapy.contrib.automotive.ccp.SET_MTA

Bases: scapy.packet.Packet

aliastypes
fields_desc
SET_MTA字段

mta_num

XByteField

0

address_extension

XByteField

0

address

XIntField

0

class scapy.contrib.automotive.ccp.SET_S_STATUS

Bases: scapy.packet.Packet

aliastypes
fields_desc
SET_S_STATUS字段

session_status

FlagsField (8位)

<Flag 0 ()>

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.SHORT_UP

Bases: scapy.packet.Packet

aliastypes
fields_desc
SHORT_UP字段

size

XByteField

0

address_extension

XByteField

0

address

XIntField

0

class scapy.contrib.automotive.ccp.SHORT_UP_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
SHORT_UP_DTO字段

data

StrFixedLenField

b'\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.START_STOP

Bases: scapy.packet.Packet

aliastypes
fields_desc
START_STOP字段

mode

XByteField

0

DAQ_num

XByteField

0

ODT_num

XByteField

0

event_channel

XByteField

0

transmission_rate

XShortField

0

class scapy.contrib.automotive.ccp.START_STOP_ALL

Bases: scapy.packet.Packet

aliastypes
fields_desc
START_STOP_ALL字段

type

ByteEnumField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.TEST

Bases: scapy.packet.Packet

aliastypes
fields_desc
测试领​​域

station_address

LEShortField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.UNLOCK

Bases: scapy.packet.Packet

aliastypes
fields_desc
解锁字段

key

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.UNLOCK_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
UNLOCK_DTO字段

privilege_status

ByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.UPLOAD

Bases: scapy.packet.Packet

aliastypes
fields_desc
上载字段

size

XByteField

0

ccp_reserved

StrFixedLenField

b'\xff\xff\xff\xff\xff'

class scapy.contrib.automotive.ccp.UPLOAD_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
UPLOAD_DTO字段

data

StrFixedLenField

b'\x00\x00\x00\x00\x00'

class scapy.contrib.automotive.ccp.WRITE_DAQ

Bases: scapy.packet.Packet

aliastypes
fields_desc
WRITE_DAQ字段

DAQ_size

XByteField

0

address_extension

XByteField

0

address

XIntField

0