Skip to content

Rebase dicom.py on upstream secdev/scapy master#3

Merged
tmart234 merged 1 commit into
masterfrom
claude/sync-dicom-upstream-NTwMB
May 19, 2026
Merged

Rebase dicom.py on upstream secdev/scapy master#3
tmart234 merged 1 commit into
masterfrom
claude/sync-dicom-upstream-NTwMB

Conversation

@tmart234
Copy link
Copy Markdown
Owner

Replace the local dicom.py with the upstream secdev/scapy version, then
cherry-pick only the additions our tests/features depend on:

  • Transfer Syntax UID constants (IMPLICIT_VR_, EXPLICIT_VR_, JPEG_,
    RLE_
    , HTJP2K_*, etc.)
  • MR_IMAGE_STORAGE_SOP_CLASS_UID, SECONDARY_CAPTURE_SOP_CLASS_UID
  • SOP_CLASS_NAMES lookup dict
  • DIMSE Status Codes (STATUS_* constants, DIMSE_STATUS_CODES dict,
    dimse_status_repr helper)
  • DICOMATField for N-GET-RQ attribute_identifier_list
  • C_CANCEL_RQ command
  • N-DIMSE classes (N_EVENT_REPORT/_GET/_SET/_ACTION/_CREATE/_DELETE RQ+RSP)

Targeted modifications to upstream:

  • DICOMUIDField.i2repr uses errors="replace" for malformed bytes
  • C_MOVE_RQ reorders move_destination before priority (tag-order
    compliance per PS3.7 Section 6.3.1)
  • C_STORE_RQ adds optional Move Originator fields (0000,1030/1031)
  • DICOMMaximumLength.mysummary shows "unlimited" for max_pdu_length=0

Diff against upstream shrinks from 1877 to ~548 lines (445 added,
4 removed) and is now nearly purely additive. All 90 tests in
test/contrib/dicom.uts pass.

https://claude.ai/code/session_013vPex1WoZzEyp1yXCK31Wo

Replace the local dicom.py with the upstream secdev/scapy version, then
cherry-pick only the additions our tests/features depend on:

- Transfer Syntax UID constants (IMPLICIT_VR_*, EXPLICIT_VR_*, JPEG_*,
  RLE_*, HTJP2K_*, etc.)
- MR_IMAGE_STORAGE_SOP_CLASS_UID, SECONDARY_CAPTURE_SOP_CLASS_UID
- SOP_CLASS_NAMES lookup dict
- DIMSE Status Codes (STATUS_* constants, DIMSE_STATUS_CODES dict,
  dimse_status_repr helper)
- DICOMATField for N-GET-RQ attribute_identifier_list
- C_CANCEL_RQ command
- N-DIMSE classes (N_EVENT_REPORT/_GET/_SET/_ACTION/_CREATE/_DELETE RQ+RSP)

Targeted modifications to upstream:
- DICOMUIDField.i2repr uses errors="replace" for malformed bytes
- C_MOVE_RQ reorders move_destination before priority (tag-order
  compliance per PS3.7 Section 6.3.1)
- C_STORE_RQ adds optional Move Originator fields (0000,1030/1031)
- DICOMMaximumLength.mysummary shows "unlimited" for max_pdu_length=0

Diff against upstream shrinks from 1877 to ~548 lines (445 added,
4 removed) and is now nearly purely additive. All 90 tests in
test/contrib/dicom.uts pass.

https://claude.ai/code/session_013vPex1WoZzEyp1yXCK31Wo
@tmart234 tmart234 merged commit a87588a into master May 19, 2026
@tmart234 tmart234 deleted the claude/sync-dicom-upstream-NTwMB branch May 19, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants