4 #include <netinet/in.h>
14 struct ubik_dbase *dbase;
27 thdr.version.epoch = htonl(0);
28 thdr.version.counter = htonl(0);
29 thdr.magic = htonl(UBIK_MAGIC);
30 thdr.size = htonl(HDRSIZE);
31 lseek(dbase_fd, 0, 0);
32 write(dbase_fd, &thdr, sizeof(thdr));
39 int ubik_BeginTransReadAny()
69 int ubik_WaitVersion()
74 int ubik_CacheUpdate()
84 printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
85 exit(1); /* never know, though */
88 int ubik_GetVersion(dummy, ver)
90 struct ubik_version *ver;
92 bzero(ver, sizeof(struct ubik_version));
97 int ubik_Seek(tt, afd, pos)
98 struct ubik_trans *tt;
102 if (lseek(dbase_fd, pos+HDRSIZE, 0) < 0) {
109 int ubik_Write(tt, buf, len)
110 struct ubik_trans *tt;
116 status = write(dbase_fd, buf, len);
118 perror("ubik_Write");
124 int ubik_Read(tt, buf, len)
125 struct ubik_trans *tt;
131 status = read(dbase_fd, buf, len);
137 bzero(&buf[status], len - status);
142 /* Global declarations from ubik.c */
144 struct ubik_dbase *ubik_dbase=0;
145 struct ubik_stats ubik_stats;
147 long ubik_epochTime = 0;
148 long urecovery_state = 0;
150 struct rx_securityClass *ubik_sc[3];
153 /* Other declarations */
155 afsconf_GetNoAuthFlag()
161 char *prdir = "/dev/null";
162 struct prheader cheader;