Add myself for packaging copyright and some minor tweaks
[deb_libnfs.git] / nsm / nsm.x
CommitLineData
ee872606 1/*
f1f22dbf
RRS
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. 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.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON 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
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
ee872606
RRS
29
30/*
31 * This defines the maximum length of the string
32 * identifying the caller.
33 */
34const NSM_MAXSTRLEN = 1024;
35
36enum nsmstat1 {
37 NSM_STAT_SUCC = 0, /* NSM agrees to monitor. */
38 NSM_STAT_FAIL = 1 /* NSM cannot monitor. */
39};
40
41struct nsm_my_id {
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 */
46};
47
48struct nsm_mon_id {
49 string mon_name<NSM_MAXSTRLEN>; /* name of the host to be monitored */
50 struct nsm_my_id my_id;
51};
52
53struct NSM1_STATres {
54 nsmstat1 res;
55 int state;
56};
57
58struct NSM1_STATargs {
59 string mon_name<NSM_MAXSTRLEN>;
60};
61
62struct NSM1_MONres {
63 nsmstat1 res;
64 int state;
65};
66
67struct NSM1_MONargs {
68 struct nsm_mon_id mon_id;
69 opaque priv[16]; /* private information */
70};
71
72struct NSM1_UNMONres {
73 int state; /* state number of NSM */
74};
75
76struct NSM1_UNMONargs {
77 struct nsm_mon_id mon_id;
78};
79
80struct NSM1_UNMONALLres {
81 int state; /* state number of NSM */
82};
83
84struct NSM1_UNMONALLargs {
85 struct nsm_my_id my_id;
86};
87
88struct NSM1_NOTIFYargs {
89 string mon_name<NSM_MAXSTRLEN>;
90 int state;
91};
92
93/*
94 * Protocol description for the NSM program.
95 */
96program NSM_PROGRAM {
97 version NSM_V1 {
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;
105 } = 1;
106} = 100024;
107
108