docs: document legacy direct NCP utility layouts
This commit is contained in:
9
TODO.md
9
TODO.md
@@ -123,6 +123,13 @@ Current status:
|
||||
Set` are implemented, but the SDK request contains a `LockFlag` byte that
|
||||
the current code does not read. This parser difference is documented inline
|
||||
but not changed yet.
|
||||
- `NCP 0x12 Get Volume Info with Number`, `NCP 0x13 Get Station Number`,
|
||||
`NCP 0x14 Get File Server Date And Time`, and the `NCP 0x15` message group
|
||||
handoff now have inline SDK request/reply layout documentation.
|
||||
- `NCP 0x13 Get Station Number` is documented by the SDK as a three-byte
|
||||
StationNumber reply; MARS-NWE currently returns only the low one-byte
|
||||
connection number. This parser/reply difference is documented inline but not
|
||||
changed yet.
|
||||
|
||||
Follow-up:
|
||||
|
||||
@@ -141,6 +148,8 @@ Follow-up:
|
||||
evidence is available.
|
||||
- Decide whether `0x0d` and `0x0e` should consume or ignore the documented
|
||||
`LockFlag` byte after direct requester evidence is available.
|
||||
- Verify whether the current one-byte `0x13` reply is required by old clients
|
||||
or whether the SDK three-byte StationNumber reply should be implemented.
|
||||
- Verify the implemented file/logical-record/physical-record calls against the
|
||||
Novell SDK request/reply layouts and a real DOS requester or direct test
|
||||
caller.
|
||||
|
||||
80
src/nwconn.c
80
src/nwconn.c
@@ -3082,6 +3082,29 @@ static int handle_ncp_serv(void)
|
||||
break;
|
||||
|
||||
case 0x12 : { /* Get Volume Info with Number */
|
||||
/*
|
||||
* NCP 0x2222/18 Get Volume Info with Number returns the legacy
|
||||
* NetWare 2.x/3.x volume-space summary for a numeric volume id.
|
||||
*
|
||||
* SDK request:
|
||||
*
|
||||
* byte VolumeNumber
|
||||
*
|
||||
* SDK reply:
|
||||
*
|
||||
* word SectorsPerCluster (Hi-Lo)
|
||||
* word TotalVolumeClusters (Hi-Lo)
|
||||
* word AvailableClusters (Hi-Lo)
|
||||
* word TotalDirectorySlots (Hi-Lo)
|
||||
* word AvailableDirectorySlots (Hi-Lo)
|
||||
* byte VolumeName[16]
|
||||
* word RemovableFlag (Hi-Lo)
|
||||
*
|
||||
* SDK completion: 0x00 success, 0x98 disk map error.
|
||||
*
|
||||
* MARS-NWE reads the one-byte VolumeNumber from requestdata[0]
|
||||
* and builds the documented fixed-size reply.
|
||||
*/
|
||||
int volume = (int)*requestdata;
|
||||
struct XDATA {
|
||||
uint8 sec_per_block[2];
|
||||
@@ -3119,11 +3142,22 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x13 : { /* Get Station Number */
|
||||
/*
|
||||
* This is the old one-byte connection number call used by
|
||||
* DOS requesters before the richer NCP 23 connection services.
|
||||
* The SDK describes the client-visible API as
|
||||
* NWGetConnectionNumber(); older low-level documentation names the
|
||||
* underlying simple NCP 0x13 "Get Station Number".
|
||||
* NCP 0x2222/19 Get Station Number returns the calling station's
|
||||
* legacy connection/station number.
|
||||
*
|
||||
* SDK request: no payload after FunctionCode (19).
|
||||
*
|
||||
* SDK reply:
|
||||
*
|
||||
* byte StationNumber[3]
|
||||
*
|
||||
* SDK completion: 0x00 success.
|
||||
*
|
||||
* MARS-NWE currently returns the low one-byte connection number only,
|
||||
* which matches the source's long-standing old-client compatibility
|
||||
* behaviour but is narrower than the three-byte SDK reply layout.
|
||||
* This documentation patch records that difference only; endpoint
|
||||
* behaviour is intentionally unchanged here.
|
||||
*/
|
||||
if (act_connection > 0 && act_connection < 256) {
|
||||
*responsedata=(uint8) act_connection;
|
||||
@@ -3136,7 +3170,27 @@ static int handle_ncp_serv(void)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x14 : { /* GET DATE und TIME */
|
||||
case 0x14 : { /* Get File Server Date And Time */
|
||||
/*
|
||||
* NCP 0x2222/20 Get File Server Date And Time returns the server
|
||||
* clock in the old fixed seven-byte format.
|
||||
*
|
||||
* SDK request: no payload after FunctionCode (20).
|
||||
*
|
||||
* SDK reply:
|
||||
*
|
||||
* byte Year (80..99 => 1980..1999, 100..179 => 2000..2079)
|
||||
* byte Month (1..12)
|
||||
* byte Day (1..31)
|
||||
* byte Hour (0..23)
|
||||
* byte Minute (0..59)
|
||||
* byte Second (0..59)
|
||||
* byte DayOfWeek (0 = Sunday)
|
||||
*
|
||||
* SDK completion: 0x00 success.
|
||||
*
|
||||
* MARS-NWE builds the documented seven-byte reply from localtime().
|
||||
*/
|
||||
struct SERVER_DATE {
|
||||
uint8 year;
|
||||
uint8 mon;
|
||||
@@ -3163,6 +3217,20 @@ static int handle_ncp_serv(void)
|
||||
break;
|
||||
|
||||
case 0x15 :
|
||||
/*
|
||||
* NCP 0x2222/21 is the Message NCP function group. The SDK routes
|
||||
* individual message calls through a nested SubFunctionCode, for
|
||||
* example old broadcast send/get calls and newer connection-message
|
||||
* control calls.
|
||||
*
|
||||
* SDK group request header:
|
||||
*
|
||||
* word SubFuncStrucLen (Hi-Lo)
|
||||
* byte SubFunctionCode
|
||||
* ... subfunction-specific payload
|
||||
*
|
||||
* This direct dispatcher deliberately leaves the group to nwbind.
|
||||
*/
|
||||
return(-1); /* nwbind must do this call */
|
||||
|
||||
case 0x16 : {
|
||||
|
||||
Reference in New Issue
Block a user