G
YouTube TikTok Games
Skip to content

IEC 61850 file-service golden parity: Directory/Open/Read/Close/Delete #96

Open

Description

@masarray

Goal

Implement capture-backed MMS File Services parity for the IED Simulator and reusable ARStack core, using the real external IEC 61850 client Open / Download / Delete traces as the wire oracle.

Golden wire profile

  • FileDirectory [77]: root request keeps fileSpecification present as A0 02 19 00.
  • FileOpen [72]: rooted-backslash file name + initialPosition=0, returns per-association FRSM handle.
  • FileRead [73]: one MMS response may be COTP-segmented across multiple TPKTs; moreFollows is MMS-level, not TCP/TPKT-level.
  • FileClose [74]: primitive FRSM request, empty successful response.
  • FileDelete [76]: constructed request carrying the rooted-backslash GraphicString directly; successful response is primitive empty [76] (9F 4C 00).
  • external IEC 61850 client groups physical COMTRADE companions client-side. Delete sends one FileDelete per physical path, then immediately refreshes FileDirectory.

Architecture

F0 — protocol/core

  • Add service 76 to vector and span service enums/mappings.
  • Add portable FileDelete request/response codecs and explicit destructive runtime API.
  • Preserve the portable file layer as filesystem/socket/thread free.

F1 — server extension

  • Add an external confirmed-service hook to the bounded static dispatcher/runtime rather than embedding host filesystem code in portable MMS core.
  • Preserve existing negotiated MMS size handling and COTP response segmentation.

F2 — host simulator file backend

  • Sandboxed --file-root.
  • Per-association bounded FRSM table/cursors.
  • Sorted bounded FileDirectory with size/timestamp.
  • FileOpen/FileRead/FileClose.
  • FileDelete only when explicitly enabled (--allow-file-delete).
  • Reject traversal, drive/scheme ambiguity, symlink escape, invalid/missing handles and unsafe deletion.
  • Shared root synchronization across simultaneous associations.

F3 — product wiring

  • Simulator helper passes its managed file root.
  • Files workspace can explicitly delete a physical remote file and refresh directory after success.
  • Upload/rename remain out of scope.

F4 — regression / acceptance

  • Exact BER regression for [72,73,74,76,77] including external IEC 61850 client golden shapes.
  • Integration: Directory → Open → Read → Close.
  • Integration: Delete physical companions → Directory refresh.
  • Large FileRead proves one MMS response can be segmented by COTP.
  • Multi-association handle isolation + path/symlink safety tests.
  • Final acceptance requires a real external IEC 61850 client retest; CI/simulator evidence alone is not relabelled as third-party acceptance.

Keep PR #82 OPEN + DRAFT while this work is under external external IEC 61850 client acceptance.

Activity

  1. masarray commented on Sep 15, 2026

    @masarray
    OwnerAuthor

    F0 complete — capture-backed FileDelete protocol/core

    Implemented on PR #82 at 21a98b3dabb12c0902952675e343dad1f121ab83.

    • Added service 76 to vector + span service enums/mappings.
    • Added MmsFileDeleteRequest/Response and exact external IEC 61850 client wire codec (BF 4C constructed request with direct GraphicString rooted path; primitive empty 9F 4C 00 success response).
    • Added explicit destructive MmsFileTransferRuntime::remove() API.
    • Delete is deliberately single-shot: no adaptive pathname retry after an ambiguous destructive request.
    • Added exact-wire and runtime single-shot regressions.
    • Focused file-service regression passed.
    • external IEC 61850 client parity server profile built successfully with warnings-as-errors after extending the diagnostic service switch for 72/73/74/76.

    F1 next: portable external confirmed-service hook so the host simulator can implement real file services without putting filesystem dependencies into portable MMS core.

  2. changed the title [-]IEDScout file-service golden parity: Directory/Open/Read/Close/Delete[/-] [+]external IEC 61850 client file-service golden parity: Directory/Open/Read/Close/Delete[/+] on Sep 19, 2026
  3. changed the title [-]external IEC 61850 client file-service golden parity: Directory/Open/Read/Close/Delete[/-] [+]IEC 61850 file-service golden parity: Directory/Open/Read/Close/Delete[/+] on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions