00474e61de842d1f9d49359c395ceebc4767326b
[openafs.git] / src / ubik / ubik.p.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef UBIK_H
11 #define UBIK_H
12
13 #include <stdarg.h>
14
15 #include <ubik_int.h>
16
17 /*! \name ubik_trans types */
18 #define UBIK_READTRANS      0
19 #define UBIK_WRITETRANS     1
20 /*\}*/
21
22 /*! \name ubik_lock types */
23 #define LOCKREAD            1
24 #define LOCKWRITE           2
25 #define LOCKWAIT            3
26 /*\}*/
27
28 /*! \name ubik client flags */
29 #define UPUBIKONLY          1   /*!< only check servers presumed functional */
30 #define UBIK_CALL_NEW       2   /*!< use the semantics of ubik_Call_New */
31 /*\}*/
32
33 /*! \name RX services types */
34 #define VOTE_SERVICE_ID     50
35 #define DISK_SERVICE_ID     51
36 #define USER_SERVICE_ID     52  /*!< Since most applications use same port! */
37 /*\}*/
38
39 #define UBIK_MAGIC      0x354545
40
41 /*! \name global ubik parameters */
42 #define MAXSERVERS          20  /*!< max number of servers */
43 /*\}*/
44
45 /*! version comparison macro */
46 #define vcmp(a,b) ((a).epoch == (b).epoch? ((a).counter - (b).counter) : ((a).epoch - (b).epoch))
47
48 /*! \name ubik_client state bits */
49 #define CFLastFailed        1   /*!< last call failed to this guy (to detect down hosts) */
50 /*\}*/
51
52 #include <afs/afs_assert.h>
53 #ifdef AFS_PTHREAD_ENV
54 #include <pthread.h>
55 #else
56 #include <lwp.h>
57 #endif
58
59 /*!
60  * \brief per-client structure for ubik
61  */
62 struct ubik_client {
63     short initializationState;  /*!< ubik client init state */
64     short states[MAXSERVERS];   /*!< state bits */
65     struct rx_connection *conns[MAXSERVERS];
66     afs_int32 syncSite;
67 #ifdef AFS_PTHREAD_ENV
68     pthread_mutex_t cm;
69 #endif
70 };
71
72 #ifdef AFS_PTHREAD_ENV
73 #define LOCK_UBIK_CLIENT(client) MUTEX_ENTER(&client->cm)
74 #define UNLOCK_UBIK_CLIENT(client) MUTEX_EXIT(&client->cm)
75 #else
76 #define LOCK_UBIK_CLIENT(client)
77 #define UNLOCK_UBIK_CLIENT(client)
78 #endif
79
80 #define ubik_GetRPCConn(astr,aindex)    ((aindex) >= MAXSERVERS? 0 : (astr)->conns[aindex])
81 #define ubik_GetRPCHost(astr,aindex)    ((aindex) >= MAXSERVERS? 0 : (astr)->hosts[aindex])
82
83 /*!
84  * \brief ubik header file structure
85  */
86 struct ubik_hdr {
87     afs_int32 magic;            /*!< magic number */
88     short pad1;                 /*!< some 0-initd padding */
89     short size;                 /*!< header allocation size */
90     struct ubik_version version;        /*!< the version for this file */
91 };
92
93 /*!
94  * \brief representation of a ubik transaction
95  */
96 struct ubik_trans {
97     struct ubik_dbase *dbase;   /*!< corresponding database */
98     struct ubik_trans *next;    /*!< in the list */
99     afs_int32 locktype;         /*!< transaction lock */
100     struct ubik_trunc *activeTruncs;    /*!< queued truncates */
101     struct ubik_tid tid;        /*!< transaction id of this trans (if write trans.) */
102     afs_int32 minCommitTime;    /*!< time before which this trans can't commit */
103     afs_int32 seekFile;         /*!< seek ptr: file number */
104     afs_int32 seekPos;          /*!< seek ptr: offset therein */
105     short flags;                /*!< trans flag bits */
106     char type;                  /*!< type of trans */
107     iovec_wrt iovec_info;
108     iovec_buf iovec_data;
109 };
110
111 /*!
112  * \brief representation of a truncation operation
113  */
114 struct ubik_trunc {
115     struct ubik_trunc *next;
116     afs_int32 file;             /*!< file to truncate */
117     afs_int32 length;           /*!< new size */
118 };
119
120 struct ubik_stat {
121     afs_int32 size;
122     afs_int32 mtime;
123 };
124
125 #if defined(UKERNEL)
126 #include "afs/lock.h"
127 #else /* defined(UKERNEL) */
128 #include <lock.h>               /* just to make sure we've got this */
129 #endif /* defined(UKERNEL) */
130
131 /*!
132  * \brief representation of a ubik database.
133  *
134  * Contains info on low-level disk access routines
135  * for use by disk transaction module.
136  */
137 struct ubik_dbase {
138     char *pathName;             /*!< root name for dbase */
139     struct ubik_trans *activeTrans;     /*!< active transaction list */
140     struct ubik_version version;        /*!< version number */
141 #ifdef AFS_PTHREAD_ENV
142     pthread_mutex_t versionLock;        /*!< lock on version number */
143 #elif defined(UKERNEL)
144     struct afs_lock versionLock;        /*!< lock on version number */
145 #else                           /* defined(UKERNEL) */
146     struct Lock versionLock;    /*!< lock on version number */
147 #endif                          /* defined(UKERNEL) */
148     afs_int32 tidCounter;       /*!< last RW or RO trans tid counter */
149     afs_int32 writeTidCounter;  /*!< last write trans tid counter */
150     afs_int32 flags;            /*!< flags */
151     /* physio procedures */
152     int (*read) (struct ubik_dbase * adbase, afs_int32 afile, void *abuffer,
153                  afs_int32 apos, afs_int32 alength);
154     int (*write) (struct ubik_dbase * adbase, afs_int32 afile, void *abuffer,
155                   afs_int32 apos, afs_int32 alength);
156     int (*truncate) (struct ubik_dbase * adbase, afs_int32 afile,
157                      afs_int32 asize);
158     int (*sync) (struct ubik_dbase * adbase, afs_int32 afile);
159     int (*stat) (struct ubik_dbase * adbase, afs_int32 afid,
160                  struct ubik_stat * astat);
161     void (*open) (struct ubik_dbase * adbase, afs_int32 afid);
162     int (*setlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion);      /*!< set the version label */
163     int (*getlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion);      /*!< retrieve the version label */
164     int (*getnfiles) (struct ubik_dbase * adbase);      /*!< find out number of files */
165     short readers;              /*!< number of current read transactions */
166     struct ubik_version cachedVersion;  /*!< version of caller's cached data */
167 #ifdef UKERNEL
168     struct afs_lock cache_lock;
169 #else
170     struct Lock cache_lock; /*!< protects cached application data */
171 #endif
172 #ifdef AFS_PTHREAD_ENV
173     pthread_cond_t version_cond;    /*!< condition variable to manage changes to version */
174     pthread_cond_t flags_cond;      /*!< condition variable to manage changes to flags */
175 #endif
176 };
177
178 /**
179  * ubik_CheckCache callback function.
180  *
181  * @param[in] atrans  ubik transaction
182  * @param[in] rock    rock passed to ubik_CheckCache
183  *
184  * @return operation status
185  *   @retval 0        cache was read properly
186  */
187 typedef int (*ubik_updatecache_func) (struct ubik_trans *atrans, void *rock);
188
189 /*! \name procedures for automatically authenticating ubik connections */
190 extern int (*ubik_CRXSecurityProc) (void *, struct rx_securityClass **,
191                                     afs_int32 *);
192 extern void *ubik_CRXSecurityRock;
193 extern int (*ubik_SRXSecurityProc) (void *, struct rx_securityClass **,
194                                     afs_int32 *);
195 extern void *ubik_SRXSecurityRock;
196 extern int (*ubik_CheckRXSecurityProc) (void *, struct rx_call *);
197 extern void *ubik_CheckRXSecurityRock;
198
199 extern void ubik_SetClientSecurityProcs(int (*scproc)(void *,
200                                                       struct rx_securityClass **,
201                                                       afs_int32 *),
202                                         int (*checkproc) (void *),
203                                         void *rock);
204
205 /*\}*/
206
207 /*
208  * For applications that make use of ubik_BeginTransReadAnyWrite, writing
209  * processes must not update the application-level cache as they write,
210  * or else readers can read the new cache before the data is committed to
211  * the db. So, when a commit occurs, the cache must be updated right then.
212  * If set, this function will be called during commits of write transactions,
213  * to update the application-level cache after a write. This will be called
214  * immediately after the local disk commit succeeds, and it will be called
215  * with a lock held that prevents other threads from reading from the cache
216  * or the db in general.
217  *
218  * Note that this function MUST be set in order to make use of
219  * ubik_BeginTransReadAnyWrite.
220  */
221 extern int (*ubik_SyncWriterCacheProc) (void);
222
223 /****************INTERNALS BELOW ****************/
224
225 #ifdef UBIK_INTERNALS
226 /*! \name some ubik parameters */
227 #define UBIK_PAGESIZE       1024        /*!< fits in current r packet */
228 #define UBIK_LOGPAGESIZE    10  /*!< base 2 log thereof */
229 #define NBUFFERS            20  /*!< number of 1K buffers */
230 #define HDRSIZE             64  /*!< bytes of header per dbfile */
231 /*\}*/
232
233 /*! \name ubik_dbase flags */
234 #define DBWRITING           1   /*!< are any write trans. in progress */
235 /*\}*/
236
237 /*!\name ubik trans flags */
238 #define TRDONE              1   /*!< commit or abort done */
239 #define TRABORT             2   /*!< if #TRDONE, tells if aborted */
240 #define TRREADANY           4   /*!< read any data available in trans */
241 #define TRCACHELOCKED       32  /*!< this trans has locked dbase->cache_lock
242                                  *   (meaning, this trans has called
243                                  *   ubik_CheckCache at some point */
244 #define TRREADWRITE         64  /*!< read even if there's a conflicting ubik-
245                                  *   level write lock */
246 /*\}*/
247
248 /*! \name ubik_lock flags */
249 #define LWANT               1
250 /*\}*/
251
252 /*! \name ubik system database numbers */
253 #define LOGFILE             (-1)
254 /*\}*/
255
256 /*! \name define log opcodes */
257 #define LOGNEW              100 /*!< start transaction */
258 #define LOGEND              101 /*!< commit (good) end transaction */
259 #define LOGABORT            102 /*!< abort (fail) transaction */
260 #define LOGDATA             103 /*!< data */
261 #define LOGTRUNCATE         104 /*!< truncate operation */
262 /*\}*/
263
264 /*!
265  * \name timer constants
266  * time constant for replication algorithms: the R time period is 20 seconds.  Both
267  * #SMALLTIME and #BIGTIME must be larger than #RPCTIMEOUT+max(#RPCTIMEOUT, #POLLTIME),
268  * so that timeouts do not prevent us from getting through to our servers in time.
269  *
270  * We use multi-R to time out multiple down hosts concurrently.
271  * The only other restrictions:  #BIGTIME > #SMALLTIME and
272  * #BIGTIME-#SMALLTIME > #MAXSKEW (the clock skew).
273  */
274 #define MAXSKEW 10
275 #define POLLTIME 15
276 #define RPCTIMEOUT 20
277 #define BIGTIME 75
278 #define SMALLTIME 60
279 /*\}*/
280
281 /*!
282  * \brief the per-server state, used by the sync site to keep track of its charges
283  */
284 struct ubik_server {
285     struct ubik_server *next;   /*!< next ptr */
286     afs_uint32 addr[UBIK_MAX_INTERFACE_ADDR];   /*!< network order, addr[0] is primary */
287     afs_int32 lastVoteTime;     /*!< last time yes vote received */
288     afs_int32 lastBeaconSent;   /*!< last time beacon attempted */
289     struct ubik_version version;        /*!< version, only used during recovery */
290     struct rx_connection *vote_rxcid;   /*!< cid to use to contact dude for votes */
291     struct rx_connection *disk_rxcid;   /*!< cid to use to contact dude for disk reqs */
292     char lastVote;              /*!< true if last vote was yes */
293     char up;                    /*!< is it up? */
294     char beaconSinceDown;       /*!< did beacon get through since last crash? */
295     char currentDB;             /*!< is dbase up-to-date */
296     char magic;                 /*!< the one whose vote counts twice */
297     char isClone;               /*!< is only a clone, doesn't vote */
298 };
299
300 /*! \name hold and release functions on a database */
301 #ifdef AFS_PTHREAD_ENV
302 # define        DBHOLD(a)       MUTEX_ENTER(&((a)->versionLock))
303 # define        DBRELE(a)       MUTEX_EXIT(&((a)->versionLock))
304 #else /* !AFS_PTHREAD_ENV */
305 # define        DBHOLD(a)       ObtainWriteLock(&((a)->versionLock))
306 # define        DBRELE(a)       ReleaseWriteLock(&((a)->versionLock))
307 #endif /* !AFS_PTHREAD_ENV */
308 /*\}*/
309
310 /* globals */
311
312 /*!name list of all servers in the system */
313 extern struct ubik_server *ubik_servers;
314 extern char amIClone;
315 /*\}*/
316
317 /*! \name network port info */
318 extern short ubik_callPortal;
319 /*\}*/
320
321 /*! \name urecovery state bits for sync site */
322 #define UBIK_RECSYNCSITE        1       /* am sync site */
323 #define UBIK_RECFOUNDDB         2       /* found acceptable dbase from quorum */
324 #define UBIK_RECHAVEDB          4       /* fetched best dbase */
325 #define UBIK_RECLABELDB         8       /* relabelled dbase */
326 #define UBIK_RECSENTDB          0x10    /* sent best db to *everyone* */
327 #define UBIK_RECSBETTER         UBIK_RECLABELDB /* last state */
328 /*\}*/
329
330 extern afs_int32 ubik_quorum;   /* min hosts in quorum */
331 extern struct ubik_dbase *ubik_dbase;   /* the database handled by this server */
332 extern afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR];   /* this host addr, in net order */
333 extern int ubik_amSyncSite;     /* sleep on this waiting to be sync site */
334 extern struct ubik_stats {      /* random stats */
335     afs_int32 escapes;
336 } ubik_stats;
337 extern afs_int32 ubik_epochTime;        /* time when this site started */
338 extern afs_int32 urecovery_state;       /* sync site recovery process state */
339 extern struct ubik_trans *ubik_currentTrans;    /* current trans */
340 extern struct ubik_version ubik_dbVersion;      /* sync site's dbase version */
341 extern afs_int32 ubik_debugFlag;        /* ubik debug flag */
342 extern int ubikPrimaryAddrOnly; /* use only primary address */
343
344 /* this extern gives the sync site's db version, with epoch of 0 if none yet */
345
346 /* phys.c */
347 extern int uphys_stat(struct ubik_dbase *adbase, afs_int32 afid,
348                       struct ubik_stat *astat);
349 extern int uphys_read(struct ubik_dbase *adbase, afs_int32 afile,
350                       void *abuffer, afs_int32 apos,
351                       afs_int32 alength);
352 extern int uphys_write(struct ubik_dbase *adbase, afs_int32 afile,
353                        void *abuffer, afs_int32 apos,
354                        afs_int32 alength);
355 extern int uphys_truncate(struct ubik_dbase *adbase, afs_int32 afile,
356                           afs_int32 asize);
357 extern int uphys_getnfiles(struct ubik_dbase *adbase);
358 extern int uphys_getlabel(struct ubik_dbase *adbase, afs_int32 afile,
359                           struct ubik_version *aversion);
360 extern int uphys_setlabel(struct ubik_dbase *adbase, afs_int32 afile,
361                           struct ubik_version *aversion);
362 extern int uphys_sync(struct ubik_dbase *adbase, afs_int32 afile);
363 extern void uphys_invalidate(struct ubik_dbase *adbase,
364                              afs_int32 afid);
365
366 /*! \name recovery.c */
367 extern int urecovery_ResetState(void);
368 extern int urecovery_LostServer(struct ubik_server *server);
369 extern int urecovery_AllBetter(struct ubik_dbase *adbase,
370                                int areadAny);
371 extern int urecovery_AbortAll(struct ubik_dbase *adbase);
372 extern int urecovery_CheckTid(struct ubik_tid *atid, int abortalways);
373 extern int urecovery_Initialize(struct ubik_dbase *adbase);
374 extern void *urecovery_Interact(void *);
375 extern int DoProbe(struct ubik_server *server);
376 /*\}*/
377
378 /*! \name ubik.c */
379 extern afs_int32 ContactQuorum_NoArguments(afs_int32 (*proc)
380                                                        (struct rx_connection *,
381                                                         ubik_tid *),
382                                            struct ubik_trans *atrans,
383                                            int aflags);
384
385 extern afs_int32 ContactQuorum_DISK_Lock(struct ubik_trans *atrans,
386                                          int aflags,
387                                          afs_int32 file, afs_int32 position,
388                                          afs_int32 length, afs_int32 type);
389
390 extern afs_int32 ContactQuorum_DISK_Write(struct ubik_trans *atrans,
391                                           int aflags,
392                                           afs_int32 file, afs_int32 position,
393                                           bulkdata *data);
394
395 extern afs_int32 ContactQuorum_DISK_Truncate(struct ubik_trans *atrans,
396                                              int aflags,
397                                              afs_int32 file, afs_int32 length);
398
399 extern afs_int32 ContactQuorum_DISK_WriteV(struct ubik_trans *atrans,
400                                            int aflags,
401                                            iovec_wrt * io_vector,
402                                            iovec_buf *io_buffer);
403
404 extern afs_int32 ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans,
405                                                int aflags,
406                                                ubik_version *OldVersion,
407                                                ubik_version *NewVersion);
408
409 extern void panic(char *format, ...)
410     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
411
412 extern afs_uint32 ubikGetPrimaryInterfaceAddr(afs_uint32 addr);
413 /*\}*/
414
415 /*! \name beacon.c */
416 struct afsconf_cell;
417 extern void ubeacon_InitSecurityClass(void);
418 extern void ubeacon_ReinitServer(struct ubik_server *ts);
419 extern void ubeacon_Debug(struct ubik_debug *aparm);
420 extern int ubeacon_AmSyncSite(void);
421 extern int ubeacon_InitServerListByInfo(afs_uint32 ame,
422                                         struct afsconf_cell *info,
423                                         char clones[]);
424 extern int ubeacon_InitServerList(afs_uint32 ame, afs_uint32 aservers[]);
425 extern void *ubeacon_Interact(void *);
426 /*\}*/
427
428 /*! \name disk.c */
429 extern int udisk_Init(int nBUffers);
430 extern void udisk_Debug(struct ubik_debug *aparm);
431 extern int udisk_Invalidate(struct ubik_dbase *adbase, afs_int32 afid);
432 extern int udisk_read(struct ubik_trans *atrans, afs_int32 afile,
433                       void *abuffer, afs_int32 apos, afs_int32 alen);
434 extern int udisk_truncate(struct ubik_trans *atrans, afs_int32 afile,
435                           afs_int32 alength);
436 extern int udisk_write(struct ubik_trans *atrans, afs_int32 afile,
437                        void *abuffer, afs_int32 apos, afs_int32 alen);
438 extern int udisk_begin(struct ubik_dbase *adbase, int atype,
439                        struct ubik_trans **atrans);
440 extern int udisk_commit(struct ubik_trans *atrans);
441 extern int udisk_abort(struct ubik_trans *atrans);
442 extern int udisk_end(struct ubik_trans *atrans);
443 /*\}*/
444
445 /*! \name lock.c */
446 extern void ulock_Init(void);
447 extern int  ulock_getLock(struct ubik_trans *atrans, int atype, int await);
448 extern void ulock_relLock(struct ubik_trans *atrans);
449 extern void ulock_Debug(struct ubik_debug *aparm);
450 /*\}*/
451
452 /*! \name vote.c */
453 extern int uvote_ShouldIRun(void);
454 extern afs_int32 uvote_GetSyncSite(void);
455 extern int uvote_Init(void);
456 extern void ubik_vprint(const char *format, va_list ap)
457     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 0);
458
459 extern void ubik_print(const char *format, ...)
460     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
461
462 extern void ubik_dprint(const char *format, ...)
463     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
464
465 extern void ubik_dprint_25(const char *format, ...)
466     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
467 /*\}*/
468
469 #endif /* UBIK_INTERNALS */
470
471 extern afs_int32 ubik_nBuffers;
472
473 /*!
474  * \name Public function prototypes
475  */
476
477 /*! \name ubik.c */
478 struct afsconf_cell;
479 extern int ubik_ServerInitByInfo(afs_uint32 myHost, short myPort,
480                                  struct afsconf_cell *info, char clones[],
481                                  const char *pathName,
482                                  struct ubik_dbase **dbase);
483 extern int ubik_ServerInit(afs_uint32 myHost, short myPort,
484                            afs_uint32 serverList[],
485                            const char *pathName, struct ubik_dbase **dbase);
486 extern int ubik_BeginTrans(struct ubik_dbase *dbase,
487                            afs_int32 transMode, struct ubik_trans **transPtr);
488 extern int ubik_BeginTransReadAny(struct ubik_dbase *dbase,
489                                   afs_int32 transMode,
490                                   struct ubik_trans **transPtr);
491 extern int ubik_BeginTransReadAnyWrite(struct ubik_dbase *dbase,
492                                        afs_int32 transMode,
493                                        struct ubik_trans **transPtr);
494 extern int ubik_AbortTrans(struct ubik_trans *transPtr);
495
496 extern int ubik_EndTrans(struct ubik_trans *transPtr);
497 extern int ubik_Read(struct ubik_trans *transPtr, void *buffer,
498                      afs_int32 length);
499 extern int ubik_Flush(struct ubik_trans *transPtr);
500 extern int ubik_Write(struct ubik_trans *transPtr, void *buffer,
501                       afs_int32 length);
502 extern int ubik_Seek(struct ubik_trans *transPtr, afs_int32 fileid,
503                      afs_int32 position);
504 extern int ubik_Tell(struct ubik_trans *transPtr, afs_int32 * fileid,
505                      afs_int32 * position);
506 extern int ubik_Truncate(struct ubik_trans *transPtr,
507                          afs_int32 length);
508 extern int ubik_SetLock(struct ubik_trans *atrans, afs_int32 apos,
509                         afs_int32 alen, int atype);
510 extern int ubik_WaitVersion(struct ubik_dbase *adatabase,
511                             struct ubik_version *aversion);
512 extern int ubik_GetVersion(struct ubik_trans *atrans,
513                            struct ubik_version *avers);
514 extern int ubik_CheckCache(struct ubik_trans *atrans,
515                            ubik_updatecache_func check,
516                            void *rock);
517 /*\}*/
518
519 /*! \name ubikclient.c */
520
521 extern int ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers);
522 extern unsigned int afs_random(void);
523 extern int ubik_ClientInit(struct rx_connection **serverconns,
524                            struct ubik_client **aclient);
525 extern afs_int32 ubik_ClientDestroy(struct ubik_client *aclient);
526 extern struct rx_connection *ubik_RefreshConn(struct rx_connection *tc);
527 #ifdef UBIK_LEGACY_CALLITER
528 extern afs_int32 ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
529                                afs_int32 aflags, int *apos, long p1, long p2,
530                                long p3, long p4, long p5, long p6, long p7,
531                                long p8, long p9, long p10, long p11, long p12,
532                                long p13, long p14, long p15, long p16);
533 extern afs_int32 ubik_Call_New(int (*aproc) (), struct ubik_client
534                                *aclient, afs_int32 aflags, long p1, long p2,
535                                long p3, long p4, long p5, long p6, long p7,
536                                long p8, long p9, long p10, long p11, long p12,
537                                long p13, long p14, long p15, long p16);
538 #endif
539 /*\}*/
540
541 /* \name ubikcmd.c */
542 extern int ubik_ParseServerList(int argc, char **argv, afs_uint32 *ahost,
543                                 afs_uint32 *aothers);
544 /*\}*/
545
546 /* \name uinit.c */
547
548 struct rx_securityClass;
549 extern afs_int32 ugen_ClientInit(int noAuthFlag, const char *confDir,
550                                  char *cellName, afs_int32 sauth,
551                                  struct ubik_client **uclientp,
552                                  int (*secproc) (struct rx_securityClass *sc,
553                                                  afs_int32 scIndex),
554                                  char *funcName,
555                                  afs_int32 gen_rxkad_level,
556                                  afs_int32 maxservers, char *serviceid,
557                                  afs_int32 deadtime, afs_uint32 server,
558                                  afs_uint32 port, afs_int32 usrvid);
559
560 #endif /* UBIK_H */