home *** CD-ROM | disk | FTP | other *** search
- %h{
- /* *
- * *
- * Copyright 1987, 1988, 1989 Netwise, Inc. *
- * All Rights Reserved *
- * This software contains information which is proprietary to and a trade *
- * secret of Netwise, Inc. It is not to be used, reproduced, or disclosed *
- * except as authorized in your license agreement. *
- * *
- * Restricted Rights Legend *
- * Use, duplication, or disclosure by the Government is subject to *
- * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in *
- * Technical Data and Computer Software clause at 252.227-7013, or the *
- * equivalent Government clause for other agencies. *
- * Contractor: Netwise, Inc., Boulder, CO 80301 USA *
- * *
- */
- %}
-
- /*
- * File: diag\common\diag.rpc
- *
- * This RPC file runs in the following environment:
- * NetWare RPC 1.0, NetWare 2.1 or higher, DOS 3.3
- *
- * This is the RPC Specification file for the diag example.
- */
-
- %h{
- #ifndef NULL
- # include <stdio.h>
- #endif
- %}
-
- /* specify traps code for the client, server, and dispatcher so
- * additional information will be displayed in case of error
- */
-
- Client_stub: {
- Traps: {
- extern char *_rpcestr_();
- extern int _nl_error_;
-
- printf("CLIENT: %s() client stub error, %s\n", $PROC_NAME,
- _rpcestr_( $ERRVAL ? $ERRVAL : $TRAP ) );
- printf("CLIENT: trap = %d\n", $TRAP);
- printf("CLIENT: errval = %d\n", $ERRVAL);
- printf("CLIENT: nl_error = %d\n", _nl_error_);
- }
- }
-
- Server_stub: {
- Traps: {
- extern char *_rpcestr_();
- extern int _nl_error_;
-
- printf("SERVER: %s() server stub error, %s\n", $PROC_NAME,
- _rpcestr_( $ERRVAL ? $ERRVAL : $TRAP ) );
- printf("SERVER: trap = %d\n", $TRAP);
- printf("SERVER: errval = %d\n", $ERRVAL);
- printf("SERVER: nl_error = %d\n", _nl_error_);
- }
- }
-
- Dispatcher: {
- Traps: {
- extern char *_rpcestr_();
- extern int _nl_error_;
-
- printf("DISPATCHER: $INAME dispatcher procedure error, %s\n",
- _rpcestr_( $ERRVAL ? $ERRVAL : $TRAP ) );
- printf("DISPATCHER: trap = %d\n", $TRAP);
- printf("DISPATCHER: errval = %d\n", $ERRVAL);
- printf("DISPATCHER: nl_error = %d\n", _nl_error_);
- }
- }
-
-
- /* Declare a procedure with a nonpersistent connection to test basic
- * connectivity with server.
- */
-
- int
- nonper(server_name [bind in] sname, int count );
-
-
- /* Declare connection identifier for testing persistent connections. */
-
- extern connection_id [bind in out] conn;
-
- /* Declare procedures to open and close persistent connection;
- * these procedures pass no data.
- */
-
- int
- start( server_name [bind in] sname)
- {
- extern connection_id [bind out] conn;
- }
-
- int
- stop()
- {
- extern connection_id [bind in] conn;
- }
-
-
- /* Declare procedure to test simple data passing.
- * This procedure will use the persistent use style of binding,
- * using the external binding variable 'conn'
- */
- int
- simple(
- long [in] l1,
- double [in] d1,
- char [in] c1,
- long [out] *l2,
- double [out] *d2,
- char [out] *c2
- );
-
-
- /* Declare procedure to test passing of complex data (a linked list).
- * This procedure will use the persistent use style of binding,
- * using the external binding variable 'conn'
- */
-
- %h{
- #define MAX_DATA 1024
- %}
-
- struct cmplx_type {
- struct cmplx_type *link;
- int length;
- char data[MAX_DATA] ($0 - $1 >= $2->length -1);
- };
-
- int
- complex(
- struct cmplx_type [in] *list1,
- struct cmplx_type [out] *list2
- );
-