scapy.contrib.automotive.ccp

class scapy.contrib.automotive.ccp.ACTION_SERVICE

Bases: scapy.packet.Packet

aliastypes
fields_desc
ACTION_SERVICE fields

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 fields

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 fields

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 fields

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 fields

flags

FlagsField (3 bits)

<Flag 0 ()>

identifier

XBitField (29 bits)

0

length

ByteField

8

reserved

ThreeBytesField

0

payload_guess

Possible sublayers: DTO

class scapy.contrib.automotive.ccp.CLEAR_MEMORY

Bases: scapy.packet.Packet

aliastypes
fields_desc
CLEAR_MEMORY fields

size

IntField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.CONNECT

Bases: scapy.packet.Packet

aliastypes
fields_desc
CONNECT fields

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 fields

cmd

ByteEnumField

1

ctr

ByteField

0

hashret()
payload_guess

Possible sublayers: ACTION_SERVICE, BUILD_CHKSUM, CLEAR_MEMORY, CONNECT, DIAG_SERVICE, DISCONNECT, DNLOAD_6, DNLOAD, EXCHANGE_ID, GET_ACTIVE_CAL_PAGE, GET_CCP_VERSION, GET_DAQ_SIZE, GET_SEED, GET_S_STATUS, MOVE, PROGRAM_6, PROGRAM, SELECT_CAL_PAGE, SET_DAQ_PTR, SET_MTA, SET_S_STATUS, SHORT_UP, START_STOP_ALL, START_STOP, TEST, UNLOCK, UPLOAD, WRITE_DAQ

class scapy.contrib.automotive.ccp.DEFAULT_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DEFAULT_DTO fields

load

StrFixedLenField

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

class scapy.contrib.automotive.ccp.DIAG_SERVICE

Bases: scapy.packet.Packet

aliastypes
fields_desc
DIAG_SERVICE fields

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 fields

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
DISCONNECT fields

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 fields

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 fields

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 fields

MTA0_extension

XByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.DNLOAD_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
DNLOAD_DTO fields

MTA0_extension

XByteField

0

MTA0_address

XIntField

0

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

Bases: scapy.packet.Packet

aliastypes
answers(other)

In CCP, the payload of a DTO packet is dependent on the cmd field of a corresponding CRO packet. Two packets correspond, if there ctr field is equal. If answers detect the corresponding CRO, it will interpret the payload of a DTO with the correct class. In CCP, there is no other way, to determine the class of a DTO payload. Since answers is called on sr and sr1, this modification of the original answers implementation will give a better user experience.

default_fields
direction
explicit
fields
fields_desc
DTO fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

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 fields

session_status

FlagsField (8 bits)

<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
MOVE fields

size

IntField

0

ccp_reserved

StrFixedLenField

b'\xff\xff'

class scapy.contrib.automotive.ccp.PROGRAM

Bases: scapy.packet.Packet

aliastypes
fields_desc
PROGRAM fields

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 fields

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 fields

MTA0_extension

ByteField

0

MTA0_address

XIntField

0

class scapy.contrib.automotive.ccp.PROGRAM_DTO

Bases: scapy.packet.Packet

aliastypes
fields_desc
PROGRAM_DTO fields

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 fields

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 fields

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 fields

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 fields

session_status

FlagsField (8 bits)

<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 fields

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 fields

data

StrFixedLenField

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

class scapy.contrib.automotive.ccp.START_STOP

Bases: scapy.packet.Packet

aliastypes
fields_desc
START_STOP fields

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 fields

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
TEST fields

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
UNLOCK fields

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 fields

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
UPLOAD fields

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 fields

data

StrFixedLenField

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

class scapy.contrib.automotive.ccp.WRITE_DAQ

Bases: scapy.packet.Packet

aliastypes
fields_desc
WRITE_DAQ fields

DAQ_size

XByteField

0

address_extension

XByteField

0

address

XIntField

0