35 #define DEF_TUPLE "NET,HOST,FULL" 36 #define DEF_TIMES "0,1000,0,1000" 48 #define CONF_INITIALIZER {"/tmp/ze-greydb", 10000, DEF_TIMES, DEF_TUPLE} 50 static char *
workdir =
"/tmp/ze-greydb";
52 static char *ntuple = NULL;
54 static char *tconst = NULL;
56 static int do_test(
conf_T * cargs);
58 static void usage(
char *);
78 const char *args =
"ht:dvw:n:l:c:";
81 while ((c = getopt(argc, argv, args)) != -1) {
113 cargs.
count = atoi(optarg);
129 printf(
"Error ... \n");
143 if (ntuple != NULL) {
149 if ((s = strdup(ntuple)) != NULL) {
150 memset(argv, 0,
sizeof (argv));
152 for (i = 0; i <
NTP; i++)
153 argv[i] =
STRNULL(argv[i],
"");
159 if (tconst != NULL) {
166 if ((s = strdup(tconst)) != NULL) {
167 memset(argv, 0,
sizeof (argv));
168 memset(tc, 0,
sizeof (tc));
170 for (i = 0; i <
NTC; i++) {
171 argv[i] =
STRNULL(argv[i],
"0");
172 tc[i] = (time_t)
zeStr2time(argv[i], NULL, 0);
199 from =
"nobody@foss.jose-marcio.org";
200 hostname =
"nowhere.foss.jose-marcio.org";
201 to =
"grey@foss.jose-marcio.org";
204 for (n = 0; n < cargs->
count; n++) {
208 bool can_validate =
TRUE;
210 snprintf(buf,
sizeof (buf),
"grey-%d@foss.jose-marcio.org", n);
247 printf(
"Usage : %s options\n" 248 " %s\n" " Compiled on %s\n", arg,
PACKAGE, __DATE__
" " __TIME__);
int main(int argc, char **argv)
bool grey_set_tuples(char *ip, char *from, char *to)
bool grey_set_delays(time_t tp_min_norm, time_t tp_max_norm, time_t tp_min_null, time_t tp_max_null)
void zeLog_SetOutput(bool, bool)
int grey_check(char *, char *, char *, char *, bool *, bool)
int zeStr2Tokens(char *, int, char **, char *)
#define ZE_MessageInfo(level,...)
bool grey_init(char *, bool, int)
time_t zeStr2time(char *s, int *error, time_t dval)