4 #include <netinet/in.h>
13 /* Stolen bits of ubik.h. */
19 typedef struct ubik_version ubik_version;
21 /* ubik header file structure */
23 afs_int32 magic; /* magic number */
24 short pad1; /* some 0-initd padding */
25 short size; /* header allocation size */
26 struct ubik_version version; /* the version for this file */
29 #define HDRSIZE 64 /* bytes of header per dbfile */
30 #define UBIK_MAGIC 0x354545
33 struct ubik_dbase *dbase;
46 thdr.version.epoch = htonl(0);
47 thdr.version.counter = htonl(0);
48 thdr.magic = htonl(UBIK_MAGIC);
49 thdr.size = htonl(HDRSIZE);
50 lseek(dbase_fd, 0, 0);
51 write(dbase_fd, &thdr, sizeof(thdr));
58 int ubik_BeginTransReadAny()
88 int ubik_WaitVersion()
93 int ubik_CacheUpdate()
103 printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
104 exit(1); /* never know, though */
107 int ubik_GetVersion(dummy, ver)
109 struct ubik_version *ver;
111 memset(ver, 0, sizeof(struct ubik_version));
116 int ubik_Seek(tt, afd, pos)
117 struct ubik_trans *tt;
121 if (lseek(dbase_fd, pos+HDRSIZE, 0) < 0) {
128 int ubik_Write(tt, buf, len)
129 struct ubik_trans *tt;
135 status = write(dbase_fd, buf, len);
137 perror("ubik_Write");
143 int ubik_Read(tt, buf, len)
144 struct ubik_trans *tt;
150 status = read(dbase_fd, buf, len);
156 memset(&buf[status], 0, len - status);
160 struct rx_securityClass *ubik_sc[3];
162 /* Other declarations */
164 afsconf_GetNoAuthFlag()
170 char *prdir = "/dev/null";
171 struct prheader cheader;