Commit Graph

4 Commits

Author SHA1 Message Date
Mario Fetka
8e885bb16d nwconn: implement AFP 2.0 Get File Information
All checks were successful
Source release / source-package (push) Successful in 46s
Route NCP 0x23/0x0f AFP 2.0 Get File Information through the existing read-only AFP file-information helper.

The WebSDK and nwafp.h list both AFP Get File Information and AFP 2.0 Get File Information as path/file-information queries that return the AFP file-information record used by Mac namespace clients. The already implemented 0x05 path handles SYS:-style path requests and fills the safe read-only fields from Unix stat data plus the optional libatalk Finder Info and resource-fork helpers.

Use the same conservative path-backed reply for 0x0f for now. This gives Linux smoke-test coverage for the AFP 2.0 subfunction without adding entry-id-only lookup, persistent CNID mapping, write-side metadata updates, or fuller resource-fork semantics.

Extend afp_file_info_smoke with --afp20 so the same SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases can exercise the AFP 2.0 subfunction. Update the Linux test README and TODO tracking to record that AFP 2.0 file information is covered by the same temporary fallback model.

This implements only the read-only path-based subset; richer AFP 2.0 behavior remains future Mac-namespace work.
2026-05-30 08:05:46 +02:00
Mario Fetka
b3d06fbf3f tests: document AFP file information smoke coverage
All checks were successful
Source release / source-package (push) Successful in 47s
Document the Linux smoke-test coverage for the newly implemented AFP Get File Information endpoint.\n\nThe WebSDK-documented NCP 0x2222/35/05 path now has a Linux libncp smoke test alongside the existing AFP Entry ID probe. Record the verified SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases and describe the read-only reply fields currently populated from Unix stat data and the optional libatalk helper wrappers.\n\nAlso update the AFP Entry ID smoke-test documentation to match the current default raw-path mode, where SYS:-style paths are sent with directory handle 0 and handle allocation is kept behind --alloc-handle for separate debugging.\n\nKeep the remaining AFP/Mac namespace work in TODO.md, including persistent CNID/AppleDouble entry IDs, Parent ID mapping, Finder Info/resource-fork semantics, AFP 2.0 file information, and Scan File Information coverage.\n\nThis is documentation-only and does not change AFP protocol behavior.
2026-05-30 07:55:53 +02:00
Mario Fetka
f6861ba3d6 tests: document AFP entry id smoke coverage
All checks were successful
Source release / source-package (push) Successful in 45s
Document the Linux AFP Entry ID smoke-test coverage after the endpoint was verified against the standard SYS volume paths.

The test exercises the WebSDK-documented NCP 0x23/0x0c AFP Get Entry ID From Path Name request by logging in through libncp, allocating a temporary directory handle for the volume root, and sending the relative path to the AFP endpoint.

Record the verified SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases, and describe the current stat-derived fallback Entry ID diagnostics so the result is not confused with persistent CNID/AppleDouble storage.

Keep the remaining AFP work tracked in TODO.md, including replacing the fallback with persistent CNID/directory-id mapping and extending tests when additional AFP subfunctions are implemented.

This is documentation-only and does not change AFP protocol behavior.
2026-05-30 03:38:10 +02:00
Mario Fetka
b7999fcb7d tests: add Linux AFP entry id smoke test
All checks were successful
Source release / source-package (push) Successful in 46s
Add an optional Linux-side smoke test for the first implemented NetWare AFP endpoint.

The WebSDK documents NCP 0x2222/35/12 AFP Get Entry ID From Path Name as taking a NetWare directory handle and path string and returning a 32-bit AFP entry id. MARS-NWE now has a guarded implementation of that probe when the optional Netatalk/libatalk backend is compiled in, but exercising it does not require a real AppleTalk workstation.

Use the ncpfs/libncp client library as the test transport. ncpfs is commonly available on Linux mars_nwe test hosts and its NWRequestSimple() helper builds the same length-prefixed subfunction request format used by normal libncp callers. The test accepts standard ncpfs connection options such as -S, -U, -P, and -n, sends NCP 0x23/0x0c, and prints the returned entry id.

Keep the test out of normal builds behind MARS_NWE_BUILD_LINUX_TESTS because it depends on host ncpfs development headers/library and on a running server. Add an --allow-invalid-namespace mode so builds without the Netatalk backend can still run a negative smoke test and verify that AFP remains unavailable.

This adds test infrastructure only and does not change server protocol behavior.
2026-05-30 02:13:59 +02:00