Initial support for NSM
[deb_libnfs.git] / nsm / libnfs-raw-nsm.h
1 /*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5
6 #ifndef _NSM_H_RPCGEN
7 #define _NSM_H_RPCGEN
8
9
10
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #define NSM_MAXSTRLEN 1024
17
18 struct nsm_name {
19 char *mon_name;
20 };
21 typedef struct nsm_name nsm_name;
22
23 enum nsmstat1 {
24 NSM_STAT_SUCC = 0,
25 NSM_STAT_FAIL = 1,
26 };
27 typedef enum nsmstat1 nsmstat1;
28
29 struct nsm_stat_res {
30 nsmstat1 res;
31 int state;
32 };
33 typedef struct nsm_stat_res nsm_stat_res;
34
35 struct nsm_stat {
36 int state;
37 };
38 typedef struct nsm_stat nsm_stat;
39
40 struct nsm_my_id {
41 char *my_name;
42 int my_prog;
43 int my_vers;
44 int my_proc;
45 };
46 typedef struct nsm_my_id nsm_my_id;
47
48 struct nsm_mon_id {
49 char *mon_name;
50 struct nsm_my_id my_id;
51 };
52 typedef struct nsm_mon_id nsm_mon_id;
53
54 struct nsm_mon {
55 struct nsm_mon_id mon_id;
56 char priv[16];
57 };
58 typedef struct nsm_mon nsm_mon;
59
60 struct nsm_stat_chg {
61 char *mon_name;
62 int state;
63 };
64 typedef struct nsm_stat_chg nsm_stat_chg;
65
66 #define NSM_PROGRAM 100024
67 #define NSM_V1 1
68
69 #if defined(__STDC__) || defined(__cplusplus)
70 #define NSM1_NULL 0
71 extern void * nsm1_null_1(void *, CLIENT *);
72 extern void * nsm1_null_1_svc(void *, struct svc_req *);
73 #define NSM1_STAT 1
74 extern struct nsm_stat_res * nsm1_stat_1(struct nsm_name *, CLIENT *);
75 extern struct nsm_stat_res * nsm1_stat_1_svc(struct nsm_name *, struct svc_req *);
76 #define NSM1_MON 2
77 extern struct nsm_stat_res * nsm1_mon_1(struct nsm_mon *, CLIENT *);
78 extern struct nsm_stat_res * nsm1_mon_1_svc(struct nsm_mon *, struct svc_req *);
79 #define NSM1_UNMON 3
80 extern struct nsm_stat * nsm1_unmon_1(struct nsm_mon_id *, CLIENT *);
81 extern struct nsm_stat * nsm1_unmon_1_svc(struct nsm_mon_id *, struct svc_req *);
82 #define NSM1_UNMON_ALL 4
83 extern struct nsm_stat * nsm1_unmon_all_1(struct nsm_my_id *, CLIENT *);
84 extern struct nsm_stat * nsm1_unmon_all_1_svc(struct nsm_my_id *, struct svc_req *);
85 #define NSM1_SIMU_CRASH 5
86 extern void * nsm1_simu_crash_1(void *, CLIENT *);
87 extern void * nsm1_simu_crash_1_svc(void *, struct svc_req *);
88 #define NSM1_NOTIFY 6
89 extern void * nsm1_notify_1(struct nsm_stat_chg *, CLIENT *);
90 extern void * nsm1_notify_1_svc(struct nsm_stat_chg *, struct svc_req *);
91 extern int nsm_program_1_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
92
93 #else /* K&R C */
94 #define NSM1_NULL 0
95 extern void * nsm1_null_1();
96 extern void * nsm1_null_1_svc();
97 #define NSM1_STAT 1
98 extern struct nsm_stat_res * nsm1_stat_1();
99 extern struct nsm_stat_res * nsm1_stat_1_svc();
100 #define NSM1_MON 2
101 extern struct nsm_stat_res * nsm1_mon_1();
102 extern struct nsm_stat_res * nsm1_mon_1_svc();
103 #define NSM1_UNMON 3
104 extern struct nsm_stat * nsm1_unmon_1();
105 extern struct nsm_stat * nsm1_unmon_1_svc();
106 #define NSM1_UNMON_ALL 4
107 extern struct nsm_stat * nsm1_unmon_all_1();
108 extern struct nsm_stat * nsm1_unmon_all_1_svc();
109 #define NSM1_SIMU_CRASH 5
110 extern void * nsm1_simu_crash_1();
111 extern void * nsm1_simu_crash_1_svc();
112 #define NSM1_NOTIFY 6
113 extern void * nsm1_notify_1();
114 extern void * nsm1_notify_1_svc();
115 extern int nsm_program_1_freeresult ();
116 #endif /* K&R C */
117
118 /* the zdr functions */
119
120 #if defined(__STDC__) || defined(__cplusplus)
121 extern bool_t zdr_nsm_name (ZDR *, nsm_name*);
122 extern bool_t zdr_nsmstat1 (ZDR *, nsmstat1*);
123 extern bool_t zdr_nsm_stat_res (ZDR *, nsm_stat_res*);
124 extern bool_t zdr_nsm_stat (ZDR *, nsm_stat*);
125 extern bool_t zdr_nsm_my_id (ZDR *, nsm_my_id*);
126 extern bool_t zdr_nsm_mon_id (ZDR *, nsm_mon_id*);
127 extern bool_t zdr_nsm_mon (ZDR *, nsm_mon*);
128 extern bool_t zdr_nsm_stat_chg (ZDR *, nsm_stat_chg*);
129
130 #else /* K&R C */
131 extern bool_t zdr_nsm_name ();
132 extern bool_t zdr_nsmstat1 ();
133 extern bool_t zdr_nsm_stat_res ();
134 extern bool_t zdr_nsm_stat ();
135 extern bool_t zdr_nsm_my_id ();
136 extern bool_t zdr_nsm_mon_id ();
137 extern bool_t zdr_nsm_mon ();
138 extern bool_t zdr_nsm_stat_chg ();
139
140 #endif /* K&R C */
141
142 #ifdef __cplusplus
143 }
144 #endif
145
146 #endif /* !_NSM_H_RPCGEN */