Fixes for the programmer's manual.
Fixes to the progdoc.
Spelling fixes to progdoc.
Nested scopes could never have worked. My fault I wrote such a buggy code,Pavel's fault that he's never tested shadowing of declarations in the filters.
cf_define_symbol() has been modified to check the scope of the symbol it'sgiven and it if it's an already defined symbol, but in a different scope,...
Moved parser docs to cf-lex.l, so that the parser compiles.
cf_symbol_class_name now recognizes SYM_IPA.
Added && and ||.
Use ? in path matching to avoid /* trap.
Include CF_HDR section in keywords.h as well, so that protocol symbolscan be used in definition of ENUM's.
Include "lib/string.h" instead of <string.h>. It should give us bzero()and other non-portable functions on all systems.
Fix <=, >=, !=
Split off general commands to cmds.c.
Added `show symbols' command which dumps whole symbol table togetherwith symbol types etc.
Separated `official protocol names' used in status dumps from name templatesused for automatic generation of instance names.
protocol->name is the official name protocol->template is the name template (usually "name%d"), should be all lowercase.
Updated all protocols to define the templates, checked that their configuration...
When a quoted string is encountered, don't forget to copy it to theconfig pool before passing it to the parser.
Avoid `default rule can be matched' warning in CLI state.
Lexer supports fallback symbol tables and uses them to recognizesymbols from global config when parsing CLI commands.
cf_lex_init_tables() is now called automatically inside the lexer.
Symbols are not scoped.
You should not follow next two times.
Parse CLI commands. We use the same parser as for configuration files (becausewe want to allow filter and similar complex constructs to be used in commandsand we should avoid code duplication), only with CLI_MARKER token prependedbefore the whole input....
Basic support for IPv6. The system-dependent part doesn't work yet,but the core routines are there and seem to be working.
o lib/ipv6.[ch] written o Lexical analyser recognizes IPv6 addresses and when in IPv6 mode, treats pure IPv4 addresses as router IDs....
Implemented two new symbol handling functions:
o cf_define_symbol() -- it assigns a meaning to a symbol, bailing out if it already has one. o cf_find_symbol() -- finds symbol by name and creates it if not found.
Also modified filter/config.Y to make use of the first function.
Sets of integers now actually work. Sets of IP will work as soon ascompare function is ready.
Filters upgraded - a bit. Moved code to filter.c because it is whereit belongs. (f-util.c stays there for auxiliary and non-important things.)
After today's lengthy discussions about filter syntax, let's clean upwhitespace/semicolon rules for whole config file:
o All non-zero amounts of whitespace are equivalent to single space (aka `all the whitespace has been born equal' ;-)). o Comments count as whitespace....
Slightly better generator of default protocol instance names.
'#' comments in config files are equivalent to end of line, thereforealso to implicit ';'.
Implemented new configuration/reconfiguration interface and defined protocolstate machines. Full explanation will follow soon.
#if 1 that creeped into cvs killed.
Filters added. They are unable to do anything interesting for now(with exception of printing integers to screen), but they exist.
New makefiles. Includes support for out-of-source-tree builds.
cf_error() now accepts any format strings instead of just an errormessage. Also added extra kludge to get rid of collisions of REJECTsymbols.
Name cleanups as suggested by Pavel:
- cfg_strcpy() > cfg_strdup() mempool -> linpool, mp_* -> lp_* [to avoid confusion with memblock, mb_*]
Anyway, it might be better to stop ranting about names and do some real work.
Created new functions for allocating configuration data:
o cfg_alloc(size) -- generic memory allocation o cfg_allocu(size) -- unaligned memory allocation o cfg_allocz(size) -- zeroed memory allocation o cfg_strcpy(str) -- allocate a copy of a string...
Trivial 15-line bison excercise: Implemented expressions includinguser-defined numeric symbols. Whenever possible, use `expr' insteadof `NUM' to get full express ion power :-)
Added generator of default names.