Commit Graph

10 Commits

Author SHA1 Message Date
Mario Fetka
3740e1450c ncpapi: rename c32ncp files to NCP API names
Finish the c32ncp.c/c32ncp.h to ncpapi.c/ncpapi.h rename.

Update the build files, include directives, dependency tracking, header guard,
README references and file-level comments to use the new ncpapi naming. This
matches the current split where ncpapi contains the ncpXX_YY_* protocol API
wrappers and ncpcall contains the lower-level requester/transport helpers.

No behavior change.
2026-05-29 11:48:03 +02:00
Mario Fetka
7c1499a16c ncpapi: use protocol names for NCP wrapper functions
Rename the public NCP wrapper functions in c32ncp.c/c32ncp.h from c32_ncp*
implementation-oriented names to protocol-oriented ncpXX_YY_* names.

This prepares the code for a later c32ncp.c/c32ncp.h -> ncpapi.c/ncpapi.h
file rename while keeping the current file names unchanged for now. The new
names keep the NCP function/subfunction visible and describe the operation
performed by each wrapper.

Update all callers to use the new names. Transport-specific helpers such as
c32_get_ncp_handle() are left unchanged.

No behavior change.
2026-05-29 10:50:05 +02:00
Mario Fetka
fc91f3f274 tools: add shared NCP22 name helper
Move the common NCP22 DOS name buffer helper into tools.c and declare it in
net.h.

Replace the local copy/uppercase implementations in CREATOR, FLAG, FLAGDIR,
NDIR and NWTESTS with tool_copy_ncp22_name(). The helper keeps the existing
behavior: uppercase conversion, path separator rejection and the 1..12 byte
DOS name length limit.

NCOPY is intentionally left untouched while its NCP copy path remains under
investigation.
2026-05-29 09:26:28 +02:00
Mario Fetka
0362cc7810 tools: add shared endian helpers
Move common little-endian and big-endian buffer helpers into tools.c and
declare them in net.h.

Replace local duplicate implementations in FLAG, FLAGDIR and NDIR with the
shared helpers. This keeps the existing packet layouts unchanged while reducing
copy/paste code across the DOS utilities.

NCOPY and the experimental NCP copy code are intentionally left untouched for
now.
2026-05-29 09:19:22 +02:00
Mario Fetka
50524cf759 dosutils: add GPL-2 headers and file descriptions
Add GPL-2-or-later license headers to the DOS utility source files and
document the purpose and local dependencies of each C, header and assembler
file.

Preserve the original Martin Stover copyright attribution for the historic
MARS-NWE utility sources, including files that did not previously carry an
explicit header but are part of the original tool set. Add Mario Fetka as the
2026 copyright holder for the current maintenance work, and use Mario-only
headers for files without original Martin Stover ownership.

Also add a root-level COPYING file containing the GPL-2 license text.
2026-05-29 08:07:09 +02:00
Mario Fetka
4a952b4c4c dosutils: align Novell-compatible tests and stage NCOPY work
Update the DOS utilities and test suite with the current Novell comparison
state.

Validated/updated tool behavior:
- improve CREATOR output by showing Novell-style attribute and rights masks
- extend FLAGDIR handling with old NCP22 directory attribute read/write
  fallback paths
- expand NDIR Novell-style formatting, filtering, /SUB handling, date output,
  DI/RI attribute display and richer metadata collection
- adjust REVOKE output/grammar, recursive /SUBDIRECTORIES behavior and trustee
  update/delete paths to better match Novell tools
- adjust SLIST header/output behavior for logged-in and logged-out cases
- update README status to reflect the currently green/tested tools

Test-suite changes:
- add/refresh Novell comparison tests for CREATOR, NDIR, REVOKE and SLIST
- update NCOPY tests and collection scripts for the current investigation state
- refresh per-tool README files and top-level test documentation
- keep MAP documented as still separately open

NCOPY:
- add the current NCOPY implementation and experimental NCP74/server-side-copy
  scaffolding
- build ncopy.c so it stays compile-tested
- keep NCOPY disabled in the NET multicall dispatch for now because the
  server-side-copy/open-handle path is still unsafe and needs further analysis

Build:
- include ncopy.c in the DOS utility build
- drop the temporary MARS_DOSUTILS_VERSION define wiring from CMake
2026-05-29 07:40:04 +02:00
Mario Fetka
c50202e93b dosutils: factor shared helpers and update README
Move common DOS utility helper code into tools.c and expose it through
net.h.  This removes duplicated command-local helpers from GRANT,
RIGHTS, FLAG, FLAGDIR and the trustee helper layer.

The shared helpers cover case-insensitive argument comparison, help and
option detection, /FILES and /SUBDIRS parsing, current network directory
handle lookup, current volume prefix formatting, uppercase DOS path
copying, basename/header-path handling, wildcard detection and simple
path joining/splitting.

Keep the command frontends smaller and less coupled so the current
multicall utility can later be split into smaller grouped multicall
binaries, such as trustee tools, login/session tools and file/flag
tools.

Update the DOS utilities README for the newer Client32 and trustee
commands.  Document RIGHTS, GRANT, REVOKE and REMOVE in the status,
feature, command and install sections.  Add command reference entries
for the trustee tools, including Novell-style syntax, supported rights,
recursive/file options and missing-trustee behavior.

Also mention the shared trustee helper layer and common tools.c helpers
used by the newer command frontends.
2026-05-24 20:45:56 +02:00
Mario Fetka
fc97eb8d25 dosutils: add Novell-style paging to FLAG tools and SLIST
- add a shared DOS pager helper for long tool output
- page FLAG wildcard output with the Novell continue prompt
- fix FLAGDIR current-directory handling for "." and volume root
- add FLAGDIR wildcard directory listing support
- page FLAGDIR wildcard output like Novell FLAGDIR
- keep FLAGDIR display formatting aligned with Novell output
- make SLIST /CONTINUE enable continuous output
- keep SLIST bindery scanning compatible with ncpfs behavior
- preserve SLIST NET_ADDRESS display and default server marking
2026-05-24 15:51:38 +02:00
Mario Fetka
9ab65e2f00 dosutils: add RIGHTS and finish Novell-style display fixes
- add RIGHTS as a new multi-call DOS utility
- implement Client32 NCP87 effective-rights query helper
- map NCP effective-rights bits to Novell RIGHTS display order
- keep legacy directory-handle based rights lookup as fallback
- match Novell RIGHTS output for directories and files more closely
- remove hardcoded MARS/SYS and SYS display fallbacks from RIGHTS/FLAGDIR
- derive display prefixes from the active network drive where available
- adjust FLAGDIR output formatting to match Novell field alignment
- keep FLAG and SLIST unchanged after checking for hardcoded prefixes
2026-05-24 11:20:07 +02:00
Mario Fetka
83f8947ece Add Client32 NCP support for FLAG and FLAGDIR
Implement a working DOS Client32 NCP87 path using the NIOS resolver,
CONNOpenByReference and COMPATNcpRequestReply.

Add an initial FLAGDIR implementation for NetWare 386-style directory
attributes.  Support Normal, System, Hidden, Delete Inhibit, Purge and
Rename Inhibit, using the same Client32 NCP87 modify/read helpers.  Match
the Novell FLAGDIR display style more closely for simple mapped paths.

Also add/keep minimal TESTS coverage for the verified Client32 NCP87
attribute path.
2026-05-24 01:47:22 +02:00