2 * Status monitor protocol specification
3 * Copyright (c) 2010, Oracle America, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials
14 * provided with the distribution.
15 * * Neither the name of the "Oracle America, Inc." nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 /* res_stat = stat_succ if status monitor agrees to monitor */
37 /* res_stat = stat_fail if status monitor cannot monitor */
38 /* if res_stat == stat_succ, state = state number of site sm_name */
39 struct sm_stat_res SM_STAT(struct sm_name) = 1;
41 /* res_stat = stat_succ if status monitor agrees to monitor */
42 /* res_stat = stat_fail if status monitor cannot monitor */
43 /* stat consists of state number of local site */
44 struct sm_stat_res SM_MON(struct mon) = 2;
46 /* stat consists of state number of local site */
47 struct sm_stat SM_UNMON(struct mon_id) = 3;
49 /* stat consists of state number of local site */
50 struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
52 void SM_SIMU_CRASH(void) = 5;
57 const SM_MAXSTRLEN = 1024;
60 string mon_name<SM_MAXSTRLEN>;
64 string my_name<SM_MAXSTRLEN>; /* name of the site initiating the monitoring request*/
65 int my_prog; /* rpc program # of the requesting process */
66 int my_vers; /* rpc version # of the requesting process */
67 int my_proc; /* rpc procedure # of the requesting process */
71 string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
78 opaque priv[16]; /* private information to store at monitor for requesting process */
83 * state # of status monitor monotonically increases each time
84 * status of the site changes:
85 * an even number (>= 0) indicates the site is down and
86 * an odd number (> 0) indicates the site is up;
89 int state; /* state # of status monitor */
93 stat_succ = 0, /* status monitor agrees to monitor */
94 stat_fail = 1 /* status monitor cannot monitor */
103 * structure of the status message sent back by the status monitor
104 * when monitor site status changes
107 string mon_name<SM_MAXSTRLEN>;
109 opaque priv[16]; /* stored private information */