9 #include <netinet/in.h>
12 #define UBIK_INTERNALS
20 struct ubik_dbase *dbase;
33 thdr.version.epoch = htonl(2);
34 thdr.version.counter = htonl(0);
35 thdr.magic = htonl(UBIK_MAGIC);
36 thdr.size = htonl(HDRSIZE);
37 lseek(dbase_fd, 0, 0);
38 write(dbase_fd, &thdr, sizeof(thdr));
45 int ubik_BeginTransReadAny()
75 int ubik_WaitVersion()
80 int ubik_CacheUpdate()
90 printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
91 exit(1); /* never know, though */
94 int ubik_GetVersion(dummy, ver)
96 struct ubik_version *ver;
98 memset(ver, 0, sizeof(struct ubik_version));
103 int ubik_Seek(tt, afd, pos)
104 struct ubik_trans *tt;
108 if (lseek(dbase_fd, pos+HDRSIZE, 0) < 0) {
115 int ubik_Write(tt, buf, len)
116 struct ubik_trans *tt;
122 status = write(dbase_fd, buf, len);
124 perror("ubik_Write");
130 int ubik_Read(tt, buf, len)
131 struct ubik_trans *tt;
137 status = read(dbase_fd, buf, len);
143 memset(&buf[status], 0, len - status);
148 /* Global declarations from ubik.c */
149 afs_int32 ubik_quorum=0;
150 struct ubik_dbase *ubik_dbase=0;
151 struct ubik_stats ubik_stats;
152 afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR];
153 afs_int32 ubik_epochTime = 0;
154 afs_int32 urecovery_state = 0;
156 struct rx_securityClass *ubik_sc[3];
159 /* Other declarations */
161 afsconf_GetNoAuthFlag()
167 char *prdir = "/dev/null";
168 struct prheader cheader;