]> git.decadent.org.uk Git - nfs-utils.git/blob - tests/nsm_client/nlm_sm_inter.x
nfs-utils: introduce new statd testing simulator
[nfs-utils.git] / tests / nsm_client / nlm_sm_inter.x
1 /*
2  * Copyright (C) 1995, 1997-1999 Jeffrey A. Uphoff
3  * Modified by Olaf Kirch, 1996.
4  * Modified by H.J. Lu, 1998.
5  * Modified by Jeff Layton, 2010.
6  *
7  * NLM similator for Linux
8  */
9
10 #ifdef RPC_CLNT
11 %#include <string.h>
12 #endif
13
14 /*
15  * statd rejects monitor registrations for any non-lockd services, so pretend
16  * to be lockd when testing. Furthermore, the only call we care about from
17  * statd is #16, which is the downcall to notify the kernel of a host's status
18  * change.
19  */
20 program NLM_SM_PROG {
21         /* version 3 of the NLM protocol */
22         version NLM_SM_VERS3 {
23                 void     NLM_SM_NOTIFY(struct nlm_sm_notify) = 16;
24         } = 3;
25
26         /* version 2 of NLM protocol */
27         version NLM_SM_VERS4 {
28                 void     NLM_SM_NOTIFY(struct nlm_sm_notify) = 16;
29         } = 4;
30 } = 100021;
31
32 const  SM_MAXSTRLEN = 1024;
33 const  SM_PRIV_SIZE = 16;
34
35 /*
36  * structure of the status message sent back by the status monitor
37  * when monitor site status changes
38  */
39 struct nlm_sm_notify {
40         string mon_name<SM_MAXSTRLEN>;
41         int state;
42         opaque priv[SM_PRIV_SIZE]; /* stored private information */
43 };