From 9819fcedf10f1430d4969c86e6df4dfe975b7dcf Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 22 Apr 2014 13:27:35 -0700 Subject: rpcgen: Remove autogenerated files instead build on demand Avoid modifying autogenerated files and keeping them in repository - autogenerate them on demand from ".x" files Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6 BUG: 1090807 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/7526 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Anand Avati --- rpc/xdr/src/nlm4-xdr.x | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 rpc/xdr/src/nlm4-xdr.x (limited to 'rpc/xdr/src/nlm4-xdr.x') diff --git a/rpc/xdr/src/nlm4-xdr.x b/rpc/xdr/src/nlm4-xdr.x new file mode 100644 index 00000000000..e2be3b7f0f7 --- /dev/null +++ b/rpc/xdr/src/nlm4-xdr.x @@ -0,0 +1,160 @@ +/* + Copyright (c) 2007-2012 Red Hat, Inc. + This file is part of GlusterFS. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + +/* .x file defined as according to the RFC */ + +const MAXNETOBJ_SZ = 1024; +const LM_MAXSTRLEN = 1024; +const MAXNAMELEN = 1025; + +typedef opaque nlm4_netobj; + +#ifdef RPC_HDR +%/* +% * The following enums are actually bit encoded for efficient +% * boolean algebra.... DON'T change them..... +% */ +#endif +enum fsh_mode { + fsm_DN = 0, /* deny none */ + fsm_DR = 1, /* deny read */ + fsm_DW = 2, /* deny write */ + fsm_DRW = 3 /* deny read/write */ +}; + +enum fsh_access { + fsa_NONE = 0, /* for completeness */ + fsa_R = 1, /* read only */ + fsa_W = 2, /* write only */ + fsa_RW = 3 /* read/write */ +}; + +#ifdef RPC_HDR +%/* definitions for NLM version 4 */ +#endif +enum nlm4_stats { + nlm4_granted = 0, + nlm4_denied = 1, + nlm4_denied_nolock = 2, + nlm4_blocked = 3, + nlm4_denied_grace_period = 4, + nlm4_deadlck = 5, + nlm4_rofs = 6, + nlm4_stale_fh = 7, + nlm4_fbig = 8, + nlm4_failed = 9 +}; + +struct nlm4_stat { + nlm4_stats stat; +}; + +struct nlm4_holder { + bool exclusive; + u_int32_t svid; + nlm4_netobj oh; + u_int64_t l_offset; + u_int64_t l_len; +}; + +struct nlm4_lock { + string caller_name; + nlm4_netobj fh; + nlm4_netobj oh; + u_int32_t svid; + u_int64_t l_offset; + u_int64_t l_len; +}; + +struct nlm4_share { + string caller_name; + nlm4_netobj fh; + nlm4_netobj oh; + fsh_mode mode; + fsh_access access; +}; + +union nlm4_testrply switch (nlm4_stats stat) { + case nlm4_denied: + struct nlm4_holder holder; + default: + void; +}; + +struct nlm4_testres { + nlm4_netobj cookie; + nlm4_testrply stat; +}; + +struct nlm4_testargs { + nlm4_netobj cookie; + bool exclusive; + struct nlm4_lock alock; +}; + +struct nlm4_res { + nlm4_netobj cookie; + nlm4_stat stat; +}; + +struct nlm4_lockargs { + nlm4_netobj cookie; + bool block; + bool exclusive; + struct nlm4_lock alock; + bool reclaim; /* used for recovering locks */ + int32_t state; /* specify local status monitor state */ +}; + +struct nlm4_cancargs { + nlm4_netobj cookie; + bool block; + bool exclusive; + struct nlm4_lock alock; +}; + +struct nlm4_unlockargs { + nlm4_netobj cookie; + struct nlm4_lock alock; +}; + +struct nlm4_shareargs { + nlm4_netobj cookie; + nlm4_share share; + bool reclaim; +}; + +struct nlm4_shareres { + nlm4_netobj cookie; + nlm4_stats stat; + int32_t sequence; +}; + +struct nlm4_freeallargs { + string name; /* client hostname */ + uint32_t state; /* unused */ +}; + +/* + * argument for the procedure called by rpc.statd when a monitored host + * status change. + * XXX assumes LM_MAXSTRLEN == SM_MAXSTRLEN + */ +struct nlm_sm_status { + string mon_name; /* name of host */ + int state; /* new state */ + opaque priv[16]; /* private data */ +}; + +program NLMCBK_PROGRAM { + version NLMCBK_V1 { + void NLMCBK_SM_NOTIFY(struct nlm_sm_status) = 16; + } = 1; +} = 100021; -- cgit