docs: audit namespace salvage metadata endpoints

This commit is contained in:
Mario Fetka
2026-06-02 14:52:43 +00:00
parent 648ca88ba6
commit 2fe9d8b67a
3 changed files with 213 additions and 49 deletions

81
AI.md
View File

@@ -198,17 +198,15 @@ Schema/import direction:
Latest endpoint audit note:
- Patch `0209` audits the core `NCP 0x2222/87` / wire `0x57` Name Space
subfunctions `87/01` through `87/12`. `nwconn.c` forwards requestdata
starting at the namespace `SubFunction` byte to `handle_func_0x57()` in
`src/namspace.c`. All core source slots `87/01`..`87/12` are present; no
disabled source stubs were needed for `87/13`..`87/15` because no default
compatibility endpoints were found in that gap during this pass. Important
inline notes: `87/03` returns at most one entry and treats DataStream as
NameSpace; `87/10` and `87/11` expect trustee/object id entries after fixed
legacy path-structure areas. Next patch should be `0210`; a likely next
block is the later `0x2222/87` salvage/metadata subset starting at `87/16`
unless the user chooses another family.
- Patch `0210` audits the later `NCP 0x2222/87` / wire `0x57` Name Space
salvage/metadata subset from `87/16` through `87/29`. Active source cases
now have per-endpoint Coverage/Request/Reply notes, and missing eligible
3.x/4.x metadata slots `87/19`, `87/23`, `87/25`, and `87/27` are represented
as disabled `#if 0` stubs at the correct switch locations. `87/26` already
had a source slot but remains effectively unimplemented and returns the
default `0xfb` completion. Next patch should be `0211`; a likely next block
is the next implemented `87` namespace range or the parallel `89` long
namespace family unless the user chooses another family.
## Patch workflow
@@ -451,35 +449,46 @@ user.org.mars-nwe.afp.prodos-info=0x010203040506
## Latest endpoint audit checkpoint
As of patch `0209-docs-audit-namespace-core-endpoints.patch`, the latest
audited endpoint block is the core Name Space group `0x2222/87` / wire `0x57`
in `src/nwconn.c` and `src/namspace.c`. Earlier patches 0204 through 0207
settled the per-endpoint comment style and the missing-endpoint stub scope:
source stubs are for 1.x/2.x/3.x compatibility gaps and planned 4.x gaps, not
for NetWare 5.x/OES/MOAB/newer endpoints during the current audit.
As of patch `0210-docs-audit-namespace-salvage-metadata-endpoints.patch`,
the latest audited endpoint block is the later Name Space salvage/metadata
subset of `NCP 0x2222/87` / wire `0x57` in `src/namspace.c`. `nwconn.c`
still forwards requestdata starting at the Name Space `SubFunction` byte to
`handle_func_0x57()`, and the handler return convention remains unchanged:
non-negative values are reply payload lengths, negative values are Completion
codes.
The latest audited endpoint block contains:
The latest audited endpoint block contains active source cases for:
- `87/01` Open/Create File or Subdirectory;
- `87/02` Initialize Search;
- `87/03` Search for File or Subdirectory;
- `87/04` Rename Or Move a File or Subdirectory;
- `87/05` Scan File or Subdirectory for Trustees;
- `87/06` Obtain File or Subdirectory Information;
- `87/07` Modify File or Subdirectory DOS Information;
- `87/08` Delete a File or Subdirectory;
- `87/09` Set Short Directory Handle;
- `87/10` Add Trustee Set to File or Subdirectory;
- `87/11` Delete Trustee Set from File or SubDirectory;
- `87/12` Allocate Short Directory Handle.
- `87/16` Scan Salvageable Files;
- `87/17` Recover Salvageable File;
- `87/18` Purge Salvageable File;
- `87/20` Search for File or Subdirectory Set;
- `87/21` Get Path String from Short Directory Handle;
- `87/22` Generate Directory Base and Volume Number;
- `87/24` Get Name Spaces Loaded List from Volume Number;
- `87/26` Get Huge NS Information;
- `87/28` Get Full Path String;
- `87/29` Get Effective Directory Rights.
The next endpoint block can continue with the later Name Space subset starting
at `87/16` salvage/metadata calls, or choose another unaudited top-level family
such as AFP `0x2222/35`, packet burst `0x2222/97`/`101`, or deeper
`0x2222/23` bindery/property/admin subfunction coverage, unless the user
requests a specific family first.
New disabled source stubs were added for eligible 3.x/4.x metadata gaps that
were missing from the active switch range:
The next patch number should be `0210` if `0209` was applied.
- `87/19` Get NS Information;
- `87/23` Query NS Information Format;
- `87/25` Set NS Information;
- `87/27` Get Name Space Directory Entry.
These stubs are under `#if 0`, document selector path/request/reply/provider
intent, and do not change runtime behavior. The existing `87/26` source slot is
still effectively unimplemented and returns the default `0xfb` completion.
The next endpoint block can continue with the next implemented `87` namespace
subfunction range, the matching `89` long-name-space family, or another
unaudited top-level family such as AFP `0x2222/35`, packet burst
`0x2222/97`/`101`, or deeper `0x2222/23` bindery/property/admin subfunction
coverage, unless the user requests a specific family first.
The next patch number should be `0211` if `0210` was applied.
Retro source-stub checkpoint from patch 0207:

35
TODO.md
View File

@@ -1065,9 +1065,38 @@ Current status:
Follow-up:
- Continue the `0x2222/87` audit with the later salvage/metadata/namespace
subfunctions, starting at `87/16`. Keep the comments per endpoint rather than
adding a large pre-block checklist.
- Continue the `0x2222/87` audit after the later salvage/metadata subset. Keep
the comments per endpoint rather than adding a large pre-block checklist.
### Name Space group 0x2222/87 salvage and metadata subset
Current status:
- `NCP 0x2222/87` / wire `0x57` is endpoint-audited for the later
salvage/metadata/namespace subfunctions `87/16` through `87/29` that are
present in the current source range.
- Active source cases are documented inline for `87/16` Scan Salvageable Files,
`87/17` Recover Salvageable File, `87/18` Purge Salvageable File, `87/20`
Search for File or Subdirectory Set, `87/21` Get Path String from Short
Directory Handle, `87/22` Generate Directory Base and Volume Number, `87/24`
Get Name Spaces Loaded List from Volume Number, `87/26` Get Huge NS
Information, `87/28` Get Full Path String, and `87/29` Get Effective Directory
Rights.
- Disabled source stubs were added for eligible 3.x/4.x metadata gaps that were
not active in the source: `87/19` Get NS Information, `87/23` Query NS
Information Format, `87/25` Set NS Information, and `87/27` Get Name Space
Directory Entry. These stubs are documentation-only and do not change runtime
behavior.
- `87/26` already had a source slot, but it is effectively unimplemented and
still returns the default `0xfb` unknown request completion.
Follow-up:
- Continue the namespace audit with the next implemented `87` subfunction range
or the matching `89` long-name-space family. Keep future missing 1.x/2.x/3.x
and planned 4.x endpoints as disabled source stubs at the correct selector
location, not as prose-only notes.
### Retrospective source-stub coverage for already audited blocks

View File

@@ -3313,7 +3313,17 @@ static int code = 0;
}
break;
case 0x10 : /* 87/16 Scan Salvageable Files */
case 0x10 : /* SDK 87/16 Scan Salvageable Files.
* Coverage: present.
* Request: SubFunction, NameSpace, reserved,
* SearchAttributes, ReturnInfoMask, ScanSequence,
* NWHandlePathStruct and path components.
* Reply: NextScanSequence, deleted time/date, deletor ID,
* volume/base IDs, then namespace information selected by
* ReturnInfoMask. Current code uses MARS-NWE salvage
* sidecar metadata and validates the path structure before
* scanning.
*/
{
uint8 *q = p - 1;
int req_namespace;
@@ -3399,7 +3409,15 @@ static int code = 0;
}
break;
case 0x11 : /* 87/17 Recover Salvageable File */
case 0x11 : /* SDK 87/17 Recover Salvageable File.
* Coverage: present.
* Request: SubFunction, NameSpace, reserved, ScanSequence,
* VolumeNumber, DirectoryBase, and a new filename.
* Reply: no payload, normal Completion response.
* Difference: current code recovers using the trusted
* salvage sidecar's original name instead of the supplied
* new filename.
*/
{
uint8 *q = p - 1;
int req_namespace;
@@ -3461,7 +3479,14 @@ static int code = 0;
}
break;
case 0x12 : /* 87/18 Purge Salvageable File */
case 0x12 : /* SDK 87/18 Purge Salvageable File.
* Coverage: present.
* Request: SubFunction, NameSpace, reserved, ScanSequence,
* VolumeNumber, and DirectoryBase.
* Reply: no payload, normal Completion response.
* Current code purges the matching MARS-NWE salvage sidecar
* entry from the target directory base.
*/
{
uint8 *q = p - 1;
int req_namespace;
@@ -3511,7 +3536,31 @@ static int code = 0;
}
break;
case 0x14 : /* Search for File or Subdir Set */
#if 0
case 0x13 : /* SDK 87/19 Get NS Information.
* Missing source slot for a 3.x/4.x namespace metadata
* endpoint.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* VolumeNumber, DirectoryBase and NSInfoBitMask.
* Reply: namespace-specific information selected by
* NSInfoBitMask.
* Future owner: filesystem/namespace provider.
*/
break;
#endif
case 0x14 : /* SDK 87/20 Search for File or Subdirectory Set.
* Coverage: present.
* Request: SubFunction, NameSpace, DataStream/reserved,
* SearchAttributes, ReturnInfoMask, requested Count,
* Volume, BaseHandle, SearchSequence, SearchPatternLen,
* SearchPattern.
* Reply: Volume, BaseHandle, NextSearchSequence,
* MoreEntriesFlag, Count, then Count namespace information
* structures.
* Difference: current helper uses the same namespace as
* DataStream and delegates to nw_search_file_dir().
*/
/* SIMPLE IMPLEMENTATION, needs more work !!!! */
{
struct OUTPUT {
@@ -3550,7 +3599,13 @@ static int code = 0;
}
break;
case 0x15 : /* Get Path String from short dir new */
case 0x15 : /* SDK 87/21 Get Path String from Short Directory Handle.
* Coverage: present.
* Request: SubFunction, NameSpace, ShortDirectoryHandle.
* Reply: PathLen followed by path bytes.
* Current code maps the short handle through
* nw_get_directory_path().
*/
{
int dir_handle=(int) *(p+1);
result=nw_get_directory_path(dir_handle, responsedata+1, 256);
@@ -3561,7 +3616,14 @@ static int code = 0;
}
break;
case 0x16 : /* Generate Dir BASE and VolNumber */
case 0x16 : /* SDK 87/22 Generate Directory Base and Volume Number.
* Coverage: present.
* Request: SubFunction, NameSpace, DstNameSpace/dstNSIndicator,
* reserved/flags, then NWHandlePathStruct.
* Reply: namespace directory base, DOS directory base, and
* VolumeNumber.
* Current code delegates to nw_generate_dir_path().
*/
{
NW_HPATH *nwpathstruct = (NW_HPATH *) (p+4);
struct OUTPUT {
@@ -3578,7 +3640,26 @@ static int code = 0;
}
break;
case 0x18 : /* Get Name Spaces Loaded */
#if 0
case 0x17 : /* SDK 87/23 Query NS Information Format.
* Missing source slot for a 3.x/4.x namespace metadata
* endpoint.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* VolumeNumber and NSInfoBitMask.
* Reply: format description for the selected namespace
* information bits.
* Future owner: filesystem/namespace provider.
*/
break;
#endif
case 0x18 : /* SDK 87/24 Get Name Spaces Loaded List from Volume Number.
* Coverage: present.
* Request: SubFunction, NameSpace/reserved, VolumeNumber.
* Reply: CountOfNameSpaces (Lo-Hi) and NameSpaceList.
* Current code reports configured DOS/OS2/NFS namespace
* support for the target volume.
*/
{
int volume=*(p+2);
struct OUTPUT {
@@ -3603,13 +3684,52 @@ static int code = 0;
}
break;
case 0x1a : /* Get Huge NS Info new*/
#if 0
case 0x19 : /* SDK 87/25 Set NS Information.
* Missing source slot for a 3.x/4.x namespace metadata
* endpoint.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* VolumeNumber, DirectoryBase, NSInfoBitMask and
* namespace-specific information.
* Reply: no payload, normal Completion response.
* Future owner: filesystem/namespace provider.
*/
break;
#endif
case 0x1a : /* SDK 87/26 Get Huge NS Information.
* Coverage: source slot present but not implemented.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* VolumeNumber, DirectoryBase, NSInfoBitMask and HugeState.
* Reply: huge namespace information selected by bit mask.
* Current code falls through with the default 0xfb result.
*/
{
}
break;
case 0x1c : /* GetFullPathString new*/
#if 0
case 0x1b : /* SDK 87/27 Get Name Space Directory Entry.
* Missing source slot for a 3.x/4.x namespace metadata
* endpoint.
* Request: SubFunction, NameSpace, VolumeNumber,
* DirectoryBase and NSInfoBitMask.
* Reply: namespace directory-entry information selected
* by NSInfoBitMask.
* Future owner: filesystem/namespace provider.
*/
break;
#endif
case 0x1c : /* SDK 87/28 Get Full Path String.
* Coverage: present.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* CookieFlags, Cookie1, Cookie2, then NWHandlePathStruct.
* Reply: updated cookies, path size, component count and
* component path data.
* Current code delegates to nw_get_full_path_cookies().
*/
{ /* nw32 client needs it */
/* SIMPLE IMPLEMENTATION, needs more work !!!! */
int destnamspace = (int)*(p+1);
@@ -3640,7 +3760,13 @@ static int code = 0;
}
break;
case 0x1d : /* GetEffDirRights new */
case 0x1d : /* SDK 87/29 Get Effective Directory Rights.
* Coverage: present.
* Request: SubFunction, SrcNameSpace, DstNameSpace,
* SearchAttributes, ReturnInfoMask, NWHandlePathStruct.
* Reply: rights information selected by ReturnInfoMask.
* Current code delegates to nsp_get_eff_rights().
*/
{
int destnamspace = (int) *(p+1);
int searchattrib = (int) GET_16(p+2); /* LOW-HI */