ncpcalls: rename probe helpers as requester calls
Rename the remaining Client32 transport helper symbols from Probe-style names to request-style names. These helpers are no longer only diagnostic probes; they are the low-level requester paths used by the NCP API wrappers. Rename the raw5 helper to the more general ncp_raw_request() name and update the MapVar/OpenRef helpers to ncp_mapvar_request() and ncp_openref_request(). No behavior change.
This commit is contained in:
@@ -125,13 +125,13 @@ The modern Client32 path is implemented through a small reusable helper layer:
|
||||
The working sequence is:
|
||||
|
||||
```text
|
||||
NCP_MapVar_Probe(4,0)
|
||||
ncp_mapvar_request(4,0)
|
||||
-> obtains the active connection reference
|
||||
|
||||
NCP_OpenRef_Probe()
|
||||
ncp_openref_request()
|
||||
-> opens that reference and returns a Client32 handle
|
||||
|
||||
NCP_Raw5_Probe()
|
||||
ncp_raw_request()
|
||||
-> sends NCP 87 requests through COMPATNcpRequestReply
|
||||
```
|
||||
|
||||
|
||||
40
c32ncp.c
40
c32ncp.c
@@ -653,7 +653,7 @@ static void ncp_copy_open_reply_to_handle6(NCP_FILE_HANDLE6 *dst,
|
||||
* Function 0x57 / subfunction 0x01, Open/Create File or Subdirectory.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*
|
||||
* Notes:
|
||||
* This wrapper is currently experimental for NCOPY. Earlier tests showed
|
||||
@@ -711,7 +711,7 @@ int ncp87_01_open_create_entry(const char *path_name,
|
||||
* word DesiredAccessRights (Lo-Hi)
|
||||
* NWHandlePathStruct
|
||||
*
|
||||
* The Client32 Raw5 requester path sends the subfunction
|
||||
* The Client32 raw requester path sends the subfunction
|
||||
* header as fragment 0 and the NWHandlePathStruct as fragment 1.
|
||||
*/
|
||||
memset(hdr, 0, sizeof(hdr));
|
||||
@@ -730,7 +730,7 @@ int ncp87_01_open_create_entry(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 15,
|
||||
path, path_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -875,7 +875,7 @@ int ncp66_close_file(const NCP_FILE_HANDLE6 *handle)
|
||||
* Information, RIM_ATTRIBUTES.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_06_obtain_rim_attributes(const char *name,
|
||||
uint16 dir_handle,
|
||||
@@ -921,7 +921,7 @@ int ncp87_06_obtain_rim_attributes(const char *name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
path, (UI)path_len,
|
||||
rep0, 0x4d,
|
||||
@@ -962,7 +962,7 @@ int ncp87_06_obtain_rim_attributes(const char *name,
|
||||
* Information, RIM_ALL.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_06_obtain_ndir_info(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
@@ -1024,7 +1024,7 @@ int ncp87_06_obtain_ndir_info(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
path, path_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1090,7 +1090,7 @@ int ncp87_06_obtain_ndir_info(const char *path_name,
|
||||
* Information.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_07_modify_dos_info(const char *name,
|
||||
uint16 dir_handle,
|
||||
@@ -1176,7 +1176,7 @@ int ncp87_07_modify_dos_info(const char *name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
modbuf, mod_len,
|
||||
path, path_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1244,7 +1244,7 @@ int ncp87_07_modify_dos_attributes(char *name,
|
||||
* Function 0x57 / subfunction 0x1d, Get Effective Rights.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request with an NWHandlePathStruct.
|
||||
* Client32 raw fragment request with an NWHandlePathStruct.
|
||||
*/
|
||||
int ncp87_1d_get_effective_rights(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
@@ -1305,7 +1305,7 @@ int ncp87_1d_get_effective_rights(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
path, path_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1413,7 +1413,7 @@ int ncp87_1d_get_effective_rights_by_dirent(uint8 vol_number,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
path, 7,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1619,7 +1619,7 @@ int ncp22_2b_delete_trustee_rights(const char *path_name,
|
||||
* Function 0x57 / subfunction 0x0a, Add Trustee Set.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_0a_add_trustee_rights(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
@@ -1664,7 +1664,7 @@ int ncp87_0a_add_trustee_rights(const char *path_name,
|
||||
* handle/path
|
||||
* trustee array at request offset 16 + 307
|
||||
*
|
||||
* Client32 Raw5 has two request fragments, so the second fragment carries
|
||||
* Client32 raw has two request fragments, so the second fragment carries
|
||||
* the handle/path and the padded trustee record.
|
||||
*/
|
||||
memset(hdr, 0, sizeof(hdr));
|
||||
@@ -1688,7 +1688,7 @@ int ncp87_0a_add_trustee_rights(const char *path_name,
|
||||
*
|
||||
* (16 + 307) - 7 = 316
|
||||
*
|
||||
* Our first Raw5 request fragment is the 9-byte subfunction header,
|
||||
* Our first raw request fragment is the 9-byte subfunction header,
|
||||
* so the trustee list begins in the second fragment at:
|
||||
*
|
||||
* 316 - 9 = 307
|
||||
@@ -1705,7 +1705,7 @@ int ncp87_0a_add_trustee_rights(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
reqpath, reqpath_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1739,7 +1739,7 @@ int ncp87_0a_add_trustee_rights(const char *path_name,
|
||||
* Function 0x57 / subfunction 0x05, Scan Trustee Set.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_05_find_trustee_rights(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
@@ -1795,7 +1795,7 @@ int ncp87_05_find_trustee_rights(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 9,
|
||||
path, path_len,
|
||||
rep0, sizeof(rep0),
|
||||
@@ -1851,7 +1851,7 @@ int ncp87_05_find_trustee_rights(const char *path_name,
|
||||
* Function 0x57 / subfunction 0x0b, Delete Trustee Set.
|
||||
*
|
||||
* Requester path:
|
||||
* Client32 Raw5 fragment request.
|
||||
* Client32 raw fragment request.
|
||||
*/
|
||||
int ncp87_0b_delete_trustee_rights(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
@@ -1905,7 +1905,7 @@ int ncp87_0b_delete_trustee_rights(const char *path_name,
|
||||
memset(rep1, 0, sizeof(rep1));
|
||||
memset(rawout, 0, sizeof(rawout));
|
||||
|
||||
NCP_Raw5_Probe(handle_lo, handle_hi,
|
||||
ncp_raw_request(handle_lo, handle_hi,
|
||||
hdr, 5,
|
||||
reqpath, reqpath_len,
|
||||
rep0, sizeof(rep0),
|
||||
|
||||
6
kern.h
6
kern.h
@@ -39,9 +39,9 @@ extern void asm_esr_routine(void);
|
||||
extern void esr_routine(ECB *ecb);
|
||||
extern void KERN_CALL xmemmove(void *ziel, void *quelle, UI anz);
|
||||
extern int KERN_CALL Net_Call(UI func, void *req, void *repl);
|
||||
extern int KERN_CALL NCP_MapVar_Probe(UI specLen, UI flag, void *outbuf);
|
||||
extern int KERN_CALL NCP_OpenRef_Probe(UI refLo, UI refHi, void *outbuf);
|
||||
extern int KERN_CALL NCP_Raw5_Probe(UI connLo, UI connHi,
|
||||
extern int KERN_CALL ncp_mapvar_request(UI specLen, UI flag, void *outbuf);
|
||||
extern int KERN_CALL ncp_openref_request(UI refLo, UI refHi, void *outbuf);
|
||||
extern int KERN_CALL ncp_raw_request(UI connLo, UI connHi,
|
||||
void *hdr, UI hdrLen,
|
||||
void *path, UI pathLen,
|
||||
void *rep0, UI rep0Len,
|
||||
|
||||
@@ -45,9 +45,9 @@ public _IPXclose_socket
|
||||
public _IPXlisten
|
||||
public _xmemmove
|
||||
public _Net_Call
|
||||
public _NCP_Raw5_Probe
|
||||
public _NCP_OpenRef_Probe
|
||||
public _NCP_MapVar_Probe
|
||||
public _ncp_raw_request
|
||||
public _ncp_openref_request
|
||||
public _ncp_mapvar_request
|
||||
_IPXinit proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
@@ -242,7 +242,7 @@ _Net_Call endp
|
||||
|
||||
|
||||
|
||||
; int NCP_OpenRef_Probe(UI refLo, UI refHi, void *outbuf)
|
||||
; int ncp_openref_request(UI refLo, UI refHi, void *outbuf)
|
||||
;
|
||||
; Opens a Client32 connection by connection reference using the same d32wrap
|
||||
; convention as _CONNOpenByReference / w95ocref.o.
|
||||
@@ -262,7 +262,7 @@ _Net_Call endp
|
||||
; +10 return DX
|
||||
; +12 handle low
|
||||
; +14 handle high
|
||||
_NCP_OpenRef_Probe proc far
|
||||
_ncp_openref_request proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 80
|
||||
@@ -404,11 +404,11 @@ c32openref_store:
|
||||
|
||||
c32openref_name db 'CONNOpenByReference',0
|
||||
|
||||
_NCP_OpenRef_Probe endp
|
||||
_ncp_openref_request endp
|
||||
|
||||
|
||||
|
||||
; int NCP_MapVar_Probe(UI specLen, UI flag, void *outbuf)
|
||||
; int ncp_mapvar_request(UI specLen, UI flag, void *outbuf)
|
||||
;
|
||||
; Exact-ish raw version of w95mconn.o::__C32MapConn16To32 second step.
|
||||
;
|
||||
@@ -436,7 +436,7 @@ _NCP_OpenRef_Probe endp
|
||||
; +14 resultRef high
|
||||
; +16 connRefLocal low ; corresponds to d32conni local -1c
|
||||
; +18 connRefLocal high
|
||||
_NCP_MapVar_Probe proc far
|
||||
_ncp_mapvar_request proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 140
|
||||
@@ -691,21 +691,21 @@ c32mapvar_store:
|
||||
|
||||
c32mapvar_name db 'CONNScanInfo',0
|
||||
|
||||
_NCP_MapVar_Probe endp
|
||||
_ncp_mapvar_request endp
|
||||
|
||||
|
||||
|
||||
|
||||
; int NCP_Raw5_Probe(UI connLo, UI connHi,
|
||||
; int ncp_raw_request(UI connLo, UI connHi,
|
||||
; void *hdr, UI hdrLen,
|
||||
; void *path, UI pathLen,
|
||||
; void *rep0, UI rep0Len,
|
||||
; void *rep1, UI rep1Len,
|
||||
; void *outbuf)
|
||||
;
|
||||
; Same as NCP_Raw_Probe but uses d32wrap-compatible 5-slot
|
||||
; Sends a raw NCP request through the d32wrap-compatible 5-slot
|
||||
; fragment tables: 5 * 8 = 0x28 bytes for request and reply.
|
||||
_NCP_Raw5_Probe proc far
|
||||
_ncp_raw_request proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 180
|
||||
@@ -727,11 +727,11 @@ _NCP_Raw5_Probe proc far
|
||||
db 66h, 89h, 4Eh, 0F6h ; trampoline at [bp-10]
|
||||
|
||||
or ax, ax
|
||||
jne raw5_fail
|
||||
jne raw_fail
|
||||
|
||||
; resolve COMPATNcpRequestReply
|
||||
push cs
|
||||
push offset raw5_name
|
||||
push offset raw_name
|
||||
push 0
|
||||
push 0
|
||||
call dword ptr [bp-6]
|
||||
@@ -739,10 +739,10 @@ _NCP_Raw5_Probe proc far
|
||||
mov [bp-14], ax
|
||||
mov [bp-12], dx
|
||||
or ax, dx
|
||||
jne raw5_have_func
|
||||
jmp raw5_fail
|
||||
jne raw_have_func
|
||||
jmp raw_fail
|
||||
|
||||
raw5_have_func:
|
||||
raw_have_func:
|
||||
; actual reply len dword at [bp-36]
|
||||
mov word ptr [bp-36], 0
|
||||
mov word ptr [bp-34], 0
|
||||
@@ -937,9 +937,9 @@ raw5_have_func:
|
||||
call dword ptr [bp-6]
|
||||
add sp, 0cH
|
||||
|
||||
jmp short raw5_store
|
||||
jmp short raw_store
|
||||
|
||||
raw5_fail:
|
||||
raw_fail:
|
||||
mov word ptr [bp-14], 0
|
||||
mov word ptr [bp-12], 0
|
||||
mov word ptr [bp-52], 0ffffH
|
||||
@@ -947,7 +947,7 @@ raw5_fail:
|
||||
mov word ptr [bp-36], 0
|
||||
mov word ptr [bp-34], 0
|
||||
|
||||
raw5_store:
|
||||
raw_store:
|
||||
les di, dword ptr [bp+22H]
|
||||
mov ax, [bp-2]
|
||||
mov es:[di+0], ax
|
||||
@@ -981,9 +981,9 @@ raw5_store:
|
||||
xor ah, ah
|
||||
ret
|
||||
|
||||
raw5_name db 'COMPATNcpRequestReply',0
|
||||
raw_name db 'COMPATNcpRequestReply',0
|
||||
|
||||
_NCP_Raw5_Probe endp
|
||||
_ncp_raw_request endp
|
||||
|
||||
|
||||
end
|
||||
|
||||
18
ncpcall.c
18
ncpcall.c
@@ -20,7 +20,7 @@
|
||||
|
||||
/*
|
||||
* Purpose: Low-level NCP requester and Client32 transport helpers for the NetWare DOS tools.
|
||||
* Depends on: net.h, c32ncp.h, netcall.c requester glue, and kern_wasm.asm/kern.asm Net_Call/Client32 probe entry points.
|
||||
* Depends on: net.h, c32ncp.h, netcall.c requester glue, and kern_wasm.asm/kern.asm Net_Call/Client32 request entry points.
|
||||
*
|
||||
* The public ncpXX_YY_* protocol wrappers live in c32ncp.c, which is planned
|
||||
* to become ncpapi.c. This file keeps the lower-level requester/transport
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "net.h"
|
||||
#include "c32ncp.h"
|
||||
|
||||
/* Client32/Raw5 requester transport helpers used by the NCP API wrappers. */
|
||||
/* Client32 raw requester transport helpers used by the NCP API wrappers. */
|
||||
|
||||
/*
|
||||
* ncp_build_handle_path
|
||||
@@ -207,10 +207,10 @@ UI ncp_build_handle_path_from_dos_path(uint8 *buf, uint8 dhandle,
|
||||
/*
|
||||
* Current verified Client32 path for mars-nwe DOS utilities:
|
||||
*
|
||||
* NCP_MapVar_Probe(4,0) -> connRefLocal FFFF:FFFE
|
||||
* NCP_OpenRef_Probe(connRefLocal) -> Client32 handle, e.g. 0101:0001
|
||||
* ncp_mapvar_request(4,0) -> connRefLocal FFFF:FFFE
|
||||
* ncp_openref_request(connRefLocal) -> Client32 handle, e.g. 0101:0001
|
||||
*
|
||||
* NCP_MapVar_Probe currently contains the confirmed Mars server-name scan
|
||||
* ncp_mapvar_request currently contains the confirmed Mars server-name scan
|
||||
* shape. It is intentionally kept small and isolated here so FLAG and later
|
||||
* tools do not carry the old exploratory tests.
|
||||
*/
|
||||
@@ -219,10 +219,10 @@ UI ncp_build_handle_path_from_dos_path(uint8 *buf, uint8 dhandle,
|
||||
*
|
||||
* Purpose:
|
||||
* Resolves the active MARS/NetWare connection into the Client32 NCP handle
|
||||
* used by the Raw5 requester probe.
|
||||
* used by the raw requester path.
|
||||
*
|
||||
* Requester path:
|
||||
* NCP_MapVar_Probe followed by NCP_OpenRef_Probe.
|
||||
* ncp_mapvar_request followed by ncp_openref_request.
|
||||
*
|
||||
* Returns:
|
||||
* 0 on success. Non-zero values indicate that the connection reference or
|
||||
@@ -243,7 +243,7 @@ int ncp_get_requester_handle(uint16 *handle_lo, uint16 *handle_hi)
|
||||
*handle_hi = 0;
|
||||
|
||||
memset(mapout, 0, sizeof(mapout));
|
||||
NCP_MapVar_Probe(4, 0, mapout);
|
||||
ncp_mapvar_request(4, 0, mapout);
|
||||
|
||||
map_ret_ax = tool_get_word_lh(mapout + 14);
|
||||
map_ret_dx = tool_get_word_lh(mapout + 16);
|
||||
@@ -254,7 +254,7 @@ int ncp_get_requester_handle(uint16 *handle_lo, uint16 *handle_hi)
|
||||
return(2);
|
||||
|
||||
memset(openout, 0, sizeof(openout));
|
||||
NCP_OpenRef_Probe(cref_lo, cref_hi, openout);
|
||||
ncp_openref_request(cref_lo, cref_hi, openout);
|
||||
|
||||
open_ret_ax = tool_get_word_lh(openout + 14);
|
||||
open_ret_dx = tool_get_word_lh(openout + 16);
|
||||
|
||||
Reference in New Issue
Block a user