Home | History | Annotate | Download | only in rpcsvc
      1 /*
      2  * Please do not edit this file.
      3  * It was generated using rpcgen.
      4  */
      5 
      6 #ifndef _NLM_PROT_H_RPCGEN
      7 #define _NLM_PROT_H_RPCGEN
      8 
      9 #include <rpc/rpc.h>
     10 
     11 
     12 #ifdef __cplusplus
     13 extern "C" {
     14 #endif
     15 
     16 #define LM_MAXSTRLEN 1024
     17 #define MAXNAMELEN LM_MAXSTRLEN+1
     18 
     19 enum nlm_stats {
     20 	nlm_granted = 0,
     21 	nlm_denied = 1,
     22 	nlm_denied_nolocks = 2,
     23 	nlm_blocked = 3,
     24 	nlm_denied_grace_period = 4,
     25 };
     26 typedef enum nlm_stats nlm_stats;
     27 
     28 struct nlm_holder {
     29 	bool_t exclusive;
     30 	int svid;
     31 	netobj oh;
     32 	u_int l_offset;
     33 	u_int l_len;
     34 };
     35 typedef struct nlm_holder nlm_holder;
     36 
     37 struct nlm_testrply {
     38 	nlm_stats stat;
     39 	union {
     40 		struct nlm_holder holder;
     41 	} nlm_testrply_u;
     42 };
     43 typedef struct nlm_testrply nlm_testrply;
     44 
     45 struct nlm_stat {
     46 	nlm_stats stat;
     47 };
     48 typedef struct nlm_stat nlm_stat;
     49 
     50 struct nlm_res {
     51 	netobj cookie;
     52 	nlm_stat stat;
     53 };
     54 typedef struct nlm_res nlm_res;
     55 
     56 struct nlm_testres {
     57 	netobj cookie;
     58 	nlm_testrply stat;
     59 };
     60 typedef struct nlm_testres nlm_testres;
     61 
     62 struct nlm_lock {
     63 	char *caller_name;
     64 	netobj fh;
     65 	netobj oh;
     66 	int svid;
     67 	u_int l_offset;
     68 	u_int l_len;
     69 };
     70 typedef struct nlm_lock nlm_lock;
     71 
     72 struct nlm_lockargs {
     73 	netobj cookie;
     74 	bool_t block;
     75 	bool_t exclusive;
     76 	struct nlm_lock alock;
     77 	bool_t reclaim;
     78 	int state;
     79 };
     80 typedef struct nlm_lockargs nlm_lockargs;
     81 
     82 struct nlm_cancargs {
     83 	netobj cookie;
     84 	bool_t block;
     85 	bool_t exclusive;
     86 	struct nlm_lock alock;
     87 };
     88 typedef struct nlm_cancargs nlm_cancargs;
     89 
     90 struct nlm_testargs {
     91 	netobj cookie;
     92 	bool_t exclusive;
     93 	struct nlm_lock alock;
     94 };
     95 typedef struct nlm_testargs nlm_testargs;
     96 
     97 struct nlm_unlockargs {
     98 	netobj cookie;
     99 	struct nlm_lock alock;
    100 };
    101 typedef struct nlm_unlockargs nlm_unlockargs;
    102 /*
    103  * The following enums are actually bit encoded for efficient
    104  * boolean algebra.... DON'T change them.....
    105  */
    106 
    107 enum fsh_mode {
    108 	fsm_DN = 0,
    109 	fsm_DR = 1,
    110 	fsm_DW = 2,
    111 	fsm_DRW = 3,
    112 };
    113 typedef enum fsh_mode fsh_mode;
    114 
    115 enum fsh_access {
    116 	fsa_NONE = 0,
    117 	fsa_R = 1,
    118 	fsa_W = 2,
    119 	fsa_RW = 3,
    120 };
    121 typedef enum fsh_access fsh_access;
    122 
    123 struct nlm_share {
    124 	char *caller_name;
    125 	netobj fh;
    126 	netobj oh;
    127 	fsh_mode mode;
    128 	fsh_access access;
    129 };
    130 typedef struct nlm_share nlm_share;
    131 
    132 struct nlm_shareargs {
    133 	netobj cookie;
    134 	nlm_share share;
    135 	bool_t reclaim;
    136 };
    137 typedef struct nlm_shareargs nlm_shareargs;
    138 
    139 struct nlm_shareres {
    140 	netobj cookie;
    141 	nlm_stats stat;
    142 	int sequence;
    143 };
    144 typedef struct nlm_shareres nlm_shareres;
    145 
    146 struct nlm_notify {
    147 	char *name;
    148 	long state;
    149 };
    150 typedef struct nlm_notify nlm_notify;
    151 
    152 #define NLM_PROG 100021
    153 #define NLM_VERS 1
    154 
    155 #if defined(__STDC__) || defined(__cplusplus)
    156 #define NLM_TEST 1
    157 extern  nlm_testres * nlm_test_1(struct nlm_testargs *, CLIENT *);
    158 extern  nlm_testres * nlm_test_1_svc(struct nlm_testargs *, struct svc_req *);
    159 #define NLM_LOCK 2
    160 extern  nlm_res * nlm_lock_1(struct nlm_lockargs *, CLIENT *);
    161 extern  nlm_res * nlm_lock_1_svc(struct nlm_lockargs *, struct svc_req *);
    162 #define NLM_CANCEL 3
    163 extern  nlm_res * nlm_cancel_1(struct nlm_cancargs *, CLIENT *);
    164 extern  nlm_res * nlm_cancel_1_svc(struct nlm_cancargs *, struct svc_req *);
    165 #define NLM_UNLOCK 4
    166 extern  nlm_res * nlm_unlock_1(struct nlm_unlockargs *, CLIENT *);
    167 extern  nlm_res * nlm_unlock_1_svc(struct nlm_unlockargs *, struct svc_req *);
    168 #define NLM_GRANTED 5
    169 extern  nlm_res * nlm_granted_1(struct nlm_testargs *, CLIENT *);
    170 extern  nlm_res * nlm_granted_1_svc(struct nlm_testargs *, struct svc_req *);
    171 #define NLM_TEST_MSG 6
    172 extern  void * nlm_test_msg_1(struct nlm_testargs *, CLIENT *);
    173 extern  void * nlm_test_msg_1_svc(struct nlm_testargs *, struct svc_req *);
    174 #define NLM_LOCK_MSG 7
    175 extern  void * nlm_lock_msg_1(struct nlm_lockargs *, CLIENT *);
    176 extern  void * nlm_lock_msg_1_svc(struct nlm_lockargs *, struct svc_req *);
    177 #define NLM_CANCEL_MSG 8
    178 extern  void * nlm_cancel_msg_1(struct nlm_cancargs *, CLIENT *);
    179 extern  void * nlm_cancel_msg_1_svc(struct nlm_cancargs *, struct svc_req *);
    180 #define NLM_UNLOCK_MSG 9
    181 extern  void * nlm_unlock_msg_1(struct nlm_unlockargs *, CLIENT *);
    182 extern  void * nlm_unlock_msg_1_svc(struct nlm_unlockargs *, struct svc_req *);
    183 #define NLM_GRANTED_MSG 10
    184 extern  void * nlm_granted_msg_1(struct nlm_testargs *, CLIENT *);
    185 extern  void * nlm_granted_msg_1_svc(struct nlm_testargs *, struct svc_req *);
    186 #define NLM_TEST_RES 11
    187 extern  void * nlm_test_res_1(nlm_testres *, CLIENT *);
    188 extern  void * nlm_test_res_1_svc(nlm_testres *, struct svc_req *);
    189 #define NLM_LOCK_RES 12
    190 extern  void * nlm_lock_res_1(nlm_res *, CLIENT *);
    191 extern  void * nlm_lock_res_1_svc(nlm_res *, struct svc_req *);
    192 #define NLM_CANCEL_RES 13
    193 extern  void * nlm_cancel_res_1(nlm_res *, CLIENT *);
    194 extern  void * nlm_cancel_res_1_svc(nlm_res *, struct svc_req *);
    195 #define NLM_UNLOCK_RES 14
    196 extern  void * nlm_unlock_res_1(nlm_res *, CLIENT *);
    197 extern  void * nlm_unlock_res_1_svc(nlm_res *, struct svc_req *);
    198 #define NLM_GRANTED_RES 15
    199 extern  void * nlm_granted_res_1(nlm_res *, CLIENT *);
    200 extern  void * nlm_granted_res_1_svc(nlm_res *, struct svc_req *);
    201 extern int nlm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
    202 
    203 #else /* K&R C */
    204 #define NLM_TEST 1
    205 extern  nlm_testres * nlm_test_1();
    206 extern  nlm_testres * nlm_test_1_svc();
    207 #define NLM_LOCK 2
    208 extern  nlm_res * nlm_lock_1();
    209 extern  nlm_res * nlm_lock_1_svc();
    210 #define NLM_CANCEL 3
    211 extern  nlm_res * nlm_cancel_1();
    212 extern  nlm_res * nlm_cancel_1_svc();
    213 #define NLM_UNLOCK 4
    214 extern  nlm_res * nlm_unlock_1();
    215 extern  nlm_res * nlm_unlock_1_svc();
    216 #define NLM_GRANTED 5
    217 extern  nlm_res * nlm_granted_1();
    218 extern  nlm_res * nlm_granted_1_svc();
    219 #define NLM_TEST_MSG 6
    220 extern  void * nlm_test_msg_1();
    221 extern  void * nlm_test_msg_1_svc();
    222 #define NLM_LOCK_MSG 7
    223 extern  void * nlm_lock_msg_1();
    224 extern  void * nlm_lock_msg_1_svc();
    225 #define NLM_CANCEL_MSG 8
    226 extern  void * nlm_cancel_msg_1();
    227 extern  void * nlm_cancel_msg_1_svc();
    228 #define NLM_UNLOCK_MSG 9
    229 extern  void * nlm_unlock_msg_1();
    230 extern  void * nlm_unlock_msg_1_svc();
    231 #define NLM_GRANTED_MSG 10
    232 extern  void * nlm_granted_msg_1();
    233 extern  void * nlm_granted_msg_1_svc();
    234 #define NLM_TEST_RES 11
    235 extern  void * nlm_test_res_1();
    236 extern  void * nlm_test_res_1_svc();
    237 #define NLM_LOCK_RES 12
    238 extern  void * nlm_lock_res_1();
    239 extern  void * nlm_lock_res_1_svc();
    240 #define NLM_CANCEL_RES 13
    241 extern  void * nlm_cancel_res_1();
    242 extern  void * nlm_cancel_res_1_svc();
    243 #define NLM_UNLOCK_RES 14
    244 extern  void * nlm_unlock_res_1();
    245 extern  void * nlm_unlock_res_1_svc();
    246 #define NLM_GRANTED_RES 15
    247 extern  void * nlm_granted_res_1();
    248 extern  void * nlm_granted_res_1_svc();
    249 extern int nlm_prog_1_freeresult ();
    250 #endif /* K&R C */
    251 #define NLM_VERSX 3
    252 
    253 #if defined(__STDC__) || defined(__cplusplus)
    254 #define NLM_SHARE 20
    255 extern  nlm_shareres * nlm_share_3(nlm_shareargs *, CLIENT *);
    256 extern  nlm_shareres * nlm_share_3_svc(nlm_shareargs *, struct svc_req *);
    257 #define NLM_UNSHARE 21
    258 extern  nlm_shareres * nlm_unshare_3(nlm_shareargs *, CLIENT *);
    259 extern  nlm_shareres * nlm_unshare_3_svc(nlm_shareargs *, struct svc_req *);
    260 #define NLM_NM_LOCK 22
    261 extern  nlm_res * nlm_nm_lock_3(nlm_lockargs *, CLIENT *);
    262 extern  nlm_res * nlm_nm_lock_3_svc(nlm_lockargs *, struct svc_req *);
    263 #define NLM_FREE_ALL 23
    264 extern  void * nlm_free_all_3(nlm_notify *, CLIENT *);
    265 extern  void * nlm_free_all_3_svc(nlm_notify *, struct svc_req *);
    266 extern int nlm_prog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
    267 
    268 #else /* K&R C */
    269 #define NLM_SHARE 20
    270 extern  nlm_shareres * nlm_share_3();
    271 extern  nlm_shareres * nlm_share_3_svc();
    272 #define NLM_UNSHARE 21
    273 extern  nlm_shareres * nlm_unshare_3();
    274 extern  nlm_shareres * nlm_unshare_3_svc();
    275 #define NLM_NM_LOCK 22
    276 extern  nlm_res * nlm_nm_lock_3();
    277 extern  nlm_res * nlm_nm_lock_3_svc();
    278 #define NLM_FREE_ALL 23
    279 extern  void * nlm_free_all_3();
    280 extern  void * nlm_free_all_3_svc();
    281 extern int nlm_prog_3_freeresult ();
    282 #endif /* K&R C */
    283 
    284 /* the xdr functions */
    285 
    286 #if defined(__STDC__) || defined(__cplusplus)
    287 extern  bool_t xdr_nlm_stats (XDR *, nlm_stats*);
    288 extern  bool_t xdr_nlm_holder (XDR *, nlm_holder*);
    289 extern  bool_t xdr_nlm_testrply (XDR *, nlm_testrply*);
    290 extern  bool_t xdr_nlm_stat (XDR *, nlm_stat*);
    291 extern  bool_t xdr_nlm_res (XDR *, nlm_res*);
    292 extern  bool_t xdr_nlm_testres (XDR *, nlm_testres*);
    293 extern  bool_t xdr_nlm_lock (XDR *, nlm_lock*);
    294 extern  bool_t xdr_nlm_lockargs (XDR *, nlm_lockargs*);
    295 extern  bool_t xdr_nlm_cancargs (XDR *, nlm_cancargs*);
    296 extern  bool_t xdr_nlm_testargs (XDR *, nlm_testargs*);
    297 extern  bool_t xdr_nlm_unlockargs (XDR *, nlm_unlockargs*);
    298 extern  bool_t xdr_fsh_mode (XDR *, fsh_mode*);
    299 extern  bool_t xdr_fsh_access (XDR *, fsh_access*);
    300 extern  bool_t xdr_nlm_share (XDR *, nlm_share*);
    301 extern  bool_t xdr_nlm_shareargs (XDR *, nlm_shareargs*);
    302 extern  bool_t xdr_nlm_shareres (XDR *, nlm_shareres*);
    303 extern  bool_t xdr_nlm_notify (XDR *, nlm_notify*);
    304 
    305 #else /* K&R C */
    306 extern bool_t xdr_nlm_stats ();
    307 extern bool_t xdr_nlm_holder ();
    308 extern bool_t xdr_nlm_testrply ();
    309 extern bool_t xdr_nlm_stat ();
    310 extern bool_t xdr_nlm_res ();
    311 extern bool_t xdr_nlm_testres ();
    312 extern bool_t xdr_nlm_lock ();
    313 extern bool_t xdr_nlm_lockargs ();
    314 extern bool_t xdr_nlm_cancargs ();
    315 extern bool_t xdr_nlm_testargs ();
    316 extern bool_t xdr_nlm_unlockargs ();
    317 extern bool_t xdr_fsh_mode ();
    318 extern bool_t xdr_fsh_access ();
    319 extern bool_t xdr_nlm_share ();
    320 extern bool_t xdr_nlm_shareargs ();
    321 extern bool_t xdr_nlm_shareres ();
    322 extern bool_t xdr_nlm_notify ();
    323 
    324 #endif /* K&R C */
    325 
    326 #ifdef __cplusplus
    327 }
    328 #endif
    329 
    330 #endif /* !_NLM_PROT_H_RPCGEN */
    331