| 1 | /* |
| 2 | * NSM definitions from: |
| 3 | * Protocols for Interworking: XNFS, Version 3W |
| 4 | * http://pubs.opengroup.org/onlinepubs/9629799/chap11.htm |
| 5 | * |
| 6 | * Symbols then massaged to avoid too much namespace pollution |
| 7 | * and to bring more inline with convention in nlm. |
| 8 | */ |
| 9 | |
| 10 | /* |
| 11 | * This defines the maximum length of the string |
| 12 | * identifying the caller. |
| 13 | */ |
| 14 | const NSM_MAXSTRLEN = 1024; |
| 15 | |
| 16 | struct nsm_name { |
| 17 | string mon_name<NSM_MAXSTRLEN>; |
| 18 | }; |
| 19 | |
| 20 | enum nsmstat1 { |
| 21 | NSM_STAT_SUCC = 0, /* NSM agrees to monitor. */ |
| 22 | NSM_STAT_FAIL = 1 /* NSM cannot monitor. */ |
| 23 | }; |
| 24 | |
| 25 | struct nsm_stat_res { |
| 26 | nsmstat1 res; |
| 27 | int state; |
| 28 | }; |
| 29 | |
| 30 | struct nsm_stat { |
| 31 | int state; /* state number of NSM */ |
| 32 | }; |
| 33 | |
| 34 | struct nsm_my_id { |
| 35 | string my_name<NSM_MAXSTRLEN>; /* hostname */ |
| 36 | int my_prog; /* RPC program number */ |
| 37 | int my_vers; /* program version number */ |
| 38 | int my_proc; /* procedure number */ |
| 39 | }; |
| 40 | |
| 41 | struct nsm_mon_id { |
| 42 | string mon_name<NSM_MAXSTRLEN>; /* name of the host to be monitored */ |
| 43 | struct nsm_my_id my_id; |
| 44 | }; |
| 45 | |
| 46 | struct nsm_mon { |
| 47 | struct nsm_mon_id mon_id; |
| 48 | opaque priv[16]; /* private information */ |
| 49 | }; |
| 50 | |
| 51 | struct nsm_stat_chg { |
| 52 | string mon_name<NSM_MAXSTRLEN>; |
| 53 | int state; |
| 54 | }; |
| 55 | |
| 56 | /* |
| 57 | * Protocol description for the NSM program. |
| 58 | */ |
| 59 | program NSM_PROGRAM { |
| 60 | version NSM_V1 { |
| 61 | void NSM1_NULL(void) = 0; |
| 62 | struct nsm_stat_res NSM1_STAT(struct nsm_name) = 1; |
| 63 | struct nsm_stat_res NSM1_MON(struct nsm_mon) = 2; |
| 64 | struct nsm_stat NSM1_UNMON(struct nsm_mon_id) = 3; |
| 65 | struct nsm_stat NSM1_UNMON_ALL(struct nsm_my_id) = 4; |
| 66 | void NSM1_SIMU_CRASH(void) = 5; |
| 67 | void NSM1_NOTIFY(struct nsm_stat_chg) = 6; |
| 68 | } = 1; |
| 69 | } = 100024; |
| 70 | |
| 71 | |