Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / budb / budb_internal.h
CommitLineData
805e021f
CE
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 _BUDB_PROTOTYPES_H
11#define _BUDB_PROTOTYPES_H
12
13/* db_alloc.c */
14afs_int32 InitDBalloc(void);
15afs_int32 AllocStructure(struct ubik_trans *ut, char type, dbadr related,
16 dbadr *saP, void *s);
17afs_int32 FreeStructure(struct ubik_trans *ut, char type, dbadr sa);
18afs_int32 AllocBlock(struct ubik_trans *, struct block *, dbadr *);
19afs_int32 FreeBlock(struct ubik_trans *, struct blockHeader *, dbadr);
20
21/* db_dump.c */
22afs_int32 writeDatabase(struct ubik_trans *, int);
23
24/* db_hash.c */
25
26afs_int32 InitDBhash(void);
27void ht_DBInit(void);
28afs_int32 ht_HashOut(struct ubik_trans *ut, struct memoryHashTable *mht,
29 dbadr ea, void *e);
30afs_int32 RemoveFromList(struct ubik_trans *ut, dbadr ea, void *e,
31 dbadr *head, dbadr ta, void *t, dbadr *thread);
32afs_int32 ht_LookupEntry(struct ubik_trans *ut, struct memoryHashTable *mht,
33 void *key, dbadr *eaP, void *e);
34afs_int32 ht_HashIn(struct ubik_trans *ut, struct memoryHashTable *mht,
35 dbadr ea, void *e);
36afs_int32 scanHashTable(struct ubik_trans *ut, struct memoryHashTable *mhtPtr,
37 int (*selectFn) (dbadr, void *, void *),
38 int (*operationFn) (dbadr, void *, void *),
39 void *rockPtr);
40
41/* db_lock.c */
42int checkLockHandle(struct ubik_trans *, afs_uint32);
43
44/* dbs_dump.c */
45afs_int32 badEntry(afs_uint32 dbAddr);
46
47/* ol_verify.c */
48afs_int32 checkDiskAddress(unsigned long, int, int *, int *);
49
50/* procs.c */
51afs_int32 InitProcs(void);
52int callPermitted(struct rx_call *);
53afs_int32 InitRPC(struct ubik_trans **, int lock, int this_op);
54
55/* server.c */
56
57void Log(char *fmt, ... )
58 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
59void LogError(long code, char *fmt, ... )
60 AFS_ATTRIBUTE_FORMAT(__printf__, 2, 3);
61void LogDebug(int level, char *fmt, ... )
62 AFS_ATTRIBUTE_FORMAT(__printf__, 2, 3);
63
64/* struct_ops.c */
65
66void tape_ntoh(struct tape *, struct tape *);
67void principal_hton(struct budb_principal *, struct budb_principal *);
68void principal_ntoh(struct budb_principal *, struct budb_principal *);
69void structDumpHeader_hton(struct structDumpHeader *,
70 struct structDumpHeader *);
71int tapeSet_ntoh(struct budb_tapeSet *, struct budb_tapeSet *);
72int tapeSet_hton(struct budb_tapeSet *, struct budb_tapeSet *);
73void volInfo_ntoh(struct volInfo *, struct volInfo *);
74void volFragment_ntoh(struct volFragment *, struct volFragment *);
75void dump_ntoh(struct dump *, struct dump *);
76int dumpToBudbDump(dbDumpP, struct budb_dumpEntry *);
77int tapeToBudbTape(struct tape *r, struct budb_tapeEntry *);
78int volsToBudbVol(struct volFragment *, struct volInfo *,
79 struct budb_volumeEntry *);
80void printDump(FILE *, struct dump *);
81int printPrincipal(struct budb_principal *ptr);
82int printTape(FILE *, struct tape *);
83int printTapeSet(struct budb_tapeSet *, afs_int32);
84int printVolInfo(FILE *, struct volInfo *);
85int printVolFragment(FILE *, struct volFragment *);
86int printMemoryHashTable(FILE *, struct memoryHashTable *);
87
88/* database.c */
89afs_int32 CheckInit(struct ubik_trans *, int (*db_init) (struct ubik_trans *));
90afs_int32 InitDB(void);
91
92#endif