Commit Graph

12 Commits

Author SHA1 Message Date
Mario Fetka
3421fceda3 nwconn: document TTS unavailable status
All checks were successful
Source release / source-package (push) Successful in 50s
Add WebSDK context to the Transaction Tracking System endpoint handling.

The WebSDK documents NCP 0x2222/34/00 TTS Is Available as a
completion-code-only status probe with no reply data. A completion code of
0x00 means Transaction Tracking Unavailable, 0xfd means Disabled, and 0xff
means Available. The SDK headers expose this call as NWTTSIsAvailable().

MARS-NWE does not implement TTS rollback semantics, transaction files,
transaction status tracking, or the begin/end/abort transaction state machine.
Keep reporting the documented unavailable status for the availability probe,
but leave state-changing TTS subfunctions unsupported rather than pretending
to start or complete transactions without rollback behavior.

lwared and the Rust nwserver implementation do not provide a fuller TTS
transaction implementation to mirror, so keep the remaining TTS work tracked
as deferred optional protocol work in TODO.md.

This preserves existing protocol behavior while documenting why the only
locally handled TTS subfunction is the availability probe.
2026-05-30 00:59:54 +02:00
Mario Fetka
297bb192f8 nwconn: document object disk restriction fallback
All checks were successful
Source release / source-package (push) Successful in 53s
Add SDK context to NCP 0x16/0x29 Get Object Disk Usage And Restrictions while
keeping the existing QUOTA_SUPPORT split intact.

The WebSDK documents NCP 0x2222/22/41 as taking a Volume Number and a high-low
Object ID, and returning Restriction and In Use values in 4K blocks. A
restriction of 0x40000000 means that the object has no disk restriction, and
invalid object IDs return success with no restriction and no space used.

With QUOTA_SUPPORT enabled, MARS-NWE routes the call through nwbind so the
object ID can be mapped to a Unix uid before nw_get_vol_restrictions() queries
the quota backend. With quota support disabled, keep the local SDK-compatible
unrestricted/no-use fallback so hosts without quota support do not need the
quota backend.

Add the SDK request/reply semantics to the inline endpoint comment and track
direct test coverage for both build modes in TODO.md.

This is documentation-only apart from renaming the debug message from DUMMY to
fallback, and preserves the build-time QUOTA_SUPPORT behavior.
2026-05-30 00:31:21 +02:00
Mario Fetka
c80861b92b nwconn: implement extracted base handle restore
All checks were successful
Source release / source-package (push) Successful in 54s
Wire NCP 0x16/0x17 Extract a Base Handle and NCP 0x16/0x18 Restore an
Extracted Base Handle to connection-local directory-handle state.

The WebSDK documents NCP 0x2222/22/23 as taking a DirectoryHandle and
returning a 14-byte save buffer composed of a 10-byte ServerNetworkAddress
plus a 4-byte HandleID. The same documentation describes NCP 0x2222/22/24 as
taking that saved ServerNetworkAddress/HandleID pair and returning a
NewDirectoryHandle plus AccessRightsMask.

The SDK headers expose these calls as NWSaveDirectoryHandle() and
NWRestoreDirectoryHandle(), with the save buffer explicitly documented as 14
bytes. The Rust nwserver and lwared references do not implement this older
save/restore pair, and newer clients typically use the normal allocate/set
directory-handle calls instead, so keep the MARS-NWE HandleID opaque and
connection-local rather than guessing a global NetWare directory-base number.

Store extracted base-handle IDs in a small per-connection table that records
the saved volume/path tuple. Extract requires a live permanent directory
handle, and Restore validates the saved server address against this server
before allocating a new permanent directory handle for the saved path.

Add the SDK request/reply semantics to the inline endpoint comments and remove
the corresponding TODO entry.

This enables the documented endpoint path while keeping the saved HandleID
conservative and private to MARS-NWE.
2026-05-30 00:12:31 +02:00
Mario Fetka
701e33e0ce docs: update endpoint follow-up tracking
All checks were successful
Source release / source-package (push) Successful in 46s
Update TODO.md after the recently enabled synchronization and extended volume
information endpoints.

The file/logical-record/physical-record synchronization entries no longer need
to list NCP 0x04, 0x0c, and 0x1f as disabled or dummy endpoints. Keep the
remaining work focused on requester/NWTESTS coverage plus timeout and
error-code verification for set-oriented locking calls.

Also track follow-up work for fields that are currently returned as zero by
Get Extended Volume Information because MARS-NWE does not yet model them. The
endpoint now returns the documented NWVolExtendedInfo reply, but NetWare-
specific counters such as suballocation, deleted-file/limbo, compression,
migration, EA, Directory Services, and timestamp fields should only be filled
once reliable backing filesystem or MARS-NWE metadata is available.

This is documentation-only and does not change NCP behavior.
2026-05-29 23:46:20 +02:00
Mario Fetka
f78ae0fb2a nwconn: implement Get Extended Volume Information
All checks were successful
Source release / source-package (push) Successful in 48s
Wire NCP 0x16/0x33 Get Extended Volume Information to a real reply instead of
returning 0xfb.

The WebSDK documents NCP 0x2222/22/51 as taking a VolumeNumber and returning a
low-high VolInfoReplyLen, an NWVolExtendedInfo structure, and a
length-prefixed volume name. The SDK headers define NWVolExtendedInfo as 33
32-bit fields covering volume type, status flags, sector and cluster geometry,
free-space counters, suballocation/limbo/compression/migration counters,
directory counters, EA counters, a Directory Services object id, and a
last-modified timestamp.

Map the Unix filesystem data already used by the older volume-information
calls to the core extended-volume fields: report a NetWare 386 v3.1 style
volume type, 512-byte sectors, 8 sectors per cluster, total/free clusters, and
directory-entry counters derived from fs_usage. Report NetWare-specific
suballocation, limbo, compression, migration, EA, Directory Services, and
timestamp fields as zero for now.

Add the SDK request/reply semantics to the inline endpoint comment and remove
the corresponding TODO entry.

This enables the documented endpoint path while keeping the mapping
conservative; fields MARS-NWE cannot currently model remain zero rather than
guessed.
2026-05-29 23:34:55 +02:00
Mario Fetka
bcf58e3b0a nwconn: enable Physical Record Set calls
All checks were successful
Source release / source-package (push) Successful in 47s
Wire the physical-record set endpoints to the shared synchronization-set
handler.

The Novell SDK documents NCP 0x2222/27 Lock Physical Record Set (old) and NCP
0x2222/110 Lock Physical Record Set as locking all byte ranges logged by the
calling client. The request carries a one-byte Lock Flag plus a 2-byte Lock
Timeout in 1/18 second units. Bit 1 of the Lock Flag selects shareable/read-only
locking; otherwise the set is locked exclusive/read-write.

The SDK documents NCP 0x2222/29 Release Physical Record Set as releasing all
locked byte ranges while leaving them in the client data byte range table, and
NCP 0x2222/31 Clear Physical Record Set as releasing all locked ranges and
clearing that table. The set calls return no reply data and report success,
timeout, or lock errors through the completion code.

Maintain the physical-record set table from the individual Log/Release/Clear
Physical Record path: successful 0x1a calls add the range, 0x1c leaves it
logged, and 0x1e removes the matching range after a successful unlock. Then
route 0x1b/0x6e, 0x1d, and 0x1f through share_handle_lock_sets() with type 4.

Remove the old Clear Physical Record Set dummy and the corresponding TODO
entry.

This enables the documented endpoint paths; timeout handling remains limited to
the existing underlying share implementation.
2026-05-29 23:21:32 +02:00
Mario Fetka
4e5573c992 nwconn: enable Lock File Set
All checks were successful
Source release / source-package (push) Successful in 47s
Wire NCP 0x04 Lock File Set and NCP 0x6a Lock File Set to the existing
file-set lock path.

The Novell SDK documents NCP 0x2222/04 as the old Lock File Set call and NCP
0x2222/106 as its replacement. Both calls lock all files logged by the calling
client's current task. The request carries a 2-byte Lock Timeout in 1/18
second units, the reply carries no data, and completion reports success,
timeout, or lock error.

MARS-NWE already records file-set members through Log File and already routes
Release File Set and Clear File Set through share_handle_lock_sets(). Use the
same set handler for Lock File Set with lock_flag 0 so the handler locks the
logged entries using each entry's recorded lock directive, defaulting to
exclusive when no directive was logged.

Enable the previously disabled old endpoint, add support for the SDK
replacement endpoint, add the SDK request/reply semantics to the inline
endpoint comment, and remove the corresponding TODO entry.

This enables the documented endpoint path; timeout handling remains limited to
the existing underlying share implementation.
2026-05-29 22:55:14 +02:00
Mario Fetka
215e0d02b4 nwconn: enable Release Logical Record
All checks were successful
Source release / source-package (push) Successful in 47s
Wire NCP 0x0c Release Logical Record to the existing logical-record release
path.

The Novell SDK documents NCP 0x2222/12 as releasing one synchronization string
held by the calling client without removing it from the client's
synchronization string table. The string remains logged and may be relocked by
a later Lock Logical Record Set call.

The handler already distinguished this from NCP 0x0b Clear Logical Record:
0x0b uses lock_flag -2 to unlock and unlog the record, while 0x0c uses
lock_flag -1 to unlock only.

Enable the previously disabled case label, add the SDK request/reply semantics
to the inline endpoint comment, and remove the corresponding TODO entry.

This only enables the documented endpoint path; the underlying locking
implementation is unchanged.
2026-05-29 22:43:04 +02:00
Mario Fetka
44a309de40 nwserv: escape SAP names in debug logs
All checks were successful
Source release / source-package (push) Successful in 45s
SAP service names are fixed-size 48-byte fields and are not guaranteed to be
safe C strings in diagnostics.  Some NetWare 6.5 SAP service types advertise
non-printable or high-bit bytes in the name field, which made the debug log
hard to read and could run past the intended protocol field if logged with a
plain %s.

Add bounded formatting for SAP names used in debug output.  Stop at NUL within
the fixed field, keep printable ASCII unchanged, and escape other bytes as
\\xNN.

This is logging-only and does not change SAP/RIP protocol behavior.
2026-05-29 21:51:57 +02:00
Mario Fetka
ae4cb39790 docs: annotate remaining NCP endpoint stubs
All checks were successful
Source release / source-package (push) Successful in 50s
Add SDK/protocol context comments for the remaining known nwconn.c endpoint
stubs and partial implementations.

Document the intended behavior and follow-up work for Lock File Set, Release
Logical Record, Restore Directory Handle, Get Extended Volume Information, and
Clear Physical Record Set. Also add matching TODO.md entries so these
compatibility gaps are tracked outside inline source comments.

This is documentation-only and does not change NCP behavior.
2026-05-29 20:39:48 +02:00
Mario Fetka
b4fbfa6a8a docs: update packet burst TODO status
All checks were successful
Source release / source-package (push) Successful in 47s
Packet Burst is no longer merely optional follow-up work for DOS tool
compatibility.

A diagnostics-enabled DOS client run verified real Packet Burst negotiation
and READ/WRITE data-path usage, and ENABLE_BURSTMODE now defaults to ON at
build time while runtime use remains controlled by nwserv.conf.

Keep Packet Burst/NDS fragmentation listed as deferred optional work.
2026-05-29 20:20:26 +02:00
Mario Fetka
f10a81566d docs: add TODO tracking file
All checks were successful
Source release / source-package (push) Successful in 46s
Add a top-level TODO.md for follow-up work that should not remain as scattered
inline source comments.

Document the current Check Console Privileges limitation, where console rights
are mapped to supervisor equivalence for now, and track the need for a real
console privilege map. Also record follow-ups for queue spool path case
handling, direct NCP 17/4c test coverage, Q_UNIX_PRINT backend improvements,
and deferred optional protocol work.

Reference TODO.md from the main README.
2026-05-29 18:51:37 +02:00