docs: document ncp23 basic environment layouts

This commit is contained in:
OAI
2026-06-01 22:32:16 +00:00
committed by Mario Fetka
parent a24cc2d3ef
commit d0d3e4a5c1
3 changed files with 184 additions and 5 deletions

View File

@@ -813,11 +813,65 @@ static void handle_fxx(int gelen, int func)
* and the final nwbind parser below.
*/
switch (ufunc) {
#if 0
case 0x00 : { /* SDK 23/00 / wire 0x00 Login User (old) */
/*
* NetWare 1.x/2.x legacy login shorthand for USER
* objects. SDK/PDF request payload after
* SubFunctionCode:
* byte UserNameLen
* byte UserName[UserNameLen]
* byte PasswordLen
* byte Password[PasswordLen]
* Not implemented here; keep as a documented future
* compatibility stub, not a NetWare-4-only endpoint.
*/
completition=0xfb;
}
break;
#endif
case 0x01 : { /* Change User Password OLD */
/*
* SDK 23/01 / wire 0x01 Change User Password (old).
* The current handler is a hard failure stub. The old
* PDF/WebSDK layout belongs to the NetWare 1.x/2.x
* compatibility bucket and should be filled in only when
* the legacy password-change semantics are implemented.
*/
completition=0xff;
}
break;
#if 0
case 0x02 : { /* SDK 23/02 / wire 0x02 Get User Connection List (old) */
/*
* SDK/PDF request payload after SubFunctionCode:
* byte UserNameLen
* byte UserName[UserNameLen]
* Reply: byte ListLen, then byte connection numbers.
* This earliest form is equivalent to the later object
* connection-list call for object type USER.
*/
completition=0xfb;
}
break;
#endif
#if 0
case 0x05 : { /* SDK 23/05 / wire 0x05 Get Station's Logged Info (old) */
/*
* NetWare 2.x compatibility call. Request payload after
* SubFunctionCode: byte TargetConnectionNumber.
* Reply is the fixed 258-byte legacy log record; the
* later SDK 23/22 and SDK 23/28 calls are implemented
* below as wire 0x16 and wire 0x1c.
*/
completition=0xfb;
}
break;
#endif
#if FUNC_17_02_IS_DEBUG
case 0x02 : { /* I hope this is call isn't used */
/* now missused as a debug switch :) */
@@ -836,6 +890,16 @@ static void handle_fxx(int gelen, int func)
#endif
case 0x0c : { /* Verify Serialization */
/*
* SDK 23/12 / wire 0x0c Verify Serialization.
* SDK/PDF request payload is documented as a 4-byte
* ServerSerialNumber (Lo-Hi). The PDF table has a
* known-looking inconsistency that prints
* SubFunctionCode (212) even though the endpoint title
* is 23/12; keep this bucketed by the decimal endpoint
* number and do not treat it as wire 0xd4.
* Current code is still a hard failure stub.
*/
completition=0xff;
}
break;
@@ -849,6 +913,16 @@ static void handle_fxx(int gelen, int func)
#endif
case 0x11 : { /* Get FileServer Info */
/*
* SDK 23/17 / wire 0x11 Get File Server Information.
* SDK/PDF request payload after SubFunctionCode is
* empty. The reply is the legacy server-info block: 48
* bytes server name, version/subversion, connection and
* volume counters, and feature-version bytes. Later
* PDF revisions name additional bytes after offset 76;
* this code returns the same fixed-size block but keeps
* those later fields inside the reserved tail.
*/
struct XDATA {
uint8 servername[48];
uint8 version; /* 2 or 3 */
@@ -915,6 +989,14 @@ static void handle_fxx(int gelen, int func)
break;
case 0x12 : { /* Get Network Serial Number */
/*
* SDK 23/18 / wire 0x12 Get Network Serial Number.
* SDK/PDF request payload is empty. The PDF describes
* ServerSerialNumber and ApplicationNumber as Lo-Hi,
* while the current reply writes both with BE helpers;
* keep that as an audit item until an old requester is
* tested.
*/
struct XDATA {
uint8 serial_number[4];
uint8 appl_number[2];
@@ -929,6 +1011,15 @@ static void handle_fxx(int gelen, int func)
case 0x13 : /* Get Connection Internet Address, old */
case 0x1a : { /* Get Connection Internet Address, new */
/*
* SDK 23/19 / wire 0x13 Get Internet Address (old):
* byte TargetConnection
* SDK 23/26 / wire 0x1a Get Internet Address:
* long TargetConnection (Lo-Hi)
* The old path reads the documented byte. The new path
* uses GET_32(), matching the documented Lo-Hi order, and
* appends ConnectionType=2 for NCP.
*/
int conn = (ufunc == 0x13)
? ((max_connections < 256)
? (int) *rdata
@@ -951,6 +1042,17 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x14 : { /* Login Objekt, unencrypted passwords */
/*
* SDK 23/20 / wire 0x14 Login Object.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ClientNameLen
* byte ClientName[ClientNameLen]
* byte PasswordLen
* byte Password[PasswordLen]
* Parser follows the documented layout and clears the
* plaintext password bytes after copying them.
*/
uint8 *p = rdata;
uint8 *p1 = p+3 + *(p+2); /* here is password */
int result;
@@ -1002,6 +1104,14 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x15 : { /* Get Object Connection List (old) */
/*
* SDK 23/21 / wire 0x15 Get Object Connection List (old).
* Request payload: ObjectType (Hi-Lo), ObjectNameLen,
* ObjectName. The SDK/PDF old reply is byte ListLen plus
* connection-number entries; this implementation returns
* one byte per connection, matching the low-byte legacy
* form used by old clients.
*/
uint8 *p = rdata;
int result;
NETOBJ obj;
@@ -1029,6 +1139,15 @@ static void handle_fxx(int gelen, int func)
case 0x16 : /* Get Connection Info, old */
case 0x1c : { /* Get Connection Info, new ( > 255 connections) */
/*
* SDK 23/22 / wire 0x16 Get Station's Logged Info (old):
* byte TargetConnectionNumber
* SDK 23/28 / wire 0x1c Get Station's Logged Info:
* long TargetConnectionNum (Lo-Hi)
* The reply shape matches the documented user-id, type,
* name, login-time, and reserved-byte block. The new path
* reads the 32-bit connection with GET_32().
*/
struct XDATA {
uint8 object_id[4];
uint8 object_type[2];
@@ -1064,6 +1183,13 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x17 : { /* get crypt key */
/*
* SDK 23/23 / wire 0x17 Get Login Key.
* SDK/PDF request payload contains TargetConnection as a
* byte, but the current implementation ignores it and
* returns a freshly generated key for the active
* connection. Track that semantic difference in TODO.
*/
int k = sizeof(act_c->crypt_key);
uint8 *p = act_c->crypt_key;
uint8 *pp = responsedata;
@@ -1078,6 +1204,16 @@ static void handle_fxx(int gelen, int func)
break;
case 0x18 : { /* crypt_keyed LOGIN */
/*
* SDK 23/24 / wire 0x18 Keyed Object Login.
* Request payload after SubFunctionCode:
* byte Key[8]
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* Parser consumes the key first and then reads the
* documented object type/name fields.
*/
uint8 *p = rdata+sizeof(act_c->crypt_key);
NETOBJ obj;
int result;
@@ -1122,6 +1258,15 @@ static void handle_fxx(int gelen, int func)
case 0x1B : { /* Get Object Connection List */
/*
* SDK 23/27 / wire 0x1b Get Object Connection List.
* Request payload: SearchConnNumber (Lo-Hi), ObjectType
* (Hi-Lo), ObjectNameLen, ObjectName. Reply is byte
* ConnListLen plus connection numbers. The code reads
* SearchConnNumber with GET_BE32() but writes returned
* connection numbers with U16_TO_16(); verify both widths
* and byte order against an old requester before changing.
*/
uint8 *p = rdata;
int result;
NETOBJ obj;