2 * Copyright (C) 1986 Sun Microsystems, Inc.
3 * Modified by Jeffrey A. Uphoff, 1995, 1997-1999.
4 * Modified by Olaf Kirch, 1996.
5 * Modified by H.J. Lu, 1998.
11 * Copyright (c) 2009, Sun Microsystems, Inc.
12 * All rights reserved.
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are met:
16 * - Redistributions of source code must retain the above copyright notice,
17 * this list of conditions and the following disclaimer.
18 * - Redistributions in binary form must reproduce the above copyright notice,
19 * this list of conditions and the following disclaimer in the documentation
20 * and/or other materials provided with the distribution.
21 * - Neither the name of Sun Microsystems, Inc. nor the names of its
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
39 * Status monitor protocol specification
48 /* res_stat = stat_succ if status monitor agrees to monitor */
49 /* res_stat = stat_fail if status monitor cannot monitor */
50 /* if res_stat == stat_succ, state = state number of site sm_name */
51 struct sm_stat_res SM_STAT(struct sm_name) = 1;
53 /* res_stat = stat_succ if status monitor agrees to monitor */
54 /* res_stat = stat_fail if status monitor cannot monitor */
55 /* stat consists of state number of local site */
56 struct sm_stat_res SM_MON(struct mon) = 2;
58 /* stat consists of state number of local site */
59 struct sm_stat SM_UNMON(struct mon_id) = 3;
61 /* stat consists of state number of local site */
62 struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
64 void SM_SIMU_CRASH(void) = 5;
66 void SM_NOTIFY(struct stat_chge) = 6;
71 const SM_MAXSTRLEN = 1024;
72 const SM_PRIV_SIZE = 16;
75 string mon_name<SM_MAXSTRLEN>;
79 string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/
80 int my_prog; /* rpc program # of the requesting process */
81 int my_vers; /* rpc version # of the requesting process */
82 int my_proc; /* rpc procedure # of the requesting process */
86 string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
93 opaque priv[SM_PRIV_SIZE]; /* private information to store at monitor for requesting process */
97 string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */
102 * state # of status monitor monitonically increases each time
103 * status of the site changes:
104 * an even number (>= 0) indicates the site is down and
105 * an odd number (> 0) indicates the site is up;
108 int state; /* state # of status monitor */
112 stat_succ = 0, /* status monitor agrees to monitor */
113 stat_fail = 1 /* status monitor cannot monitor */
122 * structure of the status message sent back by the status monitor
123 * when monitor site status changes
126 string mon_name<SM_MAXSTRLEN>;
128 opaque priv[SM_PRIV_SIZE]; /* stored private information */