From d41a007b54ef477e64e56eeb7a85ac97f2e0c80b Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 2 Jun 2026 19:59:19 +0000 Subject: [PATCH] docs: split rpc selector notes --- AI.md | 26 +++++++++++++++- TODO.md | 20 +++++++++++++ src/nwconn.c | 85 ++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 105 insertions(+), 26 deletions(-) diff --git a/AI.md b/AI.md index 6900f8f..0026187 100644 --- a/AI.md +++ b/AI.md @@ -1156,5 +1156,29 @@ Next patch number should be `0253`. - Do not emulate the NDK note that `114/06` returns success in all cases until there is an explicit TimeSync compatibility policy and real server-list state. -Next patch number should be `0255`. +## 2026-06-02 - Patch 0255 RPC selector split 131/01..07 + +- Continued NDK-first after Time Synchronization by revisiting the planned + NetWare-4.x RPC/server-control family in `src/nwconn.c`: + - `131/01` RPC Load an NLM + - `131/02` RPC Unload an NLM + - `131/03` RPC Mount Volume + - `131/04` RPC Dismount Volume + - `131/05` RPC Add Name Space To Volume + - `131/06` RPC Set Set Command Value + - `131/07` RPC Execute NCF File +- The source already had selector coverage behind `MARS_NWE_4`, but the cases + were grouped through fall-through to one shared unsupported return. Patch + `0255` splits them so each selector has its own `case`, own `Request:` + summary, own `Reply:` summary, and own `0xfb` return. +- Runtime behavior remains unchanged. RPC/server-control remains unsupported + until a real server-management/RPC provider exists. +- Do not fake RPC success. These calls can load/unload NLMs, mount/dismount + volumes, add name spaces, change SET commands, and execute NCF files; they + require supervisor-equivalent authentication, real provider state, and + documented `RPCccode` mapping. +- Keep `nwserv` as control-plane supervisor/registry only; do not route these + RPC payloads through `nwserv` as a generic data-plane broker. + +Next patch number should be `0256`. diff --git a/TODO.md b/TODO.md index a470cf2..550a7f1 100644 --- a/TODO.md +++ b/TODO.md @@ -1795,3 +1795,23 @@ Follow-up: - Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or planned 4.x endpoint after Time Synchronization, keeping one case-local Request/Response comment per selector and skipping 5.x-only endpoints. + +### RPC selector split 131/01..07 + +Current status: + +- Patch `0255` revisits the planned NetWare-4.x RPC/server-control family in + `src/nwconn.c` and splits the old grouped fall-through selector notes into + individual cases for `131/01` through `131/07`. +- Runtime behavior is unchanged; every RPC selector still returns `0xfb` until + a real server-management/RPC provider exists. +- Each selector now has adjacent Request/Reply notes, including the RPC common + `RPCccode` reply and selector-specific request fields such as NLM path/name, + volume name, namespace/volume string, SET command value, or NCF path/name. + +Follow-up: + +- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or + planned 4.x endpoint after RPC/server-control, keeping one case-local + Request/Response comment per selector and skipping 5.x-only endpoints. + diff --git a/src/nwconn.c b/src/nwconn.c index 7731d37..63ce3da 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -8265,35 +8265,70 @@ static int handle_ncp_serv(void) : 0xff; switch (rpc_subfunc) { case 0x01: /* 131/01 RPC Load an NLM. - * Request: NLMLoadOptions long, reserved[3], + * Request: SubFunctionStrucLen=21+len(PathAndName), + * SubFuncCode=1, NLMLoadOptions, reserved[3], * reservedFlags[4], ASCIIZ PathAndName. - */ - case 0x02: /* 131/02 RPC Unload an NLM. - * Request: reserved[4], reservedFlags[4], - * ASCIIZ NLMName. - */ - case 0x03: /* 131/03 RPC Mount Volume. - * Request: reserved[4], reservedFlags[4], - * ASCIIZ VolumeName. - */ - case 0x04: /* 131/04 RPC Dismount Volume. - * Request: reserved[4], reservedFlags[4], - * ASCIIZ VolumeName. - */ - case 0x05: /* 131/05 RPC Add Name Space To Volume. - * Request: reserved[4], reservedFlags[4], - * ASCIIZ "NameSpaceName {TO} {VOLUME} Volume". - */ - case 0x06: /* 131/06 RPC Set Set Command Value. - * Request: set-command type/value payload plus - * ASCIIZ SetCmdName and optional ASCIIZ value. - */ - case 0x07: /* 131/07 RPC Execute NCF File. - * Request: reserved[4], reservedFlags[4], - * ASCIIZ NCF file path/name. + * Reply: RPCccode, reserved[4]. */ completition = 0xfb; break; + + case 0x02: /* 131/02 RPC Unload an NLM. + * Request: SubFunctionStrucLen=21+len(NLMName), + * SubFuncCode=2, reserved[4], + * reservedFlags[4], ASCIIZ NLMName. + * Reply: RPCccode, reserved. + */ + completition = 0xfb; + break; + + case 0x03: /* 131/03 RPC Mount Volume. + * Request: SubFunctionStrucLen=21+len(VolumeName), + * SubFuncCode=3, reserved[4], + * reservedFlags[4], ASCIIZ VolumeName. + * Reply: RPCccode, reserved[4], VolumeNumber. + */ + completition = 0xfb; + break; + + case 0x04: /* 131/04 RPC Dismount Volume. + * Request: SubFunctionStrucLen=21+len(VolumeName), + * SubFuncCode=4, reserved[4], + * reservedFlags[4], ASCIIZ VolumeName. + * Reply: RPCccode, reserved. + */ + completition = 0xfb; + break; + + case 0x05: /* 131/05 RPC Add Name Space To Volume. + * Request: SubFunctionStrucLen=21+len(AddNameSpaceAndVol), + * SubFuncCode=5, reserved[4], + * reservedFlags[4], ASCIIZ AddNameSpaceAndVol. + * Reply: RPCccode, reserved[4]. + */ + completition = 0xfb; + break; + + case 0x06: /* 131/06 RPC Set Set Command Value. + * Request: SubFunctionStrucLen=21+len(SetCmdName) + * plus optional value string when typeFlag=0, + * SubFuncCode=6, typeFlag, Value, reserved[2], + * reservedFlags[4], ASCIIZ SetCmdName, optional + * ASCIIZ value string. + * Reply: RPCccode, reserved[4]. + */ + completition = 0xfb; + break; + + case 0x07: /* 131/07 RPC Execute NCF File. + * Request: SubFunctionStrucLen=21+len(PathAndName), + * SubFuncCode=7, reserved[4], + * reservedFlags[4], ASCIIZ PathAndName. + * Reply: RPCccode, reserved[4]. + */ + completition = 0xfb; + break; + default: completition = 0xfb; break; }