docs: split tts selector handling notes
This commit is contained in:
183
src/nwconn.c
183
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 */
|
||||
|
||||
Reference in New Issue
Block a user