10 #include <netinet/in.h>
21 #define UBIK_INTERNALS
29 struct ubik_dbase *dbase;
44 thdr.version.epoch = htonl(2);
45 thdr.version.counter = htonl(0);
46 thdr.magic = htonl(UBIK_MAGIC);
47 thdr.size = htonl(HDRSIZE);
48 lseek(dbase_fd, 0, 0);
49 write(dbase_fd, &thdr, sizeof(thdr));
57 ubik_BeginTransReadAny()
110 printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
111 exit(1); /* never know, though */
115 ubik_GetVersion(dummy, ver)
117 struct ubik_version *ver;
119 memset(ver, 0, sizeof(struct ubik_version));
125 ubik_Seek(tt, afd, pos)
126 struct ubik_trans *tt;
130 if (lseek(dbase_fd, pos + HDRSIZE, 0) < 0) {
138 ubik_Write(tt, buf, len)
139 struct ubik_trans *tt;
145 status = write(dbase_fd, buf, len);
147 perror("ubik_Write");
154 ubik_Read(tt, buf, len)
155 struct ubik_trans *tt;
161 status = read(dbase_fd, buf, len);
167 memset(&buf[status], 0, len - status);
172 /* Global declarations from ubik.c */
173 afs_int32 ubik_quorum = 0;
174 struct ubik_dbase *ubik_dbase = 0;
175 struct ubik_stats ubik_stats;
176 afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR];
177 afs_int32 ubik_epochTime = 0;
178 afs_int32 urecovery_state = 0;
180 struct rx_securityClass *ubik_sc[3];
183 /* Other declarations */
186 afsconf_GetNoAuthFlag()
192 char *prdir = "/dev/null";
193 struct prheader cheader;