Merge branch 'upstream'
[deb_libnfs.git] / nsm / libnfs-raw-nsm.h
1 /*
2 Copyright (c) 2014, Ronnie Sahlberg
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
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.
13
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.
24
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.
28 */
29
30 /*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35 #ifndef _NSM_H_RPCGEN
36 #define _NSM_H_RPCGEN
37
38 #include <nfsc/libnfs-zdr.h>
39
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #define NSM_MAXSTRLEN 1024
46
47 enum nsmstat1 {
48 NSM_STAT_SUCC = 0,
49 NSM_STAT_FAIL = 1,
50 };
51 typedef enum nsmstat1 nsmstat1;
52
53 struct nsm_my_id {
54 char *my_name;
55 int my_prog;
56 int my_vers;
57 int my_proc;
58 };
59 typedef struct nsm_my_id nsm_my_id;
60
61 struct nsm_mon_id {
62 char *mon_name;
63 struct nsm_my_id my_id;
64 };
65 typedef struct nsm_mon_id nsm_mon_id;
66
67 struct NSM1_STATres {
68 nsmstat1 res;
69 int state;
70 };
71 typedef struct NSM1_STATres NSM1_STATres;
72
73 struct NSM1_STATargs {
74 char *mon_name;
75 };
76 typedef struct NSM1_STATargs NSM1_STATargs;
77
78 struct NSM1_MONres {
79 nsmstat1 res;
80 int state;
81 };
82 typedef struct NSM1_MONres NSM1_MONres;
83
84 struct NSM1_MONargs {
85 struct nsm_mon_id mon_id;
86 char priv[16];
87 };
88 typedef struct NSM1_MONargs NSM1_MONargs;
89
90 struct NSM1_UNMONres {
91 int state;
92 };
93 typedef struct NSM1_UNMONres NSM1_UNMONres;
94
95 struct NSM1_UNMONargs {
96 struct nsm_mon_id mon_id;
97 };
98 typedef struct NSM1_UNMONargs NSM1_UNMONargs;
99
100 struct NSM1_UNMONALLres {
101 int state;
102 };
103 typedef struct NSM1_UNMONALLres NSM1_UNMONALLres;
104
105 struct NSM1_UNMONALLargs {
106 struct nsm_my_id my_id;
107 };
108 typedef struct NSM1_UNMONALLargs NSM1_UNMONALLargs;
109
110 struct NSM1_NOTIFYargs {
111 char *mon_name;
112 int state;
113 };
114 typedef struct NSM1_NOTIFYargs NSM1_NOTIFYargs;
115
116 #define NSM_PROGRAM 100024
117 #define NSM_V1 1
118
119 #if defined(__STDC__) || defined(__cplusplus)
120 #define NSM1_NULL 0
121 extern void * nsm1_null_1(void *, void *);
122 extern void * nsm1_null_1_svc(void *, struct svc_req *);
123 #define NSM1_STAT 1
124 extern struct NSM1_STATres * nsm1_stat_1(struct NSM1_STATargs *, void *);
125 extern struct NSM1_STATres * nsm1_stat_1_svc(struct NSM1_STATargs *, struct svc_req *);
126 #define NSM1_MON 2
127 extern struct NSM1_MONres * nsm1_mon_1(struct NSM1_MONargs *, void *);
128 extern struct NSM1_MONres * nsm1_mon_1_svc(struct NSM1_MONargs *, struct svc_req *);
129 #define NSM1_UNMON 3
130 extern struct NSM1_UNMONres * nsm1_unmon_1(struct NSM1_UNMONargs *, void *);
131 extern struct NSM1_UNMONres * nsm1_unmon_1_svc(struct NSM1_UNMONargs *, struct svc_req *);
132 #define NSM1_UNMON_ALL 4
133 extern struct NSM1_UNMONALLres * nsm1_unmon_all_1(struct NSM1_UNMONALLargs *, void *);
134 extern struct NSM1_UNMONALLres * nsm1_unmon_all_1_svc(struct NSM1_UNMONALLargs *, struct svc_req *);
135 #define NSM1_SIMU_CRASH 5
136 extern void * nsm1_simu_crash_1(void *, void *);
137 extern void * nsm1_simu_crash_1_svc(void *, struct svc_req *);
138 #define NSM1_NOTIFY 6
139 extern void * nsm1_notify_1(struct NSM1_NOTIFYargs *, void *);
140 extern void * nsm1_notify_1_svc(struct NSM1_NOTIFYargs *, struct svc_req *);
141 extern int nsm_program_1_freeresult (void *, zdrproc_t, caddr_t);
142
143 #else /* K&R C */
144 #define NSM1_NULL 0
145 extern void * nsm1_null_1();
146 extern void * nsm1_null_1_svc();
147 #define NSM1_STAT 1
148 extern struct NSM1_STATres * nsm1_stat_1();
149 extern struct NSM1_STATres * nsm1_stat_1_svc();
150 #define NSM1_MON 2
151 extern struct NSM1_MONres * nsm1_mon_1();
152 extern struct NSM1_MONres * nsm1_mon_1_svc();
153 #define NSM1_UNMON 3
154 extern struct NSM1_UNMONres * nsm1_unmon_1();
155 extern struct NSM1_UNMONres * nsm1_unmon_1_svc();
156 #define NSM1_UNMON_ALL 4
157 extern struct NSM1_UNMONALLres * nsm1_unmon_all_1();
158 extern struct NSM1_UNMONALLres * nsm1_unmon_all_1_svc();
159 #define NSM1_SIMU_CRASH 5
160 extern void * nsm1_simu_crash_1();
161 extern void * nsm1_simu_crash_1_svc();
162 #define NSM1_NOTIFY 6
163 extern void * nsm1_notify_1();
164 extern void * nsm1_notify_1_svc();
165 extern int nsm_program_1_freeresult ();
166 #endif /* K&R C */
167
168 /* the zdr functions */
169
170 #if defined(__STDC__) || defined(__cplusplus)
171 extern uint32_t zdr_nsmstat1 (ZDR *, nsmstat1*);
172 extern uint32_t zdr_nsm_my_id (ZDR *, nsm_my_id*);
173 extern uint32_t zdr_nsm_mon_id (ZDR *, nsm_mon_id*);
174 extern uint32_t zdr_NSM1_STATres (ZDR *, NSM1_STATres*);
175 extern uint32_t zdr_NSM1_STATargs (ZDR *, NSM1_STATargs*);
176 extern uint32_t zdr_NSM1_MONres (ZDR *, NSM1_MONres*);
177 extern uint32_t zdr_NSM1_MONargs (ZDR *, NSM1_MONargs*);
178 extern uint32_t zdr_NSM1_UNMONres (ZDR *, NSM1_UNMONres*);
179 extern uint32_t zdr_NSM1_UNMONargs (ZDR *, NSM1_UNMONargs*);
180 extern uint32_t zdr_NSM1_UNMONALLres (ZDR *, NSM1_UNMONALLres*);
181 extern uint32_t zdr_NSM1_UNMONALLargs (ZDR *, NSM1_UNMONALLargs*);
182 extern uint32_t zdr_NSM1_NOTIFYargs (ZDR *, NSM1_NOTIFYargs*);
183
184 #else /* K&R C */
185 extern uint32_t zdr_nsmstat1 ();
186 extern uint32_t zdr_nsm_my_id ();
187 extern uint32_t zdr_nsm_mon_id ();
188 extern uint32_t zdr_NSM1_STATres ();
189 extern uint32_t zdr_NSM1_STATargs ();
190 extern uint32_t zdr_NSM1_MONres ();
191 extern uint32_t zdr_NSM1_MONargs ();
192 extern uint32_t zdr_NSM1_UNMONres ();
193 extern uint32_t zdr_NSM1_UNMONargs ();
194 extern uint32_t zdr_NSM1_UNMONALLres ();
195 extern uint32_t zdr_NSM1_UNMONALLargs ();
196 extern uint32_t zdr_NSM1_NOTIFYargs ();
197
198 #endif /* K&R C */
199
200 #ifdef __cplusplus
201 }
202 #endif
203
204 #endif /* !_NSM_H_RPCGEN */