/* $Id: wave_rpc_extern.h,v 1.8 1995/09/12 16:17:43 lubosp Exp $ */ /*************************************************************************** * * * ALL RIGHTS RESERVED * * * Copyright 1989, 1990 Precision Visuals, Inc. This media contains information which is proprietary to and a trade secret of Precision Visuals, Inc. and its licensors. It is not to be disclosed to anyone outside of this organization. * * * 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. Contractor: Precision Visuals, Inc. 6260 Lookout Rd., Boulder, CO 80301 ******************************************************************************/ #ifndef _WAVE_RPC_EXTERN_H #define _WAVE_RPC_EXTERN_H /* * INCLUDE FILES */ #ifndef _WAVE_RPC_SYSTEM_INCLUDES #define _WAVE_RPC_SYSTEM_INCLUDES #include #ifdef rs6000 #include #endif #include #if !defined(axposf) && !defined(linux) # include #endif /* axposf or linux */ #include #include #include #include #include #endif #include "export.h" #define PROGRAM 0x20000001 /* In the "user defined" range */ #define VERSION 1 #define PROCEDURE 1 #define GET_SOCKET_TIMEOUT 20 /* In seconds */ #define RESPONSE_TIMEOUT 60 /* In seconds */ #define MAX_HOST_LEN 70 #define MAXSTRLEN 512 #ifdef cray2 #define unicos #endif #ifdef crayxmp #define unicos #endif #ifdef hpux #define bcopy(src,dst,len) ut_bcopy(src,dst,len) #endif #ifdef dec3100 #define extern_calloc #endif #ifdef extern_calloc extern char *calloc (); #endif #define MAX_USER_LEN 40 #define MAX_PROC_LEN 40 #define TYP_ARRAY 0x80 /* Compound type */ #define TYP_ERROR 0xFF #define SIMPLE_MASK 0x7F typedef union { unsigned char c; short i; long l; float f; double d; COMPLEX cmp; char *string; char *structure; char *array; } UT_TYPES; typedef struct { unsigned char type; unsigned char element_size; unsigned char n_dim; long dim[MAX_ARRAY_DIM]; UT_TYPES value; } UT_VAR; typedef struct { unsigned char direction; unsigned char user[MAX_USER_LEN]; char proc[MAX_PROC_LEN]; int argc; UT_VAR * argv[MAXPARAMS + 1]; } VPACKAGE; /* These are convenient but are dangerous since w_get_par can return "NULL" */ /* when the received arguments don't match the expected arguments. */ /* This means that you could be stuck with *NULL. Use these only when */ /* you're positive that the client is sending the right arguments. */ #define WAVE_BYTE *(unsigned char *)w_get_par(ut_next_param++, TYP_BYTE) #define WAVE_INT *(short *)w_get_par(ut_next_param++, TYP_INT) #define WAVE_LONG *(long *)w_get_par(ut_next_param++, TYP_LONG) #define WAVE_FLOAT *(float *)w_get_par(ut_next_param++, TYP_FLOAT) #define WAVE_DOUBLE *(double *)w_get_par(ut_next_param++, TYP_DOUBLE) #define WAVE_COMPLEX *(COMPLEX *)w_get_par(ut_next_param++, TYP_COMPLEX) #define WAVE_STRING (char *)w_get_par(ut_next_param++, TYP_STRING) #define WAVE_STRUCT *(ARRAY *)w_get_par(ut_next_param++, TYP_STRUCT) /* These are safer since you get the pointer. */ #define WAVE_BYTE_ARRAY \ (unsigned char *)w_get_par(ut_next_param++, TYP_BYTE | TYP_ARRAY) #define WAVE_INT_ARRAY \ (short *)w_get_par(ut_next_param++, TYP_INT | TYP_ARRAY) #define WAVE_LONG_ARRAY \ (long *)w_get_par(ut_next_param++, TYP_LONG | TYP_ARRAY) #define WAVE_FLOAT_ARRAY \ (float *)w_get_par(ut_next_param++, TYP_FLOAT | TYP_ARRAY) #define WAVE_DOUBLE_ARRAY \ (double *)w_get_par(ut_next_param++, TYP_DOUBLE | TYP_ARRAY) #define WAVE_COMPLEX_ARRAY \ (COMPLEX *)w_get_par(ut_next_param++, TYP_COMPLEX | TYP_ARRAY) #define WAVE_STRING_ARRAY \ (char **)w_get_par(ut_next_param++, TYP_STRING | TYP_ARRAY) #define WAVE_STRUCT_ARRAY \ (char *)w_get_par(ut_next_param++, TYP_STRUCT | TYP_ARRAY) /* Needed so that the above definitions work. */ extern int ut_next_param; #endif /* end of wave_rpc_extern.h */