docs: document core NCP 22 directory layouts
This commit is contained in:
105
src/nwconn.c
105
src/nwconn.c
@@ -3220,8 +3220,7 @@ static int handle_ncp_serv(void)
|
||||
/*
|
||||
* 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.
|
||||
* example the NetWare 3.x broadcast send/get and enable/disable calls.
|
||||
*
|
||||
* SDK group request header:
|
||||
*
|
||||
@@ -3241,6 +3240,28 @@ static int handle_ncp_serv(void)
|
||||
return(-1); /* nwbind must do this call */
|
||||
|
||||
case 0x16 : {
|
||||
/*
|
||||
* NCP 0x2222/22 is the old Directory Services function group.
|
||||
* These calls use the classic nested NCP 22 group header:
|
||||
*
|
||||
* requestdata[0..1] SubFuncStrucLen (Hi-Lo)
|
||||
* requestdata[2] SubFunctionCode
|
||||
* requestdata[3..] subfunction-specific payload
|
||||
*
|
||||
* The first NetWare 2.x/3.x-compatible directory calls are
|
||||
* documented by the SDK as:
|
||||
*
|
||||
* 22/00 Set Directory Handle
|
||||
* 22/01 Get Directory Path
|
||||
* 22/02 Scan Directory Information
|
||||
* 22/03 Get Effective Directory Rights
|
||||
* 22/04 Modify Maximum Rights Mask
|
||||
* 22/05 Get Volume Number
|
||||
* 22/06 Get Volume Name
|
||||
*
|
||||
* Layout notes below document the current parser; this patch does not
|
||||
* change wire behavior.
|
||||
*/
|
||||
/* uint8 len = *(requestdata+1); */
|
||||
uint8 *p = requestdata +2;
|
||||
|
||||
@@ -3248,6 +3269,22 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0 : {
|
||||
/******** SetDirektoryHandle *************/
|
||||
/*
|
||||
* NCP 0x2222/22/00 Set Directory Handle.
|
||||
*
|
||||
* SDK request payload after the group header:
|
||||
* byte TargetDirectoryHandle
|
||||
* byte SourceDirectoryHandle
|
||||
* byte DirectoryPathLen
|
||||
* byte DirectoryPath[DirectoryPathLen]
|
||||
*
|
||||
* The old PDF table repeats TargetDirectoryHandle for the
|
||||
* second byte, but the remarks and the mars_nwe parser use
|
||||
* it as SourceDirectoryHandle.
|
||||
*
|
||||
* Reply: completion code only; the target handle is remapped
|
||||
* to the requested source/path directory.
|
||||
*/
|
||||
struct INPUT {
|
||||
uint8 header[7]; /* Requestheader */
|
||||
uint8 div[3]; /* 0x0, dlen, ufunc */
|
||||
@@ -3267,6 +3304,16 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x1 : {
|
||||
/******** GetDirektoryPATH ***************/
|
||||
/*
|
||||
* NCP 0x2222/22/01 Get Directory Path.
|
||||
*
|
||||
* SDK request payload:
|
||||
* byte TargetDirectoryHandle
|
||||
*
|
||||
* SDK reply payload:
|
||||
* byte DirectoryPathLen
|
||||
* byte DirectoryPath[DirectoryPathLen]
|
||||
*/
|
||||
struct INPUT {
|
||||
uint8 header[7]; /* Requestheader */
|
||||
uint8 div[3]; /* 0x0, dlen, ufunc */
|
||||
@@ -3289,6 +3336,26 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x2 : { /* Scan Direktory Information */
|
||||
/******** Scan Dir Info ****************/
|
||||
/*
|
||||
* NCP 0x2222/22/02 Scan Directory Information.
|
||||
*
|
||||
* SDK request payload:
|
||||
* byte DirectoryHandle
|
||||
* word StartingSearchNumber (Hi-Lo)
|
||||
* byte DirectoryPathLen
|
||||
* byte DirectoryPath[DirectoryPathLen]
|
||||
*
|
||||
* SDK reply payload:
|
||||
* byte DirectoryPath[16]
|
||||
* word CreationDate (Hi-Lo)
|
||||
* word CreationTime (Hi-Lo)
|
||||
* long OwnerTrusteeID (Hi-Lo)
|
||||
* byte AccessRightsMask
|
||||
* byte Reserved
|
||||
* word NextSearchNumber (Hi-Lo)
|
||||
*
|
||||
* The current INPUT struct matches this old layout.
|
||||
*/
|
||||
struct INPUT {
|
||||
uint8 header[7]; /* Requestheader */
|
||||
uint8 div[3]; /* 0x0, dlen, ufunc */
|
||||
@@ -3322,6 +3389,17 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x3 : { /* Get Direktory Rights */
|
||||
/******** Get Eff Dir Rights ****************/
|
||||
/*
|
||||
* NCP 0x2222/22/03 Get Effective Directory Rights.
|
||||
*
|
||||
* SDK request payload:
|
||||
* byte DirectoryHandle
|
||||
* byte DirectoryPathLen
|
||||
* byte DirectoryPath[DirectoryPathLen]
|
||||
*
|
||||
* SDK reply payload:
|
||||
* byte EffectiveRightsMask
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 eff_right_mask; /* Effektive Right to Dir, old! */
|
||||
} *xdata = (struct XDATA*) responsedata;
|
||||
@@ -3365,6 +3443,16 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x5 : { /* Get Volume Number 0 .. 31 */
|
||||
/******** GetVolume Number ***************/
|
||||
/*
|
||||
* NCP 0x2222/22/05 Get Volume Number.
|
||||
*
|
||||
* SDK request payload:
|
||||
* byte VolumeNameLen
|
||||
* byte VolumeName[VolumeNameLen]
|
||||
*
|
||||
* SDK reply payload:
|
||||
* byte VolumeNumber
|
||||
*/
|
||||
/* p+1 = namelen */
|
||||
/* p+2 = data z.b 'SYS' */
|
||||
struct XDATA {
|
||||
@@ -3380,6 +3468,19 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x6 : { /* Get Volume Name from 0 .. 31 */
|
||||
/******** Get Volume Name ***************/
|
||||
/*
|
||||
* NCP 0x2222/22/06 Get Volume Name.
|
||||
*
|
||||
* SDK request payload:
|
||||
* byte VolumeNumber
|
||||
*
|
||||
* SDK reply payload:
|
||||
* byte VolumeNameLen
|
||||
* byte VolumeName[VolumeNameLen]
|
||||
*
|
||||
* The SDK allows a successful empty name for an unused but
|
||||
* potential volume slot.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 namelen;
|
||||
uint8 name[16];
|
||||
|
||||
Reference in New Issue
Block a user