2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
9 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13 * Sun RPC is provided with no support and without any obligation on the
14 * part of Sun Microsystems, Inc. to assist in its use, correction,
15 * modification or enhancement.
17 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19 * OR ANY PART THEREOF.
21 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22 * or profits or other special, indirect and consequential damages, even if
23 * Sun has been advised of the possibility of such damages.
25 * Sun Microsystems, Inc.
27 * Mountain View, California 94043
31 * Status monitor protocol specification
32 * Copyright (C) 1986 Sun Microsystems, Inc.
37 %#include <sys/cdefs.h>
39 %/*static char sccsid[] = "from: @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro";*/
40 %/*static char sccsid[] = "from: @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC";*/
41 %__RCSID("$NetBSD: sm_inter.x,v 1.5 1999/07/02 15:44:13 simonb Exp $");
42 %#endif /* not __lint__ */
45 const SM_MAXSTRLEN = 1024;
48 string mon_name<SM_MAXSTRLEN>;
52 string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/
53 int my_prog; /* rpc program # of the requesting process */
54 int my_vers; /* rpc version # of the requesting process */
55 int my_proc; /* rpc procedure # of the requesting process */
59 string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
66 opaque priv[16]; /* private information to store at monitor for requesting process */
70 string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */
75 * state # of status monitor monitonically increases each time
76 * status of the site changes:
77 * an even number (>= 0) indicates the site is down and
78 * an odd number (> 0) indicates the site is up;
81 int state; /* state # of status monitor */
85 stat_succ = 0, /* status monitor agrees to monitor */
86 stat_fail = 1 /* status monitor cannot monitor */
95 * structure of the status message sent back by the status monitor
96 * when monitor site status changes
99 string mon_name<SM_MAXSTRLEN>;
101 opaque priv[16]; /* stored private information */
106 /* res_stat = stat_succ if status monitor agrees to monitor */
107 /* res_stat = stat_fail if status monitor cannot monitor */
108 /* if res_stat == stat_succ, state = state number of site sm_name */
109 struct sm_stat_res SM_STAT(struct sm_name) = 1;
111 /* res_stat = stat_succ if status monitor agrees to monitor */
112 /* res_stat = stat_fail if status monitor cannot monitor */
113 /* stat consists of state number of local site */
114 struct sm_stat_res SM_MON(struct mon) = 2;
116 /* stat consists of state number of local site */
117 struct sm_stat SM_UNMON(struct mon_id) = 3;
119 /* stat consists of state number of local site */
120 struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
122 void SM_SIMU_CRASH(void) = 5;
124 void SM_NOTIFY(struct stat_chge) = 6;