Merge remote branch 'origin/topic/jsiwek/doc-framework'

This commit is contained in:
Robin Sommer 2011-04-18 14:50:35 -07:00
commit e7bde27f2d
54 changed files with 4006 additions and 62 deletions

View file

@ -91,6 +91,7 @@ int optimize = 0;
int do_notice_analysis = 0;
int rule_bench = 0;
int print_loaded_scripts = 0;
int generate_documentation = 0;
SecondaryPath* secondary_path = 0;
ConnCompressor* conn_compressor = 0;
extern char version[];
@ -142,6 +143,7 @@ void usage()
fprintf(stderr, " -h|--help|-? | command line help\n");
fprintf(stderr, " -i|--iface <interface> | read from given interface\n");
fprintf(stderr, " -l|--print-scripts | print all loaded scripts\n");
fprintf(stderr, " -Z|--doc-scripts | generate documentation for all loaded scripts\n");
fprintf(stderr, " -p|--prefix <prefix> | add given prefix to policy file resolution\n");
fprintf(stderr, " -r|--readfile <readfile> | read from given tcpdump file\n");
fprintf(stderr, " -y|--flowfile <file>[=<ident>] | read from given flow file\n");
@ -360,6 +362,7 @@ int main(int argc, char** argv)
{"help", no_argument, 0, 'h'},
{"iface", required_argument, 0, 'i'},
{"print-scripts", no_argument, 0, 'l'},
{"doc-scripts", no_argument, 0, 'Z'},
{"prefix", required_argument, 0, 'p'},
{"readfile", required_argument, 0, 'r'},
{"flowfile", required_argument, 0, 'y'},
@ -432,7 +435,7 @@ int main(int argc, char** argv)
opterr = 0;
char opts[256];
safe_strncpy(opts, "B:D:e:f:I:i:K:n:p:R:r:s:T:t:U:w:x:X:y:Y:z:CFGHLOPSWdghlv",
safe_strncpy(opts, "B:D:e:f:I:i:K:n:p:R:r:s:T:t:U:w:x:X:y:Y:z:CFGHLOPSWdghlvZ",
sizeof(opts));
#ifdef USE_PERFTOOLS
@ -611,6 +614,10 @@ int main(int argc, char** argv)
break;
#endif
case 'Z':
generate_documentation = 1;
break;
#ifdef USE_IDMEF
case 'n':
fprintf(stderr, "Using IDMEF XML DTD from %s\n", optarg);