1 #ifndef HISV6_PRIVATE_H
2 #define HISV6_PRIVATE_H
9 #include "inn/history.h"
13 /* Used by lots of stuff that parses history file entries. Should be moved
14 into a header specifically for history parsing. */
15 #define HISV6_BADCHAR '_'
16 #define HISV6_FIELDSEP '\t'
17 #define HISV6_NOEXP '-'
18 #define HISV6_SUBFIELDSEP '~'
20 /* maximum length of a history line:
31 #define HISV6_MAXLINE 137
33 /* minimum length of a history line:
38 #define HISV6_MINLINE 37
43 off_t offset; /* Offset into writefp. */
44 unsigned long nextcheck;
45 struct history *history;
55 /* values in the bitmap returned from hisv6_splitline */
56 #define HISV6_HAVE_HASH (1<<0)
57 #define HISV6_HAVE_ARRIVED (1<<1)
58 #define HISV6_HAVE_POSTED (1<<2)
59 #define HISV6_HAVE_EXPIRES (1<<3)
60 #define HISV6_HAVE_TOKEN (1<<4)
62 /* structure used to hold the callback and cookie so we don't try
63 * passing too many parameters into the callers callback */
64 struct hisv6_walkstate {
66 bool (*expire)(void *, time_t, time_t, time_t, TOKEN *);
67 bool (*walk)(void *, time_t, time_t, time_t, const TOKEN *);
72 /* the next two fields are only used during expire... they should
73 * probably be linked off of cookie, but I've been lazy */
78 /* maximum length of the string from hisv6_errloc */
79 #define HISV6_MAX_LOCATION 22