Skip to content

Commit

Permalink
Merge branch 'gh_dtc_fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
polybassa committed Oct 12, 2023
2 parents 724d65f + 25fb78b commit a5f3a52
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scapy/contrib/automotive/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
conf.contribs['UDS'] = {'treat-response-pending-as-answer': False}


conf.debug_dissector = True


class UDS(ISOTP):
services = ObservableDict(
{0x10: 'DiagnosticSessionControl',
Expand Down Expand Up @@ -1044,7 +1047,6 @@ def extract_padding(self, s):
class DTCExtendedData(Packet):
name = 'Diagnostic Trouble Code Extended Data'
dataTypes = ObservableDict()

fields_desc = [
ByteEnumField("data_type", 0, dataTypes),
XByteField("record", 0)
Expand All @@ -1071,7 +1073,10 @@ def next_identifier_cb(pkt, lst, cur, remain):
fields_desc = [
ByteField("record_number", 0),
ByteField("record_number_of_identifiers", 0),
PacketListField("snapshotData", None, next_cls_cb=next_identifier_cb)
PacketListField(
"snapshotData", None,
next_cls_cb=lambda pkt, lst, cur, remain: DTCSnapshot.next_identifier_cb(
pkt, lst, cur, remain))
]

def extract_padding(self, s):
Expand Down

0 comments on commit a5f3a52

Please sign in to comment.