OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

4.3.4 dc_rpc_call_to_s - Request a remote service with the communication destination specified

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Arguments that contain return values
(5) Return values
(6) Notes

(1) Form

(a) TP1/Client/W
_s version of the function
 
#include <dcvrpc.h>
DCLONG dc_rpc_call_to_s(
  DCCLT_ID cltid, struct DCRPC_BINDING_TBL *direction,
  char *group, char *service, char *in,
  DCULONG *in_len, char *out,
  DCULONG *out_len,
  DCLONG flags)
 
Non-_s version of the function
 
#include <dcvrpc.h>
DCLONG dc_rpc_call_to(
       struct DCRPC_BINDING_TBL *direction,
       char *group, char *service,
       char *in, DCULONG *in_len, char *out, 
       DCULONG *out_len, DCLONG flags)
 
(b) TP1/Client/P
_s version of the function
 
#include <dcvrpc.h>
DCLONG dc_rpc_call_to_s(
  DCCLT_ID cltid, struct DCRPC_BINDING_TBL CLTFAR *direction,
  char CLTFAR *group, char CLTFAR *service, char CLTFAR *in,
  DCULONG CLTFAR *in_len, char CLTFAR *out,
  DCULONG CLTFAR *out_len,
  DCLONG flags)
 
Non-_s version of the function
 
#include <dcvrpc.h>
DCLONG dc_rpc_call_to(
  struct DCRPC_BINDING_TBL CLTFAR *direction, char CLTFAR *group,
  char CLTFAR *service, char CLTFAR *in, DCULONG CLTFAR *in_len,
  char CLTFAR *out, DCULONG CLTFAR *out_len, DCLONG flags)
 

(2) Purpose

In the same way as the dc_rpc_call_s function, the dc_rpc_call_to_s function requests an SPP service. The dc_rpc_call_to_s function uses the host name, in addition to the service group name and service name, as a search key for the service function to restrict the nodes to which service requests are sent.

Before issuing the dc_rpc_call_to_s function, you must issue DCRPC_DIRECT_SCHEDULE() to create a DCRPC_BINDING_TBL structure. In the direction argument, specify the address of the DCRPC_BINDING_TBL structure. Other interfaces are the same as those for the dc_rpc_call_s function.

(3) Arguments set by UAPs

(4) Arguments that contain return values

(5) Return values

Return value Value (decimal) Meaning
DC_OK 0 Normal termination
DCRPCER_INVALID_ARGS -2401 An invalid value is specified for an argument.
DCRPCER_PROTO -2402 The dc_rpc_open_s function has not been executed.
Alternatively, this function was issued while a permanent connection was being established or was issued within a transaction.
DCRPCER_NO_BUFS -2404 A sufficient amount of buffer space could not be secured or resources became insufficient.
DCRPCER_NET_DOWN -2406 Network error
DCRPCER_TIMED_OUT -2407 A timeout occurred during processing of the dc_rpc_call_to_s function. Alternatively, the service-requested SPP terminated abnormally before completing the processing.
DCRPCER_MESSAGE_TOO_BIG -2408 The input parameter length exceeds the maximum.
DCRPCER_REPLY_TOO_BIG -2409 The length of the returned response exceeds the area provided by the CUP.
DCRPCER_NO_SUCH_SERVICE_GROUP -2410 An undefined service group name was specified.
Alternatively, a service request was sent to a user server that receives requests from socket (receive_from=socket is specified in the user service definition).
Alternatively, the SPP requested to provide a service was not started when N was specified for DCCLTONLYTHISNODE of the client environment definition.
DCRPCER_NO_SUCH_SERVICE -2411 An undefined service name is specified.
DCRPCER_SERVICE_CLOSED -2412 The service group containing the specified service is shut down.
DCRPCER_SERVICE_TERMINATING -2413 The specified service is terminating.
DCRPCER_SERVICE_NOT_UP -2414 The SPP requested to provide a service was not started when Y was specified for DCCLTONLYTHISNODE of the client environment definition.
Alternatively, when 0 is specified for DCWATCHTIM in the client environment definition, the SPP terminated abnormally before completing the processing.
DCRPCER_OLTF_NOT_UP -2415 OpenTP1 is not running on the node that has the specified service.
DCRPCER_SYSERR_AT_SERVER -2416 A system error occurred for the specified service.
DCRPCER_NO_BUFS_AT_SERVER -2417 Insufficient memory for the specified service.
DCRPCER_SYSERR -2418 System error
DCRPCER_INVALID_REPLY -2419 The length of the response returned to OpenTP1 from the service function is not in the range from 1 to the value of DCRPC_MAX_MESSAGE_SIZE#.
DCRPCER_OLTF_INITIALIZING -2420 OpenTP1 is starting on the node to which the service request was sent.
DCRPCER_TRNCHK -2427 The version of OpenTP1 on the node used for load balancing is too old to execute the inter-node load balancing facility. This value is returned only when a service request has been issued to the SPPs using the inter-node load balancing facility.
DCRPCER_TESTMODE -2466 A service request was issued to an SPP for which test_mode=no was specified in the user service definition.
DCRPCER_SECCHK -2470 The service-requested SPP is protected by the security facility. The UAP that called the dc_rpc_call_to_s function is not authorized to access the server UAP.
DCRPCER_SERVICE_TERMINATED -2478 The SPP requested to provide a service terminated abnormally before completing the processing. This value is returned when 00000001 is specified for DCEXTENDFUNCTION in the client environment definition. If 00000000 is specified or if the specification is omitted, DCRPCER_TIMED_OUT or DCRPCER_SERVICE_NOT_UP is returned as the return value.
DCCLTER_INVALID_CLTID -2544 The client ID specified in cltid differs from the client ID received by the dc_clt_cltin_s function.
DCRPCER_PORT_IN_USE -2547 The specified port number is in use. Alternatively, port numbers that can be assigned automatically by the operating system are insufficient.

# If you specify 2 or a larger value for DCCLTRPCMAXMSGSIZE in the client environment definition, the value you specify is used rather than the value of DCRPC_MAX_MESSAGE_SIZE (1 megabyte).

(6) Notes