sm_inter.x revision 31387
131387Scharnier/* @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC */ 231387Scharnier/* @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro */ 331387Scharnier 41832Swollman/* 51832Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 61832Swollman * unrestricted use provided that this legend is included on all tape 71832Swollman * media and as a part of the software program in whole or part. Users 81832Swollman * may copy or modify Sun RPC without charge, but are not authorized 91832Swollman * to license or distribute it to anyone else except as part of a product or 101832Swollman * program developed by the user. 111832Swollman * 121832Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 131832Swollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 141832Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 151832Swollman * 161832Swollman * Sun RPC is provided with no support and without any obligation on the 171832Swollman * part of Sun Microsystems, Inc. to assist in its use, correction, 181832Swollman * modification or enhancement. 191832Swollman * 201832Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 211832Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 221832Swollman * OR ANY PART THEREOF. 231832Swollman * 241832Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 251832Swollman * or profits or other special, indirect and consequential damages, even if 261832Swollman * Sun has been advised of the possibility of such damages. 271832Swollman * 281832Swollman * Sun Microsystems, Inc. 291832Swollman * 2550 Garcia Avenue 301832Swollman * Mountain View, California 94043 311832Swollman */ 321832Swollman 331832Swollman/* 341832Swollman * Status monitor protocol specification 351832Swollman * Copyright (C) 1986 Sun Microsystems, Inc. 361832Swollman * 371832Swollman */ 381832Swollman 391832Swollman#ifndef RPC_HDR 401832Swollman%#ifndef lint 4130870Scharnier%static const char rcsid[] = 4231387Scharnier% "$Id: sm_inter.x,v 1.6 1997/11/20 07:18:05 charnier Exp $"; 431832Swollman%#endif /* not lint */ 441832Swollman#endif 451832Swollman 461832Swollmanprogram SM_PROG { 471832Swollman version SM_VERS { 481832Swollman /* res_stat = stat_succ if status monitor agrees to monitor */ 491832Swollman /* res_stat = stat_fail if status monitor cannot monitor */ 501832Swollman /* if res_stat == stat_succ, state = state number of site sm_name */ 511832Swollman struct sm_stat_res SM_STAT(struct sm_name) = 1; 521832Swollman 531832Swollman /* res_stat = stat_succ if status monitor agrees to monitor */ 541832Swollman /* res_stat = stat_fail if status monitor cannot monitor */ 551832Swollman /* stat consists of state number of local site */ 561832Swollman struct sm_stat_res SM_MON(struct mon) = 2; 571832Swollman 581832Swollman /* stat consists of state number of local site */ 591832Swollman struct sm_stat SM_UNMON(struct mon_id) = 3; 601832Swollman 611832Swollman /* stat consists of state number of local site */ 621832Swollman struct sm_stat SM_UNMON_ALL(struct my_id) = 4; 631832Swollman 641832Swollman void SM_SIMU_CRASH(void) = 5; 651832Swollman 661832Swollman } = 1; 671832Swollman} = 100024; 681832Swollman 691832Swollmanconst SM_MAXSTRLEN = 1024; 701832Swollman 711832Swollmanstruct sm_name { 721832Swollman string mon_name<SM_MAXSTRLEN>; 731832Swollman}; 741832Swollman 751832Swollmanstruct my_id { 761832Swollman string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/ 771832Swollman int my_prog; /* rpc program # of the requesting process */ 781832Swollman int my_vers; /* rpc version # of the requesting process */ 791832Swollman int my_proc; /* rpc procedure # of the requesting process */ 801832Swollman}; 811832Swollman 821832Swollmanstruct mon_id { 831832Swollman string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */ 841832Swollman struct my_id my_id; 851832Swollman}; 861832Swollman 871832Swollman 881832Swollmanstruct mon{ 891832Swollman struct mon_id mon_id; 901832Swollman opaque priv[16]; /* private information to store at monitor for requesting process */ 911832Swollman}; 921832Swollman 931832Swollman 941832Swollman/* 951832Swollman * state # of status monitor monitonically increases each time 961832Swollman * status of the site changes: 971832Swollman * an even number (>= 0) indicates the site is down and 981832Swollman * an odd number (> 0) indicates the site is up; 991832Swollman */ 1001832Swollmanstruct sm_stat { 1011832Swollman int state; /* state # of status monitor */ 1021832Swollman}; 1031832Swollman 1041832Swollmanenum res { 1051832Swollman stat_succ = 0, /* status monitor agrees to monitor */ 1061832Swollman stat_fail = 1 /* status monitor cannot monitor */ 1071832Swollman}; 1081832Swollman 1091832Swollmanstruct sm_stat_res { 1101832Swollman res res_stat; 1111832Swollman int state; 1121832Swollman}; 1131832Swollman 1141832Swollman/* 1151832Swollman * structure of the status message sent back by the status monitor 1161832Swollman * when monitor site status changes 1171832Swollman */ 1181832Swollmanstruct status { 1191832Swollman string mon_name<SM_MAXSTRLEN>; 1201832Swollman int state; 1211832Swollman opaque priv[16]; /* stored private information */ 1221832Swollman}; 123