Wire NCP 0x23/0x05 AFP Get File Information to a conservative read-only reply for SYS:-style paths. The WebSDK documents NCP 0x2222/35/05 as taking a Volume Number, AFP Entry ID, request bit map, and AFP path modifier string, and returning an AFP file information record with entry id, parent id, attributes, data and resource fork lengths, offspring count, NetWare dates, Finder Info, long and short names, owner id, access privileges, and ProDOS information. The SDK headers expose the same call as AFPGetFileInformation() and NWAFPGetFileInformation(), with the wire reply matching RECPKT_AFPFILEINFO. Resolve the supplied path through the existing mars_nwe path machinery, require the optional Netatalk/libatalk backend as for the entry-id probe, and fill the fields that can be derived safely from Unix stat data and the existing libatalk helpers. Finder Info and resource fork length are read through nwatalk when present; entry ids fall back to the existing stat-derived AFP id until persistent CNID/AppleDouble ids are implemented. Parent id and ProDOS-specific data remain zero for now. Add a Linux afp_file_info_smoke test using ncpfs/libncp so the new call can be exercised without an AppleTalk client. The test sends raw SYS:-style paths with directory handle 0, matching the verified AFP Entry ID smoke-test path. This implements only the read-only AFP file information query for path-based requests; entry-id-only lookup, persistent CNID mapping, and write-side AFP semantics remain future work.
Linux NCP smoke tests
This directory contains optional Linux-side integration tests for endpoints that are easier to exercise from a Unix host than from the DOS test utilities.
The tests use the ncpfs/libncp client library. They are not built by default because they require the host ncpfs development headers/library and a running NetWare-compatible server.
Build with:
cmake -DMARS_NWE_BUILD_LINUX_TESTS=ON ...
cmake --build . --target afp_entry_id_smoke
AFP Entry ID smoke test
afp_entry_id_smoke sends the WebSDK-documented NetWare AFP request:
NCP 0x2222/35/12 AFP Get Entry ID From Path Name
It uses libncp's NWRequestSimple() path, so it goes through the same client
transport stack as other Linux ncpfs utilities.
Example:
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
The test accepts NetWare-style VOL:PATH arguments. It logs in through
libncp, allocates a temporary directory handle for the volume root, and sends
only the relative path to AFP Get Entry ID From Path Name, matching the
WebSDK request layout of DirectoryHandle + Path String.
Useful smoke cases for a standard MARS-NWE SYS volume are:
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:SYSTEM
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:BURST
A successful reply prints the temporary directory handle, the relative request
path, and the returned 32-bit AFP Entry ID. Server-side diagnostics currently
mark stat-derived temporary IDs with fallback; that means the endpoint is
reachable, but persistent CNID/AppleDouble entry-id storage is still future
Mac-namespace work.
If the server was built without the optional Netatalk/libatalk backend, the endpoint is expected to return invalid namespace. To treat that as a successful negative smoke test, use:
./tests/linux/afp_entry_id_smoke --allow-invalid-namespace -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
For path-resolution negative tests, use --allow-invalid-path to accept the
expected 0x9c Invalid Path completion.