docs: tighten ncp extension selector notes

This commit is contained in:
Mario Fetka
2026-06-02 19:29:18 +00:00
parent 800ca21aff
commit 27aae30e70
3 changed files with 143 additions and 86 deletions

30
AI.md
View File

@@ -1039,4 +1039,32 @@ Latest endpoint audit checkpoint from patch 0249:
1.x/2.x/3.x endpoint or planned 4.x endpoint after the AFP family, skipping
unlisted gaps and ignoring 5.x-only endpoints.
Next patch number should be `0250`.
## 2026-06-02 - Patch 0250 NCP Extension selector notes 36/00..06 and 37
- Continued NDK-first after AFP with the NetWare-4.x planned-scope NCP
Extension family: `0x2222/36` selectors `36/00` through `36/06`, plus
`0x2222/37` Execute NCP Extension.
- The source already carried an explicit `switch` for the NCP Extension
selectors. Patch `0250` tightens each selector-local comment so every case
has concrete NDK Request/Response fields rather than a generic extension
summary:
- `36/00` Get NCP Extension Information old
- `36/01` Get NCP Extension Maximum Data Size
- `36/02` Get NCP Extension Information by Name
- `36/03` Get Number of Registered NCP Extensions
- `36/04` Get NCP Extension Registered Verbs List
- `36/05` Return NCP Extension Information
- `36/06` Return NCP Extension Maximum Data Size
- `37` Execute NCP Extension
- Runtime behavior is unchanged: all extension-registration and execution
requests still return `0xfb` until a real extension registry/provider exists.
- Future NCP Extension work must model a real registered-extension table,
version/name/custom-data records, maximum data-size policy, registered verb
enumeration, and provider-owned execute payload dispatch. Do not route
extension payloads through `nwserv` as a generic data-plane broker.
- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or
planned 4.x endpoint after the NCP Extension family, skipping 5.x-only NDS
unless explicitly brought into scope.
Next patch number should be `0251`.

25
TODO.md
View File

@@ -1692,3 +1692,28 @@ Follow-up:
- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or
planned 4.x endpoint after the AFP family, keeping one case and
Request/Response comment per selector.
### NCP Extension selector notes 36/00..06 and 37
Current status:
- Patch `0250` audits the NDK-listed NetWare-4.x planned-scope NCP Extension
family in `src/nwconn.c`.
- The existing `36/xx` selector switch remains guarded by `MARS_NWE_4`, but
each selector now carries its own concrete Request/Response notes:
- `36/00` Get NCP Extension Information old
- `36/01` Get NCP Extension Maximum Data Size
- `36/02` Get NCP Extension Information by Name
- `36/03` Get Number of Registered NCP Extensions
- `36/04` Get NCP Extension Registered Verbs List
- `36/05` Return NCP Extension Information
- `36/06` Return NCP Extension Maximum Data Size
- `37` Execute NCP Extension
- Runtime behavior remains unchanged: all extension-registration and execution
requests return `0xfb` until a real extension registry/provider exists.
Follow-up:
- Continue NDK-first with the next documented NetWare 1.x/2.x/3.x endpoint or
planned 4.x endpoint after NCP Extension. Skip 5.x-only NDS endpoints unless
the project scope changes.

View File

@@ -6408,87 +6408,99 @@ static int handle_ncp_serv(void)
} break;
#if MARS_NWE_4
case 0x24 : { /* NCP Extension information, SDK 36 / wire 0x24. */
case 0x24 : { /* SDK 36/xx NCP Extension information, wire 0x24. */
/*
* NCP 0x2222/36 NCP Extension information group.
*
* Source outcome: no active handler existed for this
* NetWare 4.x/5.x extension-registration family. The
* current project scope plans through NetWare 4.x, so keep
* these selector slots as disabled MARS_NWE_4 stubs until
* a real extension registry/provider exists.
*
* Request handoff: direct NCP 36 carries the
* SubFuncStrucLen word before requestdata[0], and
* requestdata[0] is the NCP Extension SubFuncCode.
* Reply ownership would remain local: Completion plus the
* documented information payload, with no routing through
* nwserv as a data-plane broker.
* NetWare 4.x planned-scope extension-registration family.
* mars-nwe has no extension registry/provider yet, so each
* selector remains an explicit compatibility placeholder.
* The outer direct-NCP request carries FunctionCode 36 and
* SubFuncStrucLen; requestdata[0] is the NDK SubFuncCode.
*/
int ext_sub = (requestlen > (int)sizeof(NCPREQUEST))
? (int)requestdata[0] : -1;
switch (ext_sub) {
case 0x00: /* 36/00 Get NCP Extension Information old.
* Request: SubFuncCode=0, NCPExtensionNumber.
* Reply: extension number, major/minor/revision,
* name length/name, and 32-byte CustomData.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x00: { /* SDK 36/00 Get NCP Extension Information old. */
/*
* Request: SubFuncStrucLen=5, SubFuncCode=0,
* NCPExtensionNumber long (Lo-Hi). -1 starts
* a sequential scan for the first registered
* extension number.
* Response: NCPextensionNumber, major/minor/
* revision, name length/name at offsets 15/16,
* and the 32-byte CustomData area at offset 48.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x01: /* 36/01 Get NCP Extension Maximum Data Size.
* Request: SubFuncCode=1, NCPExtensionNumber.
* Reply: maximum extension request/reply data
* size for the selected registered extension.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x01: { /* SDK 36/01 Get NCP Extension Maximum Data Size. */
/*
* Request: SubFuncStrucLen=1, SubFuncCode=1.
* Response: NCPdataSize word (Lo-Hi), the
* maximum packet data size accepted by the
* registered-extension interface.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x02: /* 36/02 Get NCP Extension Information by Name.
* Request: SubFuncCode=2, NameLength, Name.
* Reply: same information block as 36/00.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x02: { /* SDK 36/02 Get NCP Extension Information by Name. */
/*
* Request: SubFuncStrucLen=3+NameLen,
* SubFuncCode=2, NCPextensionNameLen, and
* NCPextensionName bytes.
* Response: same information block as 36/00:
* extension number, version bytes, name length/
* name, and 32-byte CustomData.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x03: /* 36/03 Get Number of Registered NCP Extensions.
* Request: SubFuncCode=3.
* Reply: NumberOfNCPExtensions.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x03: { /* SDK 36/03 Get Number of Registered NCP Extensions. */
/*
* Request: SubFuncStrucLen=1, SubFuncCode=3.
* Response: NumberOfNCPExtensions long
* (Lo-Hi).
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x04: /* 36/04 Get NCP Extension Registered Verbs List.
* Request: SubFuncCode=4, StartingNumber.
* Reply: ReturnedListCount, NextStartNumber, and
* NCP extension numbers.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x04: { /* SDK 36/04 Get NCP Extension Registered Verbs List. */
/*
* Request: SubFuncStrucLen=5, SubFuncCode=4,
* StartingNumber long (Lo-Hi).
* Response: ReturnedListCount, nextStartingNumber,
* and NCPExtensionNumbers[ReturnedListCount].
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x05: /* 36/05 Return NCP Extension Information.
* Request: SubFuncCode=5, NCPExtensionNumber.
* Reply: information block for the exact
* registered extension number.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x05: { /* SDK 36/05 Return NCP Extension Information. */
/*
* Request: SubFuncStrucLen=5, SubFuncCode=5,
* NCPextensionNumber long (Lo-Hi).
* Response: exact-match information block with
* extension number, version bytes, name length/
* name, and 32-byte CustomData.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
case 0x06: /* 36/06 Return NCP Extension Maximum Data Size.
* Request: SubFuncCode=6, NCPExtensionNumber.
* Reply: maximum data size for the exact
* registered extension number.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
break;
case 0x06: { /* SDK 36/06 Return NCP Extension Maximum Data Size. */
/*
* Request: SubFuncStrucLen=1, SubFuncCode=6.
* Response: NCPDataSize long (Lo-Hi), the
* largest data payload accepted for extension
* execution.
* Future owner: extension registry/provider.
*/
completition = 0xfb;
} break;
default: completition = 0xfb;
break;
@@ -6496,23 +6508,15 @@ static int handle_ncp_serv(void)
}
break;
case 0x25 : { /* Execute NCP Extension, SDK 37 / wire 0x25. */
case 0x25 : { /* SDK 37 Execute NCP Extension, wire 0x25. */
/*
* NCP 0x2222/37 Execute NCP Extension.
*
* Source outcome: no active handler existed for executing
* registered NCP extensions. This is a planned NetWare
* 4.x compatibility surface only if mars-nwe eventually
* grows an extension registry/provider.
*
* Request: SubFuncStrucLen, NCPExtensionNumber, RequestData.
* CLIB-style extension payloads may begin with
* MaximumReplyLength, RequestBuffer, and RequestBufferLength,
* but the concrete payload is owned by the selected
* registered extension handler.
*
* Reply: provider-defined ReplyBuffer, often with a
* CLIB-style ReplyBufferLength prefix.
* Request: SubFuncStrucLen=4+sizeof(RequestData),
* NCPExtensionNumber long (Hi-Lo in the request layout),
* then provider-defined RequestData. CLIB-style payloads
* may start with MaximumReplyLength, RequestBuffer bytes,
* and RequestBufferLength.
* Response: provider-defined ReplyBuffer; CLIB handlers may
* prefix it with ReplyBufferLength.
* Future owner: extension registry/provider, not nwserv as
* a data-plane payload broker.
*/