sm_inter.x revision 92970
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[] = 4250473Speter% "$FreeBSD: head/include/rpcsvc/sm_inter.x 92970 2002-03-22 19:43:21Z alfred $"; 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; 6574462Salfred void SM_NOTIFY(struct stat_chge) = 6; 661832Swollman 671832Swollman } = 1; 681832Swollman} = 100024; 691832Swollman 701832Swollmanconst SM_MAXSTRLEN = 1024; 711832Swollman 721832Swollmanstruct sm_name { 731832Swollman string mon_name<SM_MAXSTRLEN>; 741832Swollman}; 751832Swollman 761832Swollmanstruct my_id { 771832Swollman string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/ 781832Swollman int my_prog; /* rpc program # of the requesting process */ 791832Swollman int my_vers; /* rpc version # of the requesting process */ 801832Swollman int my_proc; /* rpc procedure # of the requesting process */ 811832Swollman}; 821832Swollman 831832Swollmanstruct mon_id { 841832Swollman string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */ 851832Swollman struct my_id my_id; 861832Swollman}; 871832Swollman 881832Swollman 891832Swollmanstruct mon{ 901832Swollman struct mon_id mon_id; 911832Swollman opaque priv[16]; /* private information to store at monitor for requesting process */ 921832Swollman}; 931832Swollman 9474462Salfredstruct stat_chge { 9574462Salfred string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */ 9674462Salfred int state; 9774462Salfred}; 981832Swollman 991832Swollman/* 1001832Swollman * state # of status monitor monitonically increases each time 1011832Swollman * status of the site changes: 1021832Swollman * an even number (>= 0) indicates the site is down and 1031832Swollman * an odd number (> 0) indicates the site is up; 1041832Swollman */ 1051832Swollmanstruct sm_stat { 1061832Swollman int state; /* state # of status monitor */ 1071832Swollman}; 1081832Swollman 10992970Salfredenum sm_res { 1101832Swollman stat_succ = 0, /* status monitor agrees to monitor */ 1111832Swollman stat_fail = 1 /* status monitor cannot monitor */ 1121832Swollman}; 1131832Swollman 1141832Swollmanstruct sm_stat_res { 11592970Salfred sm_res res_stat; 1161832Swollman int state; 1171832Swollman}; 1181832Swollman 1191832Swollman/* 1201832Swollman * structure of the status message sent back by the status monitor 1211832Swollman * when monitor site status changes 1221832Swollman */ 12392970Salfredstruct sm_status { 1241832Swollman string mon_name<SM_MAXSTRLEN>; 1251832Swollman int state; 1261832Swollman opaque priv[16]; /* stored private information */ 1271832Swollman}; 128