4 * Copyright (c) 1999 - 2002 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the Institute nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * Interface to BOS server
44 %#include <fs_errors.h>
46 error-function conv_to_arla_errno
48 const BZNOTACTIVE = 39424;
49 const BZNOENT = 39425;
51 const BZEXISTS = 39427;
52 const BZNOCREATE = 39428;
54 const BZACCESS = 39430;
55 const BZSYNTAX = 39431;
58 const BZBADTYPE = 39434;
60 const BOZO_BSSIZE = 256;
66 const BSTAT_SHUTDOWN = 0;
67 const BSTAT_NORMAL = 1;
68 const BSTAT_SHUTTINGDOWN = 2;
69 const BSTAT_STARTINGUP = 3;
71 const BOZO_PRUNEOLD = 1;
72 const BOZO_PRUNEBAK = 2;
73 const BOZO_PRUNECORE = 4;
75 const BPROC_STARTED = 1;
76 const BPROC_EXITED = 2;
78 const BOZO_HASCORE = 1;
79 const BOZO_ERRORSTOP = 2;
80 const BOZO_BADDIRACCESS = 4;
82 const BNODE_NEEDTIMEOUT = 0x01;
83 const BNODE_ACTIVE = 0x02;
84 const BNODE_WAIT = 0x04;
85 const BNODE_DELETE = 0x08;
86 const BNODE_ERRORSTOP = 0x10;
88 const KTIME_HOUR = 0x01;
89 const KTIME_MIN = 0x02;
90 const KTIME_SEC = 0x04; /* XXX check me */
91 const KTIME_DAY = 0x08;
92 const KTIME_TIME = 0x07;
93 const KTIME_NEVER = 0x10;
94 const KTIME_NOW = 0x20;
98 const BOZO_RESTARTTIME_GENERAL = 0x1; /* general reboot time */
99 const BOZO_RESTARTTIME_NEWBIN = 0x2; /* new binary */
102 const GETSTATUS_FSRUN = "file server running";
103 const GETSTATUS_RSRUNVOLDOWN = "file server running; volser down";
104 const GETSTATUS_SALVAGE = "salvaging file system";
105 const GETSTATUS_FSSTART = "starting file server";
106 const GETSTATUS_FSDOWN = "file server shutting down";
107 const GETSTATUS_SALVAGERDOWN = "salvager shutting down";
108 const GETSTATUS_FSSTOP = "salvager shut down";
124 struct bozo_netKTime {
136 struct bozo_keyInfo {
139 unsigned long keyCheckSum;
145 struct bnode *(*create)();
159 CreateBnode (IN string type<BOZO_BSSIZE>,
160 IN string instance<BOZO_BSSIZE>,
161 IN string p1<BOZO_BSSIZE>,
162 IN string p2<BOZO_BSSIZE>,
163 IN string p3<BOZO_BSSIZE>,
164 IN string p4<BOZO_BSSIZE>,
165 IN string p5<BOZO_BSSIZE>,
166 IN string p6<BOZO_BSSIZE>) = 80;
168 DeleteBnode (IN string instance<BOZO_BSSIZE>) = 81;
170 SetStatus (IN string instance<BOZO_BSSIZE>,
171 IN long status) = 82;
174 GetStatus (IN string instance<BOZO_BSSIZE>,
176 OUT string statdescr<BOZO_BSSIZE>) = 83;
179 EnumerateInstance (IN long instance,
180 OUT string iname<BOZO_BSSIZE>) = 84;
182 GetInstanceInfo (IN string instance<BOZO_BSSIZE>,
183 OUT string type<BOZO_BSSIZE>,
184 OUT struct bozo_status *status) = 85;
186 GetInstanceParm (IN string instance<BOZO_BSSIZE>,
188 OUT string parm<BOZO_BSSIZE>) = 86;
190 AddSUser (IN string name<BOZO_BSSIZE>) = 87;
192 DeleteSUser (IN string name<BOZO_BSSIZE>) = 88;
194 ListSUsers (IN long an,
195 OUT string name<BOZO_BSSIZE>) = 89;
197 ListKeys (IN long an,
199 OUT struct bozo_key *key,
200 OUT struct bozo_keyInfo *keinfo) = 90;
203 IN struct bozo_key *key) = 91;
205 DeleteKey (IN long an) = 92;
207 SetCellName (IN string name<BOZO_BSSIZE>) = 93;
209 GetCellName (OUT string name<BOZO_BSSIZE>) = 94;
211 GetCellHost (IN long awhich,
212 OUT string name<BOZO_BSSIZE>) = 95;
214 AddCellHost (IN string name<BOZO_BSSIZE>) = 96;
216 DeleteCellHost (IN string name<BOZO_BSSIZE>) = 97;
218 SetTStatus (IN string instance<BOZO_BSSIZE>,
219 IN long status) = 98;
227 SetNoAuthFlag (IN long flag) = 102;
231 Restart (IN string instance<BOZO_BSSIZE>) = 104;
233 Install (IN string path<BOZO_BSSIZE>,
236 IN long date) split = 105;
238 UnInstall (IN string path<BOZO_BSSIZE>) = 106;
240 GetDates (IN string path<BOZO_BSSIZE>,
243 OUT long *oldtime) = 107;
246 Exec (IN string cmd<BOZO_BSSIZE>) = 108;
248 Prune (IN long flags) = 109;
250 SetRestartTime (IN long type,
251 IN struct bozo_netKTime *restartTime) = 110;
255 GetRestartTime (IN long type,
256 OUT struct bozo_netKTime *restartTime) = 111;
258 GetLog(IN string name<BOZO_BSSIZE>) split = 112;
262 GetInstanceStrings (IN string instance<BOZO_BSSIZE>,
263 OUT string errorname<BOZO_BSSIZE>,
264 OUT string spare1<BOZO_BSSIZE>,
265 OUT string spare2<BOZO_BSSIZE>,
266 OUT string spare3<BOZO_BSSIZE>) = 114;