docs: document ncp23 console management layouts
This commit is contained in:
43
TODO.md
43
TODO.md
@@ -581,6 +581,21 @@ Current status:
|
||||
- SDK `23/133` / wire `0x85` Change To Client Rights -- disabled future stub
|
||||
- SDK `23/134` / wire `0x86` Read Queue Server Current Status -- disabled future stub
|
||||
- SDK `23/135` / wire `0x87` Get Queue Job File Size
|
||||
- SDK `23/200` / wire `0xc8` Check Console Privileges
|
||||
- SDK `23/201` / wire `0xc9` Get File Server Description Strings
|
||||
- SDK `23/202` / wire `0xca` Set File Server Date And Time -- disabled future stub
|
||||
- SDK `23/203` / wire `0xcb` Disable File Server Login -- disabled future stub
|
||||
- SDK `23/204` / wire `0xcc` Enable File Server Login -- disabled future stub
|
||||
- SDK `23/205` / wire `0xcd` Get File Server Login Status
|
||||
- SDK `23/207` / wire `0xcf` Disable Transaction Tracking -- disabled future stub
|
||||
- SDK `23/208` / wire `0xd0` Enable Transaction Tracking -- disabled future stub
|
||||
- SDK `23/209` / wire `0xd1` Send Console Broadcast (old)
|
||||
- SDK `23/210` / wire `0xd2` Clear Connection Number (old)
|
||||
- SDK `23/211` / wire `0xd3` Down File Server
|
||||
- SDK `23/232` / wire `0xe8` Get File Server Misc Information -- disabled future stub
|
||||
- SDK `23/235` / wire `0xeb` Get Connection's Open Files -- disabled future stub
|
||||
- SDK `23/253` / wire `0xfd` Send Console Broadcast -- disabled future stub
|
||||
- SDK `23/254` / wire `0xfe` Clear Connection Number -- disabled future stub
|
||||
- SDK `23/15` request payload offsets match the current parser:
|
||||
`LastSearchIndex`, `DirectoryHandle`, `SearchAttributes`, `FileNameLen`,
|
||||
and `FileName`. The reply shape also matches the documented fixed file
|
||||
@@ -646,6 +661,17 @@ Current status:
|
||||
implicit: job-position reorder, queue-server identity switch/restore, the
|
||||
per-server 64-byte status record, and newer long-priority/client-rights forms.
|
||||
|
||||
- Console/server-management calls SDK `23/200` through SDK `23/211`, plus
|
||||
SDK `23/232`, SDK `23/235`, SDK `23/253`, and SDK `23/254`, were compared
|
||||
against the NDK/Core-Protocols PDF and server/connection/message include
|
||||
prototypes (`nwserver.h`, `nwconnec.h`, `nwmsg.h`, and NLM `nwenvrn.h`).
|
||||
Implemented calls now carry inline layout notes in `src/nwbind.c`: console
|
||||
privilege check, description strings, login status, old console broadcast,
|
||||
old clear connection, and down server. Missing or non-modelled management
|
||||
calls are documented as disabled future stubs: set server date/time, enable
|
||||
and disable logins, enable and disable TTS, misc server information, open-file
|
||||
enumeration, new 32-bit console broadcast, and new 32-bit clear connection.
|
||||
|
||||
Follow-up:
|
||||
|
||||
- Verify SDK `23/15` search-index byte order against a real old requester or
|
||||
@@ -681,6 +707,23 @@ Follow-up:
|
||||
Rights, SDK `23/118` / wire `0x76` and SDK `23/134` / wire `0x86` Read Queue
|
||||
Server Current Status, SDK `23/119` / wire `0x77` Set Queue Server Current
|
||||
Status, and SDK `23/130` / wire `0x82` Change Job Priority.
|
||||
- SDK `23/205` / wire `0xcd` Get File Server Login Status currently returns a
|
||||
one-byte enabled flag. The PDF documents a long `UserLoginAllowed` reply,
|
||||
while the CLIB/WebSDK prototype exposes a byte flag; verify expected wire
|
||||
length with a real client before changing the compatibility reply.
|
||||
- SDK `23/209` / wire `0xd1` Send Console Broadcast (old) is parsed as the old
|
||||
byte station-list form. The PDF table labels `StationList` as long[], but
|
||||
its own `SubFuncStrucLen = 3 + NumberOfStations + MessageLen` formula matches
|
||||
the byte-list parser; keep the newer 32-bit list in SDK `23/253` / wire
|
||||
`0xfd` separate.
|
||||
- SDK `23/211` / wire `0xd3` Down File Server currently ignores the documented
|
||||
ForceFlag and always calls the local server-down path after supervisor-rights
|
||||
validation. Verify whether a non-forced request should fail when active files
|
||||
are open before changing behavior.
|
||||
- Implement or deliberately hard-fail the disabled management future stubs once
|
||||
the corresponding server state exists: SDK `23/202`, SDK `23/203`, SDK
|
||||
`23/204`, SDK `23/207`, SDK `23/208`, SDK `23/232`, SDK `23/235`, SDK
|
||||
`23/253`, and SDK `23/254`.
|
||||
- Audit the remaining forwarded `0x2222/23` management subfunctions in the files
|
||||
that actually handle them instead of treating the `nwconn.c` forwarding points
|
||||
as complete local implementations.
|
||||
|
||||
100
src/nwbind.c
100
src/nwbind.c
@@ -2738,9 +2738,11 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0xc8 : { /* Check Console Privileges */
|
||||
/*
|
||||
* NCP 23/200 has no reply data. It succeeds when the
|
||||
* connection has console operator privileges and returns
|
||||
* 0xc6 (No Console Rights) otherwise.
|
||||
* SDK 23/200 / wire 0xc8 Check Console Privileges.
|
||||
* Request payload after SubFunctionCode: none.
|
||||
* Reply: no data.
|
||||
* Completion: 0x00 if the connection has console
|
||||
* operator privileges, otherwise 0xc6 No Console Rights.
|
||||
*/
|
||||
if (has_console_privileges(act_c)) {
|
||||
XDPRINTF((2, 0, "Check Console Privileges user=0x%x result=0x0",
|
||||
@@ -2753,6 +2755,14 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0xc9 : { /* GET FILE SERVER DESCRIPTION STRINGs */
|
||||
/*
|
||||
* SDK 23/201 / wire 0xc9 Get File Server Description
|
||||
* Strings.
|
||||
* Request payload after SubFunctionCode: none.
|
||||
* Reply: up to 512 bytes of NUL-terminated description
|
||||
* strings: company, revision, revision date, copyright,
|
||||
* followed by any implementation-specific tail strings.
|
||||
*/
|
||||
char *company = "www.disconnected-by-peer.at";
|
||||
char *revision = "Mars NWE %d.%d.pl%d";
|
||||
char *revision_date = MARS_NWE_BUILD_DATE;
|
||||
@@ -2774,6 +2784,14 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0xcd : { /* GET FILE SERVER LOGIN STATUS */
|
||||
/*
|
||||
* SDK 23/205 / wire 0xcd Get File Server Login Status.
|
||||
* Request payload after SubFunctionCode: none.
|
||||
* Reply: UserLoginAllowed. The PDF documents this as a
|
||||
* long value, while the CLIB/WebSDK wrapper exposes a
|
||||
* byte-sized login-enabled flag and the current reply keeps
|
||||
* that one-byte compatibility shape.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 login_allowed; /* 0 NO , 1 YES */
|
||||
} *xdata = (struct XDATA*) responsedata;
|
||||
@@ -2784,6 +2802,18 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0xd1 : /* Send Console Broadcast (old) */
|
||||
{
|
||||
/*
|
||||
* SDK 23/209 / wire 0xd1 Send Console Broadcast (old).
|
||||
* Request payload after SubFunctionCode:
|
||||
* byte NumberOfStations
|
||||
* byte StationList[NumberOfStations]
|
||||
* byte MessageLen
|
||||
* byte BroadcastMessage[MessageLen]
|
||||
* The PDF table labels StationList as long[], but its
|
||||
* SubFuncStrucLen formula is the old byte-list form and
|
||||
* matches this parser. New SDK 23/253 / wire 0xfd uses
|
||||
* 32-bit connection numbers and is not enabled here.
|
||||
*/
|
||||
uint8 *p = rdata;
|
||||
int count_conns = (int) *p++;
|
||||
uint8 *co = p;
|
||||
@@ -2812,6 +2842,15 @@ static void handle_fxx(int gelen, int func)
|
||||
break;
|
||||
|
||||
case 0xd2 : { /* Clear Connection Number (M@K) */
|
||||
/*
|
||||
* SDK 23/210 / wire 0xd2 Clear Connection Number
|
||||
* (old).
|
||||
* Request payload after SubFunctionCode:
|
||||
* byte ConnectionNumber
|
||||
* Reply: no data. SDK 23/254 / wire 0xfe uses a
|
||||
* long ConnectionNumber and is not implemented in this
|
||||
* dispatcher.
|
||||
*/
|
||||
/* 14-Jun-2003 by Marco Cavallini */
|
||||
uint8 conxnumber = *rdata - 1 ; // pointer to NCPREQUEST structure (receive aligned to 1 and we must align to 0)
|
||||
char buf[255] ;
|
||||
@@ -2831,6 +2870,14 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0xd3 : { /* down File Server */
|
||||
/*
|
||||
* SDK 23/211 / wire 0xd3 Down File Server.
|
||||
* Request payload after SubFunctionCode:
|
||||
* byte ForceFlag
|
||||
* Reply: no data. The documented ForceFlag is currently
|
||||
* ignored; supervisor rights are required and the local
|
||||
* server-down path is always requested on success.
|
||||
*/
|
||||
internal_act=1;
|
||||
if (HAVE_SU_RIGHTS(act_c->object_id)) { /* only SUPERVISOR */
|
||||
/* inform nwserv */
|
||||
@@ -2846,9 +2893,54 @@ static void handle_fxx(int gelen, int func)
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case 0xfd : /* Send Console Broadcast (new) */
|
||||
case 0xca : /* SDK 23/202 / wire 0xca Set File Server Date And Time */
|
||||
/*
|
||||
* Request payload after SubFunctionCode: year/month/day/
|
||||
* hour/minute/second bytes. Not wired to the MARS-NWE
|
||||
* server clock.
|
||||
*/
|
||||
return(-1);
|
||||
break;
|
||||
case 0xcb : /* SDK 23/203 / wire 0xcb Disable File Server Login */
|
||||
case 0xcc : /* SDK 23/204 / wire 0xcc Enable File Server Login */
|
||||
/*
|
||||
* Request payload after SubFunctionCode: none. These
|
||||
* require console operator privileges and toggle the server
|
||||
* login-enabled state that SDK 23/205 reports.
|
||||
*/
|
||||
return(-1);
|
||||
break;
|
||||
case 0xcf : /* SDK 23/207 / wire 0xcf Disable Transaction Tracking */
|
||||
case 0xd0 : /* SDK 23/208 / wire 0xd0 Enable Transaction Tracking */
|
||||
/*
|
||||
* Request payload after SubFunctionCode: none. TTS is not
|
||||
* modelled by the current compatibility backend.
|
||||
*/
|
||||
return(-1);
|
||||
break;
|
||||
case 0xe8 : /* SDK 23/232 / wire 0xe8 Get File Server Misc Information */
|
||||
case 0xeb : /* SDK 23/235 / wire 0xeb Get Connection's Open Files */
|
||||
/*
|
||||
* NetWare 2.x/3.x server-management information calls.
|
||||
* Keep disabled until their variable reply records are
|
||||
* mapped to real MARS-NWE state.
|
||||
*/
|
||||
return(-1);
|
||||
break;
|
||||
case 0xfd : /* SDK 23/253 / wire 0xfd Send Console Broadcast */
|
||||
/*
|
||||
* Newer variant of SDK 23/209: StationList is long[] and
|
||||
* SubFuncStrucLen = 3 + NumberOfStations * 4 + MessageLen.
|
||||
*/
|
||||
return(-1); /* nicht erkannt */
|
||||
break;
|
||||
case 0xfe : /* SDK 23/254 / wire 0xfe Clear Connection Number */
|
||||
/*
|
||||
* Newer variant of SDK 23/210: request carries a long
|
||||
* ConnectionNumber instead of the old byte value.
|
||||
*/
|
||||
return(-1);
|
||||
break;
|
||||
#endif
|
||||
default : completition = 0xfb; /* not known here */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user