nlm_prot.x
001: 
002: 
003: 
004: 
005: 
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: 
022: 
023: 
024: 
025: 
026: 
027: 
028: 
029: 
030: 
031: 
032: 
033: 
034: 
035: 
036: #ifdef RPC_HDR
037: %#define LM_MAXSTRLEN   1024
038: %#define MAXNAMELEN     LM_MAXSTRLEN+1
039: #endif
040: 
041: 
042: 
043: 
044: enum nlm_stats {
045:         nlm_granted = 0,
046:         nlm_denied = 1,
047:         nlm_denied_nolocks = 2,
048:         nlm_blocked = 3,
049:         nlm_denied_grace_period = 4
050: };
051: 
052: struct nlm_holder {
053:         bool exclusive;
054:         int svid;
055:         netobj oh;
056:         unsigned l_offset;
057:         unsigned l_len;
058: };
059: 
060: union nlm_testrply switch (nlm_stats stat) {
061:         case nlm_denied:
062:                 struct nlm_holder holder;
063:         default:
064:                 void;
065: };
066: 
067: struct nlm_stat {
068:         nlm_stats stat;
069: };
070: 
071: struct nlm_res {
072:         netobj cookie;
073:         nlm_stat stat;
074: };
075: 
076: struct nlm_testres {
077:         netobj cookie;
078:         nlm_testrply stat;
079: };
080: 
081: struct nlm_lock {
082:         string caller_name<LM_MAXSTRLEN>;
083:         netobj fh;              
084:         netobj oh;              
085:         int svid;               
086:         unsigned l_offset;
087:         unsigned l_len;
088: };
089: 
090: struct nlm_lockargs {
091:         netobj cookie;
092:         bool block;
093:         bool exclusive;
094:         struct nlm_lock alock;
095:         bool reclaim;           
096:         int state;              
097: };
098: 
099: struct nlm_cancargs {
100:         netobj cookie;
101:         bool block;
102:         bool exclusive;
103:         struct nlm_lock alock;
104: };
105: 
106: struct nlm_testargs {
107:         netobj cookie;
108:         bool exclusive;
109:         struct nlm_lock alock;
110: };
111: 
112: struct nlm_unlockargs {
113:         netobj cookie;
114:         struct nlm_lock alock;
115: };
116: 
117: 
118: #ifdef RPC_HDR
119: %
120: 
121: 
122: 
123: #endif
124: enum    fsh_mode {
125:         fsm_DN  = 0,    
126:         fsm_DR  = 1,    
127:         fsm_DW  = 2,    
128:         fsm_DRW = 3     
129: };
130: 
131: enum    fsh_access {
132:         fsa_NONE = 0,   
133:         fsa_R    = 1,   
134:         fsa_W    = 2,   
135:         fsa_RW   = 3    
136: };
137: 
138: struct  nlm_share {
139:         string caller_name<LM_MAXSTRLEN>;
140:         netobj  fh;
141:         netobj  oh;
142:         fsh_mode        mode;
143:         fsh_access      access;
144: };
145: 
146: struct  nlm_shareargs {
147:         netobj  cookie;
148:         nlm_share       share;
149:         bool    reclaim;
150: };
151: 
152: struct  nlm_shareres {
153:         netobj  cookie;
154:         nlm_stats       stat;
155:         int     sequence;
156: };
157: 
158: struct  nlm_notify {
159:         string name<MAXNAMELEN>;
160:         long state;
161: };
162: 
163: 
164: 
165: 
166: 
167: program NLM_PROG {
168:         version NLM_VERS {
169: 
170:                 nlm_testres     NLM_TEST(struct nlm_testargs) = 1;
171: 
172:                 nlm_res         NLM_LOCK(struct nlm_lockargs) = 2;
173: 
174:                 nlm_res         NLM_CANCEL(struct nlm_cancargs) = 3;
175:                 nlm_res         NLM_UNLOCK(struct nlm_unlockargs) =     4;
176: 
177:                 
178: 
179: 
180:                 nlm_res         NLM_GRANTED(struct nlm_testargs)= 5;
181:                 
182: 
183: 
184:                 void            NLM_TEST_MSG(struct nlm_testargs) = 6;
185:                 void            NLM_LOCK_MSG(struct nlm_lockargs) = 7;
186:                 void            NLM_CANCEL_MSG(struct nlm_cancargs) =8;
187:                 void            NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9;
188:                 void            NLM_GRANTED_MSG(struct nlm_testargs) = 10;
189:                 void            NLM_TEST_RES(nlm_testres) = 11;
190:                 void            NLM_LOCK_RES(nlm_res) = 12;
191:                 void            NLM_CANCEL_RES(nlm_res) = 13;
192:                 void            NLM_UNLOCK_RES(nlm_res) = 14;
193:                 void            NLM_GRANTED_RES(nlm_res) = 15;
194:         } = 1;
195: 
196:         version NLM_VERSX {
197:                 nlm_shareres    NLM_SHARE(nlm_shareargs) = 20;
198:                 nlm_shareres    NLM_UNSHARE(nlm_shareargs) = 21;
199:                 nlm_res         NLM_NM_LOCK(nlm_lockargs) = 22;
200:                 void            NLM_FREE_ALL(nlm_notify) = 23;
201:         } = 3;
202: 
203: } = 100021;
204: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved