summaryrefslogtreecommitdiff
path: root/conf/cf-lex.l
AgeCommit message (Collapse)Author
2015-12-20ROA code switchoffJan Moskyto Matejka
2015-11-25Merge branch 'master' into int-newOndrej Zajicek (work)
2015-11-09Conf: Fixes bug in symbol lookup during reconfigurationOndrej Zajicek (work)
Symbol lookup by cf_find_symbol() not only did the lookup but also added new void symbols allocated from cfg_mem linpool, which gets broken when lookups are done outside of config parsing, which may lead to crashes during reconfiguration. The patch separates lookup-only cf_find_symbol() and config-modifying cf_get_symbol(), while the later is called only during parsing. Also new_config and cfg_mem global variables are NULLed outside of parsing.
2015-11-05Initial commit on integrated BIRDOndrej Zajicek (work)
New data types net_addr and variants (in lib/net.h) describing network addresses (prefix/pxlen). Modifications of FIB structures to handle these data types and changing everything to use these data types instead of prefix/pxlen pairs where possible. The commit is WiP, some protocols are not yet updated (BGP, Kernel), and the code contains some temporary scaffolding. Comments are welcome.
2015-02-21Bump max symbol length to 64.Ondrej Zajicek
And move the constant to conf.h header. Thanks to Alexander Chernikov for the patch.
2014-10-24Integrated IP functions.Ondrej Zajicek
2014-10-02Allows more constants in set literals.Ondrej Zajicek
Thanks to Michael Fincham for the bugreport.
2014-03-25Fixes file descriptor leak when parser ends with error.Ondrej Zajicek
Thanks to MrBr for the bugreport.
2013-08-15Symbol names enclosed by apostrophes can contain colons.Ondrej Filip
2013-07-25Allows to define constants of all filter types.Ondrej Zajicek
2013-02-10Symbol names enclosed by apostrophes can contain DOTs.Ondrej Filip
2012-07-18Implements wildcard matching in config file include.Ondrej Zajicek
Also fixes some minor bugs in include. Thanks Kelly Cochran for suggestion and draft patch.
2012-03-18Route Origin Authorization basics.Ondrej Zajicek
- ROA tables, which are used as a basic part for RPKI. - Commands for examining and modifying ROA tables. - Filter operators based on ROA tables consistent with RFC 6483.
2011-12-22Fixes parsing larger numbers on 64bit platforms.Ondrej Zajicek
2011-11-10Fixes missing header.Ondrej Zajicek
2011-11-07Implements protocol templates.Ondrej Zajicek
Based on the patch from Alexander V. Chernikov. Extended to support almost all protocols. Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
2011-10-10Fixes for include.Ondrej Zajicek
2011-09-11Configuration can include other files.Ondrej Filip
2011-05-06Fixes several problems in filter syntax.Ondrej Zajicek
- Fixes several conflicts in the grammar. - Fixes a bug in (a..b, c) pair patterns. - Makes pair patterns orthogonal. - Allows term expressions in pair patterns without additional ( ). - Allows several comma separated values in switch cases.
2011-03-23A hack to distinguish if..else from else: in case.Ondrej Zajicek
The old BIRD grammar needs two lookaheads to distinguish if..else from else: in case, which caused the parser to fail on some combinations of both expressions. This patch replaces two tokens 'else' ':' by one token 'else:' to fix that.
2011-03-13Implements Router Advertisement protocol.Ondrej Zajicek
2010-05-02Merge several fixes suggested by Joakim Tjernlund.Ondrej Zajicek
2010-02-20Implements pattern match for 'show protocols' command.Ondrej Zajicek
And generally consolidates protocol commands.
2010-02-10Define symbols as text between ''.Ondrej Filip
2009-03-14New syntax for bgp_pathOndrej Zajicek
2009-01-27New syntax for bgp_pathOndrej Zajicek
2000-06-08Fixes for the programmer's manual.Martin Mares
2000-06-07Fixes to the progdoc.Martin Mares
2000-06-07Spelling fixes to progdoc.Martin Mares
2000-06-04Nested scopes could never have worked. My fault I wrote such a buggy code,Martin Mares
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's given and it if it's an already defined symbol, but in a different scope, a copy is created in the current scope and redefined to the new meaning, the consequence being that it cf_define_symbol() now returns the new symbol you need to use when assigning aux and aux2.
2000-06-04Moved parser docs to cf-lex.l, so that the parser compiles.Martin Mares
2000-06-03Documentation.Martin Mares
2000-06-03cf_symbol_class_name now recognizes SYM_IPA.Martin Mares
2000-06-01Added && and ||.Pavel Machek
2000-05-30Recognize `!'.Martin Mares
2000-05-25Use ? in path matching to avoid /* trap.Pavel Machek
2000-04-28Include CF_HDR section in keywords.h as well, so that protocol symbolsMartin Mares
can be used in definition of ENUM's.
2000-03-31Include "lib/string.h" instead of <string.h>. It should give us bzero()Martin Mares
and other non-portable functions on all systems.
2000-03-10Fix <=, >=, !=Pavel Machek
2000-01-19Split off general commands to cmds.c.Martin Mares
Added `show symbols' command which dumps whole symbol table together with symbol types etc.
2000-01-17Separated `official protocol names' used in status dumps from name templatesMartin Mares
used 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 grammar includes proto_name which generates the name and interns it in the symbol table.
2000-01-16When a quoted string is encountered, don't forget to copy it to theMartin Mares
config pool before passing it to the parser.
1999-12-02Avoid `default rule can be matched' warning in CLI state.Martin Mares
1999-11-30Lexer supports fallback symbol tables and uses them to recognizeMartin Mares
symbols from global config when parsing CLI commands. cf_lex_init_tables() is now called automatically inside the lexer.
1999-11-15Defined CF_ENUM.Martin Mares
1999-11-04Symbols are not scoped.Martin Mares
1999-11-03You should not follow next two times.Pavel Machek
1999-10-31Parse CLI commands. We use the same parser as for configuration files (becauseMartin Mares
we want to allow filter and similar complex constructs to be used in commands and we should avoid code duplication), only with CLI_MARKER token prepended before the whole input. Defined macro CF_CLI(cmd, args, help) for defining CLI commands in .Y files. The first argument specifies the command itself, the remaining two arguments are copied to the help file (er, will be copied after the help file starts to exist). This macro automatically creates a skeleton rule for the command, you only need to append arguments as in: CF_CLI(STEAL MONEY, <$>, [[Steal <$> US dollars or equivalent in any other currency]]): NUM { cli_msg(0, "%d$ stolen", $3); } ; Also don't forget to reset lexer state between inputs.
1999-08-03Basic support for IPv6. The system-dependent part doesn't work yet,Martin Mares
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. o Router ID must be configured manually on IPv6 systems. o Added SCOPE_ORGANIZATION for org-scoped IPv6 multicasts. o Fixed few places where ipa_(hton|ntoh) was called as a function returning converted address.
1999-05-17Implemented two new symbol handling functions:Martin Mares
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.