From 916007b6080ea1548635bb36a6054aeafe3a3a01 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 2 Jun 2026 19:16:20 +0000 Subject: [PATCH] docs: split tts selector handling notes --- AI.md | 21 ++++++ TODO.md | 32 +++++++++ src/nwconn.c | 183 ++++++++++++++++++++++++++++++++------------------- 3 files changed, 170 insertions(+), 66 deletions(-) diff --git a/AI.md b/AI.md index 30c66d5..272d5d9 100644 --- a/AI.md +++ b/AI.md @@ -994,3 +994,24 @@ Latest endpoint audit checkpoint from patch 0247: skipping unlisted gaps and ignoring 5.x-only endpoints. Next patch number should be `0248`. + +Latest endpoint audit checkpoint from patch 0248: + +- Continued NDK-first outside the `23/xx` tail with the in-scope Transaction + Tracking System family `34/00` through `34/10` in `src/nwconn.c`. +- Replaced the old grouped TTS documentation block with an explicit + `switch (ufunc)` so every NDK selector has its own `case` and adjacent + `Request:`/`Response:` summary: + `34/00` availability, `34/01` begin, `34/02` end, `34/03` abort, + `34/04` status, `34/05`/`34/06` application thresholds, + `34/07`/`34/08` workstation thresholds, and `34/09`/`34/10` + transaction control bits. +- Runtime behavior is preserved: `34/00` reports TTS unavailable and all other + TTS selectors return `0xfb`. Do not return synthetic success without real + transaction files, transaction status tracking, lock integration, threshold + state, control-bit state, and rollback/backout logic. +- The next NDK-first pass should continue with the next documented NetWare + 1.x/2.x/3.x endpoint or planned 4.x endpoint after the TTS family, skipping + unlisted gaps and ignoring 5.x-only endpoints. + +Next patch number should be `0249`. diff --git a/TODO.md b/TODO.md index 1143b6b..93c6793 100644 --- a/TODO.md +++ b/TODO.md @@ -1620,3 +1620,35 @@ Follow-up: - Continue NDK-first with the next documented NetWare 1.x/2.x/3.x selector or planned 4.x selector outside this `23/xx` tail, skipping unlisted gaps and ignoring 5.x-only endpoints. + +### Transaction Tracking System selector split 34/00..10 + +Current status: + +- Patch `0248` audits the NDK-listed, NetWare-2.x/3.x/4.x-relevant TTS family + `0x2222/34` in `src/nwconn.c`. +- The old grouped TTS comment has been replaced by one explicit `switch + (ufunc)` case per selector, each with adjacent Request/Response notes: + - `34/00` TTS Is Available + - `34/01` TTS Begin Transaction + - `34/02` TTS End Transaction + - `34/03` TTS Abort Transaction + - `34/04` TTS Transaction Status + - `34/05` TTS Get Application Thresholds + - `34/06` TTS Set Application Thresholds + - `34/07` TTS Get Workstation Thresholds + - `34/08` TTS Set Workstation Thresholds + - `34/09` TTS Get Transaction Bits + - `34/10` TTS Set Transaction Bits +- Behavior is unchanged: `34/00` reports transaction tracking unavailable; + every other selector still returns `0xfb` until a real TTS provider exists. +- Future implementation requires true transaction files, transaction status + tracking, lock integration, application/workstation threshold state, + forced-record-locking control bits, commit ordering, and rollback/backout + logic. Do not fake successful TTS operations. + +Follow-up: + +- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or + planned 4.x endpoint after the TTS family, keeping one case and + Request/Response comment per selector. diff --git a/src/nwconn.c b/src/nwconn.c index 9f54819..1675944 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -5972,73 +5972,124 @@ static int handle_ncp_serv(void) int ufunc = (int) *requestdata; /* * NCP 0x2222/34 Transaction Tracking System (TTS) group. - * The dispatcher passes requestdata[0] as SubFunctionCode - * and the remaining bytes as the subfunction payload. This - * code currently only answers the availability probe and - * intentionally rejects every state-changing or state-query - * request because MARS-NWE has no TTS rollback subsystem. - * - * SDK / NDK subfunctions for the through-3.x-compatible TTS - * group: - * - * 34/00 TTS Is Available - * request: byte SubFunctionCode == 0 - * reply: no reply payload - * completion is the result value: 0x00 unavailable, - * 0xfd disabled, 0xff available. MARS-NWE returns - * 0x00 to report that TTS is unavailable. - * - * 34/01 TTS Begin Transaction - * request: byte SubFunctionCode == 1 - * reply: no reply payload. - * - * 34/02 TTS End Transaction - * request: byte SubFunctionCode == 2 - * reply: long TransactionNumber (Hi-Lo). - * - * 34/03 TTS Abort Transaction - * request: byte SubFunctionCode == 3 - * reply: no reply payload. - * - * 34/04 TTS Transaction Status - * request: byte SubFunctionCode == 4, then long - * TransactionNumber (Hi-Lo) at request offset 8. - * reply: no reply payload. - * - * 34/05 Get Application Thresholds and 34/07 Get - * Workstation Thresholds - * request: byte SubFunctionCode == 5 or 7 - * reply: byte LogicalLockThreshold, byte - * PhysicalLockThreshold. - * - * 34/06 Set Application Thresholds and 34/08 Set - * Workstation Thresholds - * request: byte SubFunctionCode == 6 or 8, then byte - * LogicalLockThreshold and byte PhysicalLockThreshold. - * reply: no reply payload. - * - * 34/09 Get Transaction Bits - * request: byte SubFunctionCode == 9 - * reply: byte ControlFlags. The NDK table prints this - * field at reply offset 9, but the only payload byte is - * ControlFlags after the normal reply header. - * - * 34/10 Set Transaction Bits - * request: byte SubFunctionCode == 10, then byte - * ControlFlags. - * reply: no reply payload. - * - * MARS-NWE returns 0xfb for all subfunctions except 34/00. - * That is deliberate: returning synthetic success for Begin, - * End, Abort, thresholds, status, or control bits would make - * clients believe transaction rollback is active when no - * transaction files, status tracking, or backout logic exists. - * - * Cross-check: lwared and the Rust nwserver code do not - * provide a fuller TTS transaction implementation to mirror. + * requestdata[0] is the SubFunctionCode and the remaining + * bytes are the subfunction payload. MARS-NWE has no TTS + * rollback subsystem, so only the availability probe reports + * the documented unavailable status; all state-changing or + * state-query subfunctions are intentionally rejected. + * Do not synthesize success for transaction, threshold, or + * control-bit calls without real transaction files, status + * tracking, lock integration, and backout logic. */ - if (!ufunc) completition=0; /* TTS unavailable */ - else completition=0xfb; /* request not known */ + switch (ufunc) { + case 0x00: /* SDK 34/00 TTS Is Available */ + /* + * Request: SubFunctionCode=0. + * Response: no payload; completion/result is + * 0x00 unavailable, 0xfd disabled, or 0xff + * available. Current backend reports TTS + * unavailable. + */ + completition=0; + break; + case 0x01: /* SDK 34/01 TTS Begin Transaction */ + /* + * Request: SubFunctionCode=1. + * Response: no payload. Requires a real + * explicit transaction context and rollback + * tracking before it can return success. + */ + completition=0xfb; + break; + case 0x02: /* SDK 34/02 TTS End Transaction */ + /* + * Request: SubFunctionCode=2. + * Response: long TransactionNumber (Hi-Lo). + * Requires transaction commit ordering and + * durable status tracking. + */ + completition=0xfb; + break; + case 0x03: /* SDK 34/03 TTS Abort Transaction */ + /* + * Request: SubFunctionCode=3. + * Response: no payload. Requires rollback of + * explicit/implicit transaction writes and + * release of TTS-held locks. + */ + completition=0xfb; + break; + case 0x04: /* SDK 34/04 TTS Transaction Status */ + /* + * Request: SubFunctionCode=4, + * TransactionNumber long (Hi-Lo). + * Response: no payload; completion reports + * status. Requires persistent transaction + * status state. + */ + completition=0xfb; + break; + case 0x05: /* SDK 34/05 TTS Get Application Thresholds */ + /* + * Request: SubFunctionCode=5. + * Response: byte LogicalLockThreshold, byte + * PhysicalLockThreshold. Requires per-task/ + * application implicit-transaction threshold + * state. + */ + completition=0xfb; + break; + case 0x06: /* SDK 34/06 TTS Set Application Thresholds */ + /* + * Request: SubFunctionCode=6, byte + * LogicalLockThreshold, byte + * PhysicalLockThreshold. + * Response: no payload. Requires per-task/ + * application TTS threshold state. + */ + completition=0xfb; + break; + case 0x07: /* SDK 34/07 TTS Get Workstation Thresholds */ + /* + * Request: SubFunctionCode=7. + * Response: byte LogicalLockThreshold, byte + * PhysicalLockThreshold. Requires shared + * workstation threshold state reset by End Of + * Job. + */ + completition=0xfb; + break; + case 0x08: /* SDK 34/08 TTS Set Workstation Thresholds */ + /* + * Request: SubFunctionCode=8, byte + * LogicalLockThreshold, byte + * PhysicalLockThreshold. + * Response: no payload. Requires shared + * workstation TTS threshold state. + */ + completition=0xfb; + break; + case 0x09: /* SDK 34/09 TTS Get Transaction Bits */ + /* + * Request: SubFunctionCode=9. + * Response: byte ControlFlags. Requires + * per-task forced-record-locking control + * state. + */ + completition=0xfb; + break; + case 0x0a: /* SDK 34/10 TTS Set Transaction Bits */ + /* + * Request: SubFunctionCode=10, byte + * ControlFlags. + * Response: no payload. Requires per-task + * forced-record-locking control state. + */ + completition=0xfb; + break; + default: completition=0xfb; + break; + } } break; case 0x23 : { /* div AFP Calls */