4 #include <netinet/in.h>
15 struct ubik_dbase *dbase;
28 thdr.version.epoch = htonl(2);
29 thdr.version.counter = htonl(0);
30 thdr.magic = htonl(UBIK_MAGIC);
31 thdr.size = htonl(HDRSIZE);
32 lseek(dbase_fd, 0, 0);
33 write(dbase_fd, &thdr, sizeof(thdr));
40 int ubik_BeginTransReadAny()
70 int ubik_WaitVersion()
75 int ubik_CacheUpdate()
85 printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
86 exit(1); /* never know, though */
89 int ubik_GetVersion(dummy, ver)
91 struct ubik_version *ver;
93 memset(ver, 0, sizeof(struct ubik_version));
98 int ubik_Seek(tt, afd, pos)
99 struct ubik_trans *tt;
103 if (lseek(dbase_fd, pos+HDRSIZE, 0) < 0) {
110 int ubik_Write(tt, buf, len)
111 struct ubik_trans *tt;
117 status = write(dbase_fd, buf, len);
119 perror("ubik_Write");
125 int ubik_Read(tt, buf, len)
126 struct ubik_trans *tt;
132 status = read(dbase_fd, buf, len);
138 memset(&buf[status], 0, len - status);
143 /* Global declarations from ubik.c */
144 afs_int32 ubik_quorum=0;
145 struct ubik_dbase *ubik_dbase=0;
146 struct ubik_stats ubik_stats;
147 afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR];
148 afs_int32 ubik_epochTime = 0;
149 afs_int32 urecovery_state = 0;
151 struct rx_securityClass *ubik_sc[3];
154 /* Other declarations */
156 afsconf_GetNoAuthFlag()
162 char *prdir = "/dev/null";
163 struct prheader cheader;