Print this page
195 Need replacement for nfs/lockd+klm
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/rpcsvc/sm_inter.x
+++ new/usr/src/uts/common/rpcsvc/sm_inter.x
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 %/*
23 23 % * Copyright (c) 1986, 1994 by Sun Microsystems, Inc.
24 24 % * All rights reserved.
25 25 % */
26 26
27 27 %/* from sm_inter.x */
28 28
29 -#ifdef RPC_HDR
30 -%
31 -%#pragma ident "%Z%%M% %I% %E% SMI"
32 -%
33 -#endif
34 -
35 29 /*
36 30 * Status monitor protocol specification
37 31 */
38 32
39 33 program SM_PROG {
40 34 version SM_VERS {
41 35 /* res_stat = stat_succ if status monitor agrees to monitor */
42 36 /* res_stat = stat_fail if status monitor cannot monitor */
43 37 /* if res_stat == stat_succ, state = state number of site */
44 38 /* sm_name */
45 39 struct sm_stat_res SM_STAT(struct sm_name) = 1;
46 40
47 41 /* res_stat = stat_succ if status monitor agrees to monitor */
48 42 /* res_stat = stat_fail if status monitor cannot monitor */
49 43 /* stat consists of state number of local site */
50 44 struct sm_stat_res SM_MON(struct mon) = 2;
51 45
52 46 /* stat consists of state number of local site */
53 47 struct sm_stat SM_UNMON(struct mon_id) = 3;
54 48
55 49 /* stat consists of state number of local site */
56 50 struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
57 51
58 52 void SM_SIMU_CRASH(void) = 5;
59 53
60 54 void SM_NOTIFY(struct stat_chge) = 6;
61 55 } = 1;
62 56 } = 100024;
63 57
64 58 const SM_MAXSTRLEN = 1024;
65 59
66 60 struct sm_name {
67 61 string mon_name<SM_MAXSTRLEN>;
68 62 };
69 63
70 64 struct my_id {
71 65 string my_name<SM_MAXSTRLEN>; /* name of the site iniates the */
72 66 /* monitoring request */
73 67 int my_prog; /* rpc program # of the requesting process */
74 68 int my_vers; /* rpc version # of the requesting process */
75 69 int my_proc; /* rpc procedure # of the requesting process */
76 70 };
77 71
78 72 struct mon_id {
79 73 string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
80 74 struct my_id my_id;
81 75 };
82 76
83 77
84 78 struct mon{
85 79 struct mon_id mon_id;
86 80 opaque priv[16]; /* private information to store at monitor */
87 81 /* for requesting process */
88 82 };
89 83
90 84
↓ open down ↓ |
46 lines elided |
↑ open up ↑ |
91 85 /*
92 86 * state # of status monitor monitonically increases each time
93 87 * status of the site changes:
94 88 * an even number (>= 0) indicates the site is down and
95 89 * an odd number (> 0) indicates the site is up;
96 90 */
97 91 struct sm_stat {
98 92 int state; /* state # of status monitor */
99 93 };
100 94
101 -enum res {
95 +enum sm_res {
102 96 stat_succ = 0, /* status monitor agrees to monitor */
103 97 stat_fail = 1 /* status monitor cannot monitor */
104 98 };
105 99
106 100 struct sm_stat_res {
107 - res res_stat;
101 + sm_res res_stat;
108 102 int state;
109 103 };
110 104
111 105 /*
112 106 * structure of the status message sent by the status monitor to the
113 107 * requesting program when a monitored site changes status.
114 108 */
115 -struct status {
109 +struct sm_status {
116 110 string mon_name<SM_MAXSTRLEN>;
117 111 int state;
118 112 opaque priv[16]; /* stored private information */
119 113 };
120 114
121 115 /*
122 116 * structure sent between statd's to announce a state change (e.g.,
123 117 * reboot).
124 118 */
125 119 struct stat_chge {
126 120 string mon_name<SM_MAXSTRLEN>;
127 121 int state;
128 122 };
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX