NWSendNCPExtensionFraggedRequest

Sends a request to the specified NCP extension and allows data to be retrieved from and stored in noncontiguous memory locations

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM
Service:NCP Extension

Syntax

  #include <nlm\nwncpx.h>  
   
  int NWSendNCPExtensionFraggedRequest  (  
     LONG                         NCPExtensionID,   
     const struct NCPExtensionMessageFrag   
                                *requestFrag,   
     struct NCPExtensionMessageFrag   
                                * replyFrag);
  

Parameters

NCPExtensionID
(IN) Specifies the ID of the NCP Extension to process the request.
requestFrag
(IN) Points to the NCPExtensionMessageFrag structure containing information about the lengths and locations of the fragmented data for the NCP Extension handler to process (optional).
replyFrag
(IN/OUT) Points to the NCPExtensionMessageFrag structure. Inputs the maximum length of the data to return and where to place the data. Outputs the length of all returned data and where the data is stored (optional).

Return Values

The following table lists return values and descriptions.

Value

Hex

Name and description

0

0x00

SUCCESSFUL The extension was found, and the non-null output parameters were filled.

126

0x7E

ERR_NCPEXT_TRANSPORT_PROTOCOL_VIOLATION The message transport mechanism entered a bad state in the protocol.

150

0x96

ERR_NO_ALLOC_SPACE There was not enough memory available on the server to allocate space for the message.

252

0xFC

ERR_NCPEXT_SERVICE_PROTOCOL_VIOLATION The service provider tried to return more data than the reply buffer could hold.

254

0xFE

ERR_NCPEXT_NO_HANDLER The NCP exception handler could not be found.

1-16

 

A communications error has occurred. (See niterror.h.)

Remarks

Call NWSendNCPExtensionFraggedRequest when you want to send your NCP Extension handler information stored at various locations which will avoid copying the information into a single buffer before sending it to your NCP Extension.

NWSendNCPExtensionFraggedRequest can also place the reply data into up to four specific locations, eliminating the need for you to copy the data from a reply buffer.

If your NCP Extension uses a single input buffer and/or a single output buffer, call NWSendNCPExtensionRequest instead of NWSendNCPExtensionFraggedRequest.

If your NLM registers its NCP Extension by a specific ID, use that ID when calling NWSendNCPExtensionFraggedRequest. If your NLM registers its NCP Extension by name, call NWGetNCPExtensionInfo (NLM) or NWScanNCPExtensions (NLM) to obtain the ID before calling NWSendNCPExtensionFraggedRequest.

NWSendNCPExtensionFraggedRequest copies the number of bytes from the server (indicated in the totalMessageSize field of the NCPExtensionMessageFrag structure), places them into memory locations (specified in the fragList field of the NCPExtensionMessageFrag structure), and sets a value to reflect the actual number of bytes transferred (indicated by the totalMessageSize field of the NCPExtensionMessageFrag structure).

NOTE:The information in the replyFrag parameter is valid only if NWSendNCPExtensionFraggedRequest returns SUCCESSFUL.

The request and reply buffers of the client must be reproduced on the server, so the maximum size of the buffers depends upon the memory available on the server that registers the NCP Extension. When NWSendNCPExtensionFraggedRequest is called, it attempts to allocate server memory for two message buffers. If it cannot allocate enough space, ERR_NO_ALLOC_SPACE will be returned. However, the request should be retried several times since server memory use is dynamic.

See Also

NWSendNCPExtensionRequest