summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add support for new set API and standalone setsPatrick McHardy2009-07-2813-349/+1515
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* expressions: kill seperate sym_type datatype for symbolsPatrick McHardy2009-04-015-15/+13
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* datatype: add/move size and byte order information into data typesPatrick McHardy2009-03-317-33/+56
| | | | | | | | | | Add size and type information to non-basetype types and remove the now redundant information from the symbol tables. This will be used to determine size and byteorder of set members without analyzing the ruleset for incremental update operations. Signed-off-by: Patrick McHardy <kaber@trash.net>
* datatype: maintain table of all datatypes and add registration/lookup functionPatrick McHardy2009-03-318-32/+139
| | | | | | | | | | | Add a table containing all available datatypes and registration/lookup functions. This will be used to associate a stand-alone set in the kernel with the correct type without parsing the entire ruleset. Additionally it would now be possible to remove the global declarations for the core types. Not done yet though. Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: move data related functions to netlink.cPatrick McHardy2009-03-314-117/+128
| | | | | | | Move the data related function to netlink.c as they're going to be needed outside of rule context for set maintenance. Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: use libnl OBJ_CAST macroPatrick McHardy2009-03-312-9/+5
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: consistent naming fixesPatrick McHardy2009-03-311-4/+4
| | | | | | Rename libnl netlink data to "nld" for consistency. Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: add helper function for socket callback modificationPatrick McHardy2009-03-311-6/+8
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* ct: resync netlink header and properly add ct l3protocol supportPatrick McHardy2009-03-314-8/+12
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink_linearize: remove two debugging printfsPatrick McHardy2009-03-311-2/+0
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Fix some memory leaksPatrick McHardy2009-03-202-2/+5
| | | | | | Free nested chain handles and command structures when done. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Release scopes during cleanupPatrick McHardy2009-03-203-0/+16
| | | | | | Properly release the user-defined symbols. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Fix multiple references to the same user defined symbolic expressionPatrick McHardy2009-03-201-2/+1
| | | | | | | | The expression needs to be cloned so transformations don't corrupt the original expression. This could be slightly optimized by only taking a reference and COW'ing when necessary (which is actually quite rare). Signed-off-by: Patrick McHardy <kaber@trash.net>
* expr: add support for cloning expressionsPatrick McHardy2009-03-206-0/+125
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add more notes to INSTALLPatrick McHardy2009-03-201-2/+9
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add support for user-defined symbolic constantsPatrick McHardy2009-03-205-12/+59
| | | | | | | | | | | | | | | | | | User-defined constants can be used like this: define allowed_hosts = { 192.168.0.0/24, 10.0.0.20-10.0.0.30 } define udp_services = domain define tcp_services = { ssh, domain } ip saddr $allowed_hosts udp dport $udp_services counter accept ip saddr $allowed_hosts tcp dport $tcp_services counter accept Recursive definitions are possible, but currently not fully handled. Anything requiring transformations (sets using ranges) can not be used more than once currently since the expressions need to be COW'ed previously. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add support for scoping and symbol bindingPatrick McHardy2009-03-204-2/+103
| | | | | | | | | | | | As a first step towards stand-alone sets, add support for scoping and binding symbols. This will be used for user-defined constants, as well as declarations of modifiable (stand-alone) sets once the kernel side is ready. Scopes are currently limited to three nesting levels: the global scope, table block scopes and chain block scopes. Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: consistently use $@ for location of entire groupingPatrick McHardy2009-03-201-15/+15
| | | | | | Replace use of specific location references for single-element rules. Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: fix common_block usage in chain and table blocksPatrick McHardy2009-03-201-2/+2
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add installation instructionsPatrick McHardy2009-03-201-0/+52
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* build: fix installation when docs are not builtPatrick McHardy2009-03-181-5/+11
| | | | | | Don't try to install non-existant files. Signed-off-by: Patrick McHardy <kaber@trash.net>
* build: remove double subdir in build outputPatrick McHardy2009-03-181-1/+1
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Allow newlines in regular mapsPatrick McHardy2009-03-181-3/+5
| | | | | | The previous patch only handled sets and verdict maps. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Allow newlines in sets and mapsPatrick McHardy2009-03-181-11/+29
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* kill obsolete TODO itemPatrick McHardy2009-03-181-2/+0
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Fix use of reserved names in header sandwichPatrick McHardy2009-03-1816-48/+48
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* lexer: fix some whitespace errorsPatrick McHardy2009-03-181-2/+2
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: wrap libnl object dumping in #ifdef DEBUGPatrick McHardy2009-03-181-0/+2
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* templates: add IPv6 raw table templatePatrick McHardy2009-03-181-0/+6
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* build: work around docbook2x-man inability to specify output filePatrick McHardy2009-03-181-1/+1
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Initial commitv0.01-alpha1Patrick McHardy2009-03-1891-0/+17210