/* ** File name: GETSYI.X ** ** Copyright (c) 1991, by ** Process Software Corporation ** Framingham, Massachusetts */ /* ** RPCGEN input file for the sysinfo RPC broadcasting example. ** ** RPCGEN uses this file to create these files: ** GETSYI.H, GETSYI_CLNT.C, GETSYI_SVC.C and GETSYI_XDR.C */ const MAX_ITEM_CODES = 64; /* maximum # item codes in a request */ const MAX_STRING_LEN = 256; /* maximum string length */ /* ** Define item, result and message as strings with a maximum length of 256 */ typedef string item< MAX_STRING_LEN>; typedef string result< MAX_STRING_LEN>; typedef string message< MAX_STRING_LEN>; /* ** What the client sends to the server: a node name and 1 or more item code ** strings. */ struct getsyi_args { string gsa_node_name< MAX_STRING_LEN>; item gsa_item_codes< MAX_ITEM_CODES>; }; /* ** What the server returns when successful: an array of result strings. */ struct getsyi_info { result gsi_results< MAX_ITEM_CODES>; }; /* ** What the server sends to the client. This may be either an array of result ** strings (status == 1), or an error code and associated message (any other ** status value). */ union getsyi_res switch( u_long gsr_status) { case 1: getsyi_info gsr_info; default: message gsr_msg; }; /* ** Service definition: The service (GETSYI_PROG) consists of one version ** (GETSYI_VERS_1) with two procedures: GETSYI_PROC_1 and the NULL routine, ** which RPCGEN always includes. */ program GETSYI_PROG { version GETSYI_VERS_1 { getsyi_res GETSYI_PROC_1( getsyi_args) = 1; } = 1; } = 0x20000001; /* end file GETSYI.X */