1 /* @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC */
2 /* @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro */
5 * Copyright (c) 2010, Oracle America, Inc.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials
16 * provided with the distribution.
17 * * Neither the name of the "Oracle America, Inc." nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
28 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 * Status monitor protocol specification
37 * Copyright (C) 1986 Sun Microsystems, Inc.
42 %#include <sys/cdefs.h>
43 %__FBSDID("$FreeBSD$");
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;
65 void SM_NOTIFY(struct stat_chge) = 6;
70 const SM_MAXSTRLEN = 1024;
73 string mon_name<SM_MAXSTRLEN>;
77 string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/
78 int my_prog; /* rpc program # of the requesting process */
79 int my_vers; /* rpc version # of the requesting process */
80 int my_proc; /* rpc procedure # of the requesting process */
84 string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
91 opaque priv[16]; /* private information to store at monitor for requesting process */
95 string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */
100 * state # of status monitor monitonically increases each time
101 * status of the site changes:
102 * an even number (>= 0) indicates the site is down and
103 * an odd number (> 0) indicates the site is up;
106 int state; /* state # of status monitor */
110 stat_succ = 0, /* status monitor agrees to monitor */
111 stat_fail = 1 /* status monitor cannot monitor */
120 * structure of the status message sent back by the status monitor
121 * when monitor site status changes
124 string mon_name<SM_MAXSTRLEN>;
126 opaque priv[16]; /* stored private information */