docs: document ncp23 queue core layouts
All checks were successful
Source release / source-package (push) Successful in 51s
All checks were successful
Source release / source-package (push) Successful in 51s
This commit is contained in:
27
TODO.md
27
TODO.md
@@ -548,6 +548,20 @@ Current status:
|
||||
- SDK `23/74` / wire `0x4a` Keyed Verify Password
|
||||
- SDK `23/75` / wire `0x4b` Keyed Change Password
|
||||
- SDK `23/76` / wire `0x4c` List Relations Of An Object
|
||||
- SDK `23/100` / wire `0x64` Create Queue
|
||||
- SDK `23/101` / wire `0x65` Destroy Queue
|
||||
- SDK `23/102` / wire `0x66` Read Queue Current Status (old)
|
||||
- SDK `23/103` / wire `0x67` Set Queue Current Status (old)
|
||||
- SDK `23/104` / wire `0x68` Create Queue Job And File (old)
|
||||
- SDK `23/105` / wire `0x69` Close File And Start Queue Job (old)
|
||||
- SDK `23/106` / wire `0x6a` Remove Job From Queue (old)
|
||||
- SDK `23/107` / wire `0x6b` Get Queue Job List (old)
|
||||
- SDK `23/108` / wire `0x6c` Read Queue Job Entry (old)
|
||||
- SDK `23/121` / wire `0x79` Create Queue Job And File
|
||||
- SDK `23/122` / wire `0x7a` Read Queue Job Entry
|
||||
- SDK `23/126` / wire `0x7e` Set Queue Current Status
|
||||
- SDK `23/127` / wire `0x7f` Close File And Start Queue Job
|
||||
- SDK `23/128` / wire `0x80` Remove Job From Queue
|
||||
- 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
|
||||
@@ -592,6 +606,14 @@ Current status:
|
||||
transposed set-member table; the WebSDK/include API shape matches the
|
||||
existing ObjectName/OldPassword/NewPassword parser.
|
||||
|
||||
- Queue calls SDK `23/100` through SDK `23/108` and the paired newer
|
||||
variants SDK `23/121`, `23/122`, `23/126`, `23/127`, and `23/128` were
|
||||
compared against the NDK/Core-Protocols PDF and `nwqms.h`/WebSDK queue APIs.
|
||||
`src/nwconn.c` performs required prehandling for queue path rewriting,
|
||||
queue-job file creation, queue job entry file-handle insertion, and close/start
|
||||
file association before forwarding to `src/nwbind.c`. The target handlers in
|
||||
`nwbind.c` now carry the concrete request/reply layout notes.
|
||||
|
||||
Follow-up:
|
||||
|
||||
- Verify SDK `23/15` search-index byte order against a real old requester or
|
||||
@@ -613,6 +635,11 @@ Follow-up:
|
||||
- Implement or deliberately hard-fail SDK `23/63` / wire `0x3f` Verify
|
||||
Bindery Object Password; it is a NetWare 2.x/3.x compatibility call and is
|
||||
currently only a disabled documented stub.
|
||||
- Verify the shared queue handlers for newer queue calls that currently consume
|
||||
old 16-bit fields: SDK `23/122` / wire `0x7a`, SDK `23/126` / wire `0x7e`,
|
||||
SDK `23/127` / wire `0x7f`, and SDK `23/128` / wire `0x80` document long or
|
||||
Lo-Hi fields in the PDF, while the current compatibility parser often reuses
|
||||
the old 16-bit layout.
|
||||
- Audit the remaining forwarded `0x2222/23` queue and management subfunctions
|
||||
in the files that actually handle them instead of treating the `nwconn.c`
|
||||
forwarding points as complete local implementations.
|
||||
|
||||
107
src/nwbind.c
107
src/nwbind.c
@@ -2089,6 +2089,21 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x64 : { /* Create Queue, prehandled by nwconn */
|
||||
/*
|
||||
* SDK 23/100 / wire 0x64 Create Queue.
|
||||
* Request payload after SubFunctionCode:
|
||||
* word QueueType (Hi-Lo)
|
||||
* byte QueueNameLen
|
||||
* byte QueueName[QueueNameLen]
|
||||
* byte PathBase
|
||||
* byte PathLen
|
||||
* byte PathName[PathLen]
|
||||
* Reply: QueueID long (Hi-Lo).
|
||||
* Handoff comparison: nwconn.c resolves PathBase/PathName
|
||||
* to a full path, rewrites PathBase to 0, and forwards the
|
||||
* adjusted payload here. The parser then consumes the
|
||||
* documented QueueType/QueueName/full-path layout.
|
||||
*/
|
||||
int q_typ = GET_BE16(rdata);
|
||||
int q_name_len = *(rdata+2);
|
||||
uint8 *q_name = rdata+3;
|
||||
@@ -2110,6 +2125,13 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x65 : { /* Destroy Queue */
|
||||
/*
|
||||
* SDK 23/101 / wire 0x65 Destroy Queue.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* Reply: no data.
|
||||
* Parser comparison matches the documented layout.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
int result=-0xd3; /* no rights */
|
||||
if (act_c->id_flags&1)
|
||||
@@ -2119,6 +2141,20 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x66 : { /* Read Queue Current Status,old */
|
||||
/*
|
||||
* SDK 23/102 / wire 0x66 Read Queue Current Status (old).
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* Reply:
|
||||
* long QueueID (Hi-Lo)
|
||||
* byte QueueStatus
|
||||
* byte CurrentEntries
|
||||
* byte CurrentServers
|
||||
* long ServerIDList[CurrentServers] (Hi-Lo)
|
||||
* byte ServerStationList[CurrentServers]
|
||||
* Parser/reply comparison matches the documented old
|
||||
* queue-status layout.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 id[4];
|
||||
uint8 status;
|
||||
@@ -2159,6 +2195,19 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0x67 : /* Set Queue Current Status,old */
|
||||
case 0x7e : { /* Set Queue Current Status */
|
||||
/*
|
||||
* SDK 23/103 / wire 0x67 Set Queue Current Status (old)
|
||||
* and SDK 23/126 / wire 0x7e Set Queue Current Status.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* byte QueueStatus for old wire 0x67
|
||||
* long QueueStatus (Lo-Hi) for newer wire 0x7e
|
||||
* Reply: no data.
|
||||
* Parser comparison: the shared implementation currently
|
||||
* consumes only one status byte for both variants; keep as
|
||||
* compatibility behavior until a direct requester test
|
||||
* proves whether wire 0x7e needs the full long field.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
int status = *(rdata+4);
|
||||
int result =
|
||||
@@ -2173,6 +2222,17 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0x6A : /* Remove Job from Queue OLD */
|
||||
case 0x80 : { /* Remove Job from Queue NEW */
|
||||
/*
|
||||
* SDK 23/106 / wire 0x6a Remove Job From Queue (old)
|
||||
* and SDK 23/128 / wire 0x80 Remove Job From Queue.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* word JobNumber (Hi-Lo) for old wire 0x6a
|
||||
* long JobNumber (Lo-Hi) for newer wire 0x80
|
||||
* Reply: no data.
|
||||
* Parser comparison: both variants currently consume a
|
||||
* 16-bit JobNumber.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
uint32 job_id = (ufunc == 0x6A)
|
||||
? GET_BE16(rdata+4)
|
||||
@@ -2186,6 +2246,16 @@ static void handle_fxx(int gelen, int func)
|
||||
break;
|
||||
|
||||
case 0x6B : { /* Get Queue Job List, old */
|
||||
/*
|
||||
* SDK 23/107 / wire 0x6b Get Queue Job List (old).
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* Reply:
|
||||
* word JobCount (Hi-Lo)
|
||||
* word JobNumber[JobCount] (Hi-Lo)
|
||||
* Parser/reply comparison is delegated to the queue backend
|
||||
* helper and matches the old queue job-list shape.
|
||||
*/
|
||||
uint32 q_id=GET_BE32(rdata);
|
||||
int result=nw_get_queue_job_list_old(q_id, responsedata);
|
||||
if (result > -1)
|
||||
@@ -2198,6 +2268,19 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0x68: /* creat queue job and file old */
|
||||
case 0x79: { /* creat queue job and file new */
|
||||
/*
|
||||
* SDK 23/104 / wire 0x68 Create Queue Job And File (old)
|
||||
* and SDK 23/121 / wire 0x79 Create Queue Job And File.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* JobStruct, 256 bytes for old wire 0x68 and extended
|
||||
* size for newer wire 0x79
|
||||
* Reply: completed JobStruct including job number and file
|
||||
* handle.
|
||||
* Handoff comparison: nwconn.c returns -2 so nwbind.c can
|
||||
* perform the queue-job file prehandling before this parser
|
||||
* consumes QueueID and the JobStruct.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
uint8 *q_job = rdata+4; /* jobsize = 256(old) or 280 */
|
||||
int result = nw_creat_queue_job(
|
||||
@@ -2217,6 +2300,18 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0x6C: /* Get Queue Job Entry old */
|
||||
case 0x7A: { /* Read Queue Job Entry */
|
||||
/*
|
||||
* SDK 23/108 / wire 0x6c Read Queue Job Entry (old)
|
||||
* and SDK 23/122 / wire 0x7a Read Queue Job Entry.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* word JobNumber (Hi-Lo) for old wire 0x6c
|
||||
* long JobNumber (Lo-Hi) for newer wire 0x7a
|
||||
* Reply: JobStruct.
|
||||
* Handoff comparison: nwconn.c inserts the queue job file
|
||||
* handle before forwarding here. Both variants currently
|
||||
* consume a 16-bit JobNumber.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
int job_id = GET_BE16(rdata+4);
|
||||
/* added by nwconn */
|
||||
@@ -2231,6 +2326,18 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
case 0x69: /* close file and start queue old ?? */
|
||||
case 0x7f: { /* close file and start queue */
|
||||
/*
|
||||
* SDK 23/105 / wire 0x69 Close File And Start Queue Job
|
||||
* (old) and SDK 23/127 / wire 0x7f Close File And Start
|
||||
* Queue Job.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long QueueID (Hi-Lo)
|
||||
* word JobNumber (Lo-Hi in the old PDF table)
|
||||
* Reply: no data for the old call; the backend may return
|
||||
* compatibility data for the newer call.
|
||||
* Parser comparison: both variants currently consume a
|
||||
* 16-bit JobNumber with GET_BE16().
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
uint32 job_id = (ufunc==0x69)
|
||||
? GET_BE16(rdata+4)
|
||||
|
||||
21
src/nwconn.c
21
src/nwconn.c
@@ -5398,6 +5398,11 @@ static int handle_ncp_serv(void)
|
||||
break;
|
||||
|
||||
case 0x64: { /* create queue */
|
||||
/*
|
||||
* SDK 23/100 / wire 0x64 Create Queue is handled by
|
||||
* nwbind.c after this path prehandler resolves PathBase/PathName
|
||||
* and rewrites the payload to use a full path.
|
||||
*/
|
||||
#if 0
|
||||
int q_typ = GET_BE16(rdata);
|
||||
#endif
|
||||
@@ -5426,10 +5431,21 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x68: /* create queue job and file old */
|
||||
case 0x79: /* create queue job and file */
|
||||
/*
|
||||
* SDK 23/104 / wire 0x68 and SDK 23/121 / wire 0x79
|
||||
* queue-job creation are forwarded to nwbind.c with queue job
|
||||
* file prehandling. The concrete request layouts are documented
|
||||
* at the target handler.
|
||||
*/
|
||||
return(-2); /* nwbind must do prehandling */
|
||||
|
||||
case 0x6C: /* Get Queue Job Entry old */
|
||||
case 0x7A: { /* Read Queue Job Entry */
|
||||
/*
|
||||
* SDK 23/108 / wire 0x6c and SDK 23/122 / wire 0x7a
|
||||
* are forwarded to nwbind.c after inserting the local queue
|
||||
* job file handle into the request payload.
|
||||
*/
|
||||
uint32 q_id = GET_BE32(rdata);
|
||||
int job_id = GET_BE16(rdata+4);
|
||||
uint32 fhandle = get_queue_job_fhandle(q_id, job_id);
|
||||
@@ -5440,6 +5456,11 @@ static int handle_ncp_serv(void)
|
||||
|
||||
case 0x69: /* close file and start queue old ?? */
|
||||
case 0x7f: { /* close file and start queue */
|
||||
/*
|
||||
* SDK 23/105 / wire 0x69 and SDK 23/127 / wire 0x7f
|
||||
* close/start queue-job requests are prehandled here for the
|
||||
* associated file handle and then completed by nwbind.c.
|
||||
*/
|
||||
struct INPUT {
|
||||
uint8 header[7]; /* Requestheader */
|
||||
uint8 packetlen[2]; /* lo - hi */
|
||||
|
||||
Reference in New Issue
Block a user