/* ** File name: GETSYI_DEF.H ** ** Copyright (c) 1991, by ** Process Software Corporation ** Framingham, Massachusetts */ typedef unsigned int longw; typedef unsigned short word; typedef unsigned char byte; /* ** The structure containing the information that SYS$GETSYI requires. */ typedef struct { word l_buf_len, l_code; byte *l_buf_addr; word *l_ret_len_addr; } list_3; /* ** VMS Descriptor handling */ typedef struct dsc_descriptor { word dsc$w_length; byte dsc$b_dtype; /* DSC$K_DTYPE_T */ byte dsc$b_class; /* DSC$K_CLASS_S */ char *dsc$a_pointer; } DSC; #define DSC$K_DTYPE_T 14 /* character-coded text */ #define DSC$K_CLASS_S 1 /* scalar or string descriptor */ #define DSC$K_CLASS_D 2 /* dynamic string descriptor */ #define $DSC( dsc,txt) \ DSC dsc [1] = { sizeof (txt) - 1, DSC$K_DTYPE_T, DSC$K_CLASS_S, txt } #define $DSCL( dsc,str,siz) \ DSC dsc [1] = { siz, DSC$K_DTYPE_T, DSC$K_CLASS_S, str } typedef longw (*rtns)(); /* ** This structure contains all of the information pertaining to a call to the ** server. */ typedef struct { SVCXPRT *ti_xprt; /* request's transport handle */ svc_req *ti_rqstp; /* request pointer */ getsyi_args *ti_args; /* arguments from the client */ getsyi_res ti_results; /* results to the client */ quad ti_iosb; /* iosb for SYS$GETSYI */ DSC ti_node; /* descriptor IDing cluster node */ longw ti_no_items; /* # of codes client sent */ list_3 *ti_getsyi_args; /* addr of list passed to SYS$GETSYI */ rtns ti_routines[]; /* addr of routines to convert results returned by SYS$GETSYI */ } thread_info; #define STR_4 4 /* size of a string of 4 characters */ #define STR_8 8 #define STR_15 15 #define STR_31 31 /* ** A parse table is set up containing this information. This table is used to ** convert the string that the client sent into the information that SYS$GETSYI ** requires and the routine that will convert SYS$GETSYI's output */ typedef struct { char *ci_name; /* string client sent (upper case only) */ word ci_code, /* the code from SYIDEF.H */ ci_len; /* # bytes SYS$GETSYI may return */ rtns ci_routine; /* routine to convert SYS$GETSYI output */ } code_info; /* ** These macros test the VMS status code argument s (a longword) for success or failure. An odd number indicates success. */ #define _error( s) if( !((s) & 1)) #define _success( s) if( (s) & 1) #define get_vm( x) malloc( x) #define free_vm( x) free( x) /* end file GETSYI_DEF.H */