2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef _BUDB_PROTOTYPES_H
11 #define _BUDB_PROTOTYPES_H
14 afs_int32
InitDBalloc(void);
15 afs_int32
AllocStructure(struct ubik_trans
*ut
, char type
, dbadr related
,
17 afs_int32
FreeStructure(struct ubik_trans
*ut
, char type
, dbadr sa
);
18 afs_int32
AllocBlock(struct ubik_trans
*, struct block
*, dbadr
*);
19 afs_int32
FreeBlock(struct ubik_trans
*, struct blockHeader
*, dbadr
);
22 afs_int32
writeDatabase(struct ubik_trans
*, int);
26 afs_int32
InitDBhash(void);
28 afs_int32
ht_HashOut(struct ubik_trans
*ut
, struct memoryHashTable
*mht
,
30 afs_int32
RemoveFromList(struct ubik_trans
*ut
, dbadr ea
, void *e
,
31 dbadr
*head
, dbadr ta
, void *t
, dbadr
*thread
);
32 afs_int32
ht_LookupEntry(struct ubik_trans
*ut
, struct memoryHashTable
*mht
,
33 void *key
, dbadr
*eaP
, void *e
);
34 afs_int32
ht_HashIn(struct ubik_trans
*ut
, struct memoryHashTable
*mht
,
36 afs_int32
scanHashTable(struct ubik_trans
*ut
, struct memoryHashTable
*mhtPtr
,
37 int (*selectFn
) (dbadr
, void *, void *),
38 int (*operationFn
) (dbadr
, void *, void *),
42 int checkLockHandle(struct ubik_trans
*, afs_uint32
);
45 afs_int32
badEntry(afs_uint32 dbAddr
);
48 afs_int32
checkDiskAddress(unsigned long, int, int *, int *);
51 afs_int32
InitProcs(void);
52 int callPermitted(struct rx_call
*);
53 afs_int32
InitRPC(struct ubik_trans
**, int lock
, int this_op
);
57 void Log(char *fmt
, ... )
58 AFS_ATTRIBUTE_FORMAT(__printf__
, 1, 2);
59 void LogError(long code
, char *fmt
, ... )
60 AFS_ATTRIBUTE_FORMAT(__printf__
, 2, 3);
61 void LogDebug(int level
, char *fmt
, ... )
62 AFS_ATTRIBUTE_FORMAT(__printf__
, 2, 3);
66 void tape_ntoh(struct tape
*, struct tape
*);
67 void principal_hton(struct budb_principal
*, struct budb_principal
*);
68 void principal_ntoh(struct budb_principal
*, struct budb_principal
*);
69 void structDumpHeader_hton(struct structDumpHeader
*,
70 struct structDumpHeader
*);
71 int tapeSet_ntoh(struct budb_tapeSet
*, struct budb_tapeSet
*);
72 int tapeSet_hton(struct budb_tapeSet
*, struct budb_tapeSet
*);
73 void volInfo_ntoh(struct volInfo
*, struct volInfo
*);
74 void volFragment_ntoh(struct volFragment
*, struct volFragment
*);
75 void dump_ntoh(struct dump
*, struct dump
*);
76 int dumpToBudbDump(dbDumpP
, struct budb_dumpEntry
*);
77 int tapeToBudbTape(struct tape
*r
, struct budb_tapeEntry
*);
78 int volsToBudbVol(struct volFragment
*, struct volInfo
*,
79 struct budb_volumeEntry
*);
80 void printDump(FILE *, struct dump
*);
81 int printPrincipal(struct budb_principal
*ptr
);
82 int printTape(FILE *, struct tape
*);
83 int printTapeSet(struct budb_tapeSet
*, afs_int32
);
84 int printVolInfo(FILE *, struct volInfo
*);
85 int printVolFragment(FILE *, struct volFragment
*);
86 int printMemoryHashTable(FILE *, struct memoryHashTable
*);
89 afs_int32
CheckInit(struct ubik_trans
*, int (*db_init
) (struct ubik_trans
*));
90 afs_int32
InitDB(void);