2 Copyright (c) 2014, Ronnie Sahlberg
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 The views and conclusions contained in the software and documentation are those
26 of the authors and should not be interpreted as representing official policies,
27 either expressed or implied, of the FreeBSD Project.
31 * This defines the maximum length of the string
32 * identifying the caller.
34 const NSM_MAXSTRLEN = 1024;
37 NSM_STAT_SUCC = 0, /* NSM agrees to monitor. */
38 NSM_STAT_FAIL = 1 /* NSM cannot monitor. */
42 string my_name<NSM_MAXSTRLEN>; /* hostname */
43 int my_prog; /* RPC program number */
44 int my_vers; /* program version number */
45 int my_proc; /* procedure number */
49 string mon_name<NSM_MAXSTRLEN>; /* name of the host to be monitored */
50 struct nsm_my_id my_id;
58 struct NSM1_STATargs {
59 string mon_name<NSM_MAXSTRLEN>;
68 struct nsm_mon_id mon_id;
69 opaque priv[16]; /* private information */
72 struct NSM1_UNMONres {
73 int state; /* state number of NSM */
76 struct NSM1_UNMONargs {
77 struct nsm_mon_id mon_id;
80 struct NSM1_UNMONALLres {
81 int state; /* state number of NSM */
84 struct NSM1_UNMONALLargs {
85 struct nsm_my_id my_id;
88 struct NSM1_NOTIFYargs {
89 string mon_name<NSM_MAXSTRLEN>;
94 * Protocol description for the NSM program.
98 void NSM1_NULL(void) = 0;
99 struct NSM1_STATres NSM1_STAT(struct NSM1_STATargs) = 1;
100 struct NSM1_MONres NSM1_MON(struct NSM1_MONargs) = 2;
101 struct NSM1_UNMONres NSM1_UNMON(struct NSM1_UNMONargs) = 3;
102 struct NSM1_UNMONALLres NSM1_UNMON_ALL(struct NSM1_UNMONALLargs) = 4;
103 void NSM1_SIMU_CRASH(void) = 5;
104 void NSM1_NOTIFY(struct NSM1_NOTIFYargs) = 6;