ncp_send

Sends a NetWare Core Protocol (NCP) request to the specified NetWare server.

Library:LibC
Classification:Novell
Service:NCP Client

Syntax

  #include <client.h>
   
  int ncp_send (
     int      session,
     int      requestCode,
     int      sendFragCount,
     frag_t   sendFrags[],
     int      replyFragCount,
     frag_t   replyFrags[],
     int     *replyFragsUsed ); 
  

Parameters

session

(IN) Specifies the open NCP session to use for sending the request. You use the ncp_open function to create an open session.

requestCode

(IN) Specifies the NCP function and subfunction code.

sendFragCount

(IN) Specifies the number of fragments in the request array.

sendFrags

(IN) Contains the array of request fragments.

replyFragCount

(IN) Specifies the number of fragment buffers available for the response.

replyFrags

(OUT) Contains the array of response fragments.

replyLength

(OUT) Points to the total number of bytes returned. Can be NULL.

Return Values

If successful, returns 0. Otherwise returns -1 and sets errno.

Decimal

Constant

Description

4

EBADF

The session is an invalid descriptor.

5

ENOMEM

Unable to allocate memory for the task.

9

EINVAL

Either the NCP function or subfunction code is invalid.

19

EWRNGKND

The session is valid descriptor, but it does not indicate an open NCP session.

105

ENOCONTEXT

The calling thread has no context.

116

ENCP

A client error occurred. Check clienterrno for the NCP client error that has occurred.

ncp_error is set to hold any error returned from the NCP layer detailing more pointedly what may have gove wrong.

See Also