scapy.contrib.automotive.someip
- class scapy.contrib.automotive.someip.SD(_pkt, /, *, flags=0, res=0, len_entry_array=None, entry_array=[], len_option_array=None, option_array=[])[source]
Bases:
_SDPacketBase
SD Packet
- NOTEwhen adding ‘entries’ or ‘options’, do not use list.append()
method but create a new list
- e.g.p = SD()
p.option_array = [SDOption_Config(),SDOption_IP6_EndPoint()]
- FLAGSDEF = {'REBOOT': Flag(mask=128, offset=7), 'UNICAST': Flag(mask=64, offset=6)}
- SOMEIP_CLIENT_ID = 0
- SOMEIP_IFACE_VER = 1
- SOMEIP_MINIMUM_SESSION_ID = 1
- SOMEIP_MSGID_EVENTID = 256
- SOMEIP_MSGID_SRVID = 65535
- SOMEIP_MSGID_SUBID = 1
- SOMEIP_MSG_TYPE = 2
- SOMEIP_PROTO_VER = 1
- SOMEIP_RETCODE = 0
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FLAGS | RES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | LEN ENTRY ARRAY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ENTRY ARRAY |LEN OPTION ARRA| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | OPTION ARRAY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. SD
flags
0
res
0
len_entry_array
None
entry_array
[]
len_option_array
None
option_array
[]
- class scapy.contrib.automotive.someip.SDEntry_EventGroup(_pkt, /, *, type=6, index_1=0, index_2=0, n_opt_1=0, n_opt_2=0, srv_id=0, inst_id=0, major_ver=0, ttl=0, res=0, cnt=0, eventgroup_id=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | INDEX 1 | INDEX 2 |N OPT 1|N OPT 2| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRV ID | INST ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAJOR VER | TTL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | RES | CNT | EVENTGROUP ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. SDEntry_EventGroup
type
6
index_1
0
index_2
0
n_opt_1
XBitField
(4 bits)0
n_opt_2
XBitField
(4 bits)0
srv_id
0
inst_id
0
major_ver
0
ttl
0
res
XBitField
(12 bits)0
cnt
XBitField
(4 bits)0
eventgroup_id
0
- class scapy.contrib.automotive.someip.SDEntry_Service(_pkt, /, *, type=0, index_1=0, index_2=0, n_opt_1=0, n_opt_2=0, srv_id=0, inst_id=0, major_ver=0, ttl=0, minor_ver=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | INDEX 1 | INDEX 2 |N OPT 1|N OPT 2| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRV ID | INST ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAJOR VER | TTL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | MINOR VER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. SDEntry_Service
type
0
index_1
0
index_2
0
n_opt_1
XBitField
(4 bits)0
n_opt_2
XBitField
(4 bits)0
srv_id
0
inst_id
0
major_ver
0
ttl
0
minor_ver
0
- class scapy.contrib.automotive.someip.SDOption_Config(_pkt, /, *, len=None, type=1, res_hdr=0, cfg_str=b'\x00')[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CFG STR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_Config
len
None
type
1
res_hdr
0
cfg_str
b'\x00'
- class scapy.contrib.automotive.someip.SDOption_IP4_EndPoint(_pkt, /, *, len=9, type=4, res_hdr=0, addr='0.0.0.0', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP4_EndPoint
len
9
type
4
res_hdr
0
addr
'0.0.0.0'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_IP4_Multicast(_pkt, /, *, len=9, type=20, res_hdr=0, addr='0.0.0.0', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP4_Multicast
len
9
type
20
res_hdr
0
addr
'0.0.0.0'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_IP4_SD_EndPoint(_pkt, /, *, len=9, type=36, res_hdr=0, addr='0.0.0.0', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP4_SD_EndPoint
len
9
type
36
res_hdr
0
addr
'0.0.0.0'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_IP6_EndPoint(_pkt, /, *, len=21, type=6, res_hdr=0, addr='::', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP6_EndPoint
len
21
type
6
res_hdr
0
addr
'::'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_IP6_Multicast(_pkt, /, *, len=21, type=22, res_hdr=0, addr='::', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP6_Multicast
len
21
type
22
res_hdr
0
addr
'::'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_IP6_SD_EndPoint(_pkt, /, *, len=21, type=38, res_hdr=0, addr='::', res_tail=0, l4_proto=17, port=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADDR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES TAIL | L4 PROTO | PORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_IP6_SD_EndPoint
len
21
type
38
res_hdr
0
addr
'::'
res_tail
0
l4_proto
17
port
0
- class scapy.contrib.automotive.someip.SDOption_LoadBalance(_pkt, /, *, len=5, type=2, res_hdr=0, priority=0, weight=0)[source]
Bases:
_SDPacketBase
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | RES HDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PRIORITY | WEIGHT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SDOption_LoadBalance
len
5
type
2
res_hdr
0
priority
0
weight
0
- class scapy.contrib.automotive.someip.SOMEIP(_pkt, /, *, srv_id=0, sub_id=0, method_id=0, event_id=0, len=None, client_id=0, session_id=0, proto_ver=1, iface_ver=1, msg_type=0, retcode=0, offset=0, res=0, more_seg=0)[source]
Bases:
Packet
SOME/IP Packet.
- INTERFACE_VERSION = 1
- LEN_OFFSET = 8
- LEN_OFFSET_TP = 12
- PROTOCOL_VERSION = 1
- RET_E_MALFORMED_MSG = 9
- RET_E_NOT_OK = 1
- RET_E_NOT_REACHABLE = 5
- RET_E_NOT_READY = 4
- RET_E_OK = 0
- RET_E_TIMEOUT = 6
- RET_E_UNKNOWN_METHOD = 3
- RET_E_UNKNOWN_SERVICE = 2
- RET_E_WRONG_INTERFACE_V = 8
- RET_E_WRONG_MESSAGE_TYPE = 10
- RET_E_WRONG_PROTOCOL_V = 7
- TYPE_ERROR = 129
- TYPE_ERROR_ACK = 193
- TYPE_NOTIFICATION = 2
- TYPE_NOTIFICATION_ACK = 66
- TYPE_REQUEST = 0
- TYPE_REQUEST_ACK = 64
- TYPE_REQUEST_NORET_ACK = 65
- TYPE_REQUEST_NO_RET = 1
- TYPE_RESPONSE = 128
- TYPE_RESPONSE_ACK = 192
- TYPE_TP_ERROR = 161
- TYPE_TP_NOTIFICATION = 34
- TYPE_TP_REQUEST = 32
- TYPE_TP_REQUEST_NO_RET = 33
- TYPE_TP_RESPONSE = 160
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRV ID |S| METHOD ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EVENT ID | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | CLIENT ID |S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | PROTO VER | IFACE VER |M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | RETCODE | OFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | RES |M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. SOMEIP
srv_id
0
sub_id
0
method_id
XBitField
(Cond) (15 bits)0
event_id
XBitField
(Cond) (15 bits)0
len
None
client_id
0
session_id
0
proto_ver
1
iface_ver
1
msg_type
0
retcode
0
offset
BitField
(Cond) (28 bits)0
res
BitField
(Cond) (3 bits)0
more_seg
BitField
(Cond) (1 bit)0