]> git.ipfire.org Git - thirdparty/libnftnl.git/log
thirdparty/libnftnl.git
12 years agochain: add function to export tables in JSON format
Alvaro Neira Ayuso [Sat, 8 Jun 2013 03:36:04 +0000 (03:36 +0000)] 
chain: add function to export tables in JSON format

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoset_elem: add NFT_SET_ELEM_ATTR_DATA to set data for mapping
Pablo Neira Ayuso [Sat, 8 Jun 2013 17:15:40 +0000 (19:15 +0200)] 
set_elem: add NFT_SET_ELEM_ATTR_DATA to set data for mapping

We need this new attribute to configure the data that is attached
to an element. This is useful for the mapping feature to retrieve
data based on keys (like a dictionary) that nftables provides.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodata_reg: xml: delete unreachable code in _veredict_xml_parse()
Arturo Borrero Gonzalez [Sat, 8 Jun 2013 04:02:33 +0000 (04:02 +0000)] 
data_reg: xml: delete unreachable code in _veredict_xml_parse()

Similar to commit 414ac29.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: fix nft_*_unset function attribute that don't release data
Pablo Neira Ayuso [Fri, 7 Jun 2013 12:24:47 +0000 (14:24 +0200)] 
src: fix nft_*_unset function attribute that don't release data

In (dde2039 src: add nft_*_unset functions), I mangled Arturo's
patch to add a default case, but he was intentionally not adding
it to unset attributes that require no memory releases.

I prefered to add the attributes explicitly in the switch rather
on failing back on the default action.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: add nft_*_unset functions
Arturo Borrero Gonzalez [Fri, 7 Jun 2013 00:52:17 +0000 (00:52 +0000)] 
src: add nft_*_unset functions

These functions unset the given attribute in each object and
release the data if needed.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexamples: nft-table-get: export in JSON format
Alvaro Neira Ayuso [Thu, 6 Jun 2013 23:14:23 +0000 (23:14 +0000)] 
examples: nft-table-get: export in JSON format

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agotable: add function to export tables in JSON format
Alvaro Neira Ayuso [Thu, 6 Jun 2013 23:14:16 +0000 (23:14 +0000)] 
table: add function to export tables in JSON format

Signed-off-by: Alvaro Neira <alvaroneay@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: xml: add versioning
Arturo Borrero Gonzalez [Mon, 3 Jun 2013 05:58:38 +0000 (05:58 +0000)] 
src: xml: add versioning

Add version to XML chunks in case of future changes.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexamples: nft-rule-add: fix compilation warning
Pablo Neira Ayuso [Wed, 5 Jun 2013 03:50:01 +0000 (05:50 +0200)] 
examples: nft-rule-add: fix compilation warning

  CC     nft-rule-add.o
nft-rule-add.c:105:13: warning: ‘add_payload’ defined but not used [-Wunused-function]

Reported-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexamples: nft-rule-add: remove unexistent libnftables/payload.h include
Pablo Neira Ayuso [Wed, 5 Jun 2013 03:48:03 +0000 (05:48 +0200)] 
examples: nft-rule-add: remove unexistent libnftables/payload.h include

Reported-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexpr: immediate: fix display of dreg expression
Eric Leblond [Mon, 3 Jun 2013 22:05:23 +0000 (22:05 +0000)] 
expr: immediate: fix display of dreg expression

Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexamples: nft-events: add newline to output
Eric Leblond [Mon, 3 Jun 2013 22:05:22 +0000 (22:05 +0000)] 
examples: nft-events: add newline to output

This patch adds a new line to messages to be sure that they are
printed to the shell as soon as they occur. This also fixes the
display of output.

Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agorule: fix bad offset returned by _snprintf
Arturo Borrero Gonzalez [Mon, 3 Jun 2013 10:44:52 +0000 (10:44 +0000)] 
rule: fix bad offset returned by _snprintf

Noted while calling _snprintf functions consecutively.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodata_reg: xml: delete unreachable code
Arturo Borrero Gonzalez [Mon, 3 Jun 2013 07:15:20 +0000 (07:15 +0000)] 
data_reg: xml: delete unreachable code

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodata_reg: xml: fix using bad temp variable
Arturo Borrero Gonzalez [Wed, 29 May 2013 12:45:06 +0000 (12:45 +0000)] 
data_reg: xml: fix using bad temp variable

It should use 'utmp' instead of 'tmp'.

Signed-off-by: Arturo Borero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodata_reg: remove conditional XML printing if parsing is disabled
Arturo Borrero Gonzalez [Tue, 28 May 2013 05:06:21 +0000 (05:06 +0000)] 
data_reg: remove conditional XML printing if parsing is disabled

XML printing is supported even if XML parsing is not enabled.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodata_reg: Delete trailing space in snprintf_xml
Arturo Borrero Gonzalez [Tue, 28 May 2013 05:07:02 +0000 (05:07 +0000)] 
data_reg: Delete trailing space in snprintf_xml

A minor cosmetic change. Delete the space before '>'.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agorule: fix table flag not being set at XML parsing
Arturo Borrero Gonzalez [Tue, 28 May 2013 05:06:08 +0000 (05:06 +0000)] 
rule: fix table flag not being set at XML parsing

Added in (51370f0 src: add support for XML parsing).

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agochain: delete useless castings
Arturo Borrero [Fri, 24 May 2013 01:28:41 +0000 (01:28 +0000)] 
chain: delete useless castings

These casting were useless.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexamples: XML parsing examples
Arturo Borrero Gonzalez [Wed, 22 May 2013 00:33:25 +0000 (00:33 +0000)] 
examples: XML parsing examples

Some code snipplets to add tables/chain/rules using the XML representation.

The examples contains:
 * A binary to parse/add the object using libnftables.
 * A shellscript to easily call that binary, doing some tests.
 * table/chain/rule sample XML file.

I included my name in new files, but I don't know if this is correct. Please let me know.

Instructions:
 $ cd examples/ ; make nft-table-xml-add
 # cd test/ ; ./nft-table-xml-add.sh

NOTE: Some kernel changes are required to allow reinsert exactly what is printed (handle handling, flags..)

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: add support for XML parsing
Arturo Borrero Gonzalez [Thu, 23 May 2013 10:03:04 +0000 (12:03 +0200)] 
src: add support for XML parsing

This patch adds capabilities for parsing a XML table/chain/rule.

Some comments:

* The XML data is case sensitive
  (so <chain>asd</chain> != <chain>ASD</chain> != <CHAIN>asd</CHAIN>)
* All exported functions receive XML and return an object (table|chain|rule).
* To compile the lib with XML parsing support, run './configure --with-xml-parsing'
* XML parsing is done with libmxml (http://minixml.org). XML parsing depends
  on this external lib, this dependency is optional at compile time.

NOTE: expr/target and expr/match binary data are exported.

[ Fixed to compile without --with-xml-parsing --pablo ]

Signed-off-by: Arturo Borrero González <arturo.borrero.glez@gmail.com>
12 years agomap: fix missing nft_rule_expr_build_payload export
Tomasz Bursztyka [Tue, 14 May 2013 00:51:20 +0000 (00:51 +0000)] 
map: fix missing nft_rule_expr_build_payload export

Update .map file to include it, otherwise it's not exported.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexpr: remove non implemented function
Tomasz Bursztyka [Tue, 14 May 2013 00:51:19 +0000 (00:51 +0000)] 
expr: remove non implemented function

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agorule: declare nft_rule_list structure at a proper place
Tomasz Bursztyka [Tue, 14 May 2013 00:51:18 +0000 (00:51 +0000)] 
rule: declare nft_rule_list structure at a proper place

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agobuild: add an autogen.sh script
Tomasz Bursztyka [Tue, 14 May 2013 00:51:17 +0000 (00:51 +0000)] 
build: add an autogen.sh script

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agogit: add a .gitignore file
Tomasz Bursztyka [Tue, 14 May 2013 00:51:16 +0000 (00:51 +0000)] 
git: add a .gitignore file

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agochain: add nft_chain_attr_set_str
Pablo Neira Ayuso [Thu, 16 May 2013 16:38:10 +0000 (18:38 +0200)] 
chain: add nft_chain_attr_set_str

And constify data passed to nft_chain_attr_set.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agotable: add nft_table_attr_[set|table]_str
Pablo Neira Ayuso [Thu, 16 May 2013 16:34:47 +0000 (18:34 +0200)] 
table: add nft_table_attr_[set|table]_str

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: delete exporting internal flags in XML
Arturo Borrero Gonzalez [Mon, 29 Apr 2013 02:36:07 +0000 (02:36 +0000)] 
src: delete exporting internal flags in XML

The uint32_t flags attribute is internal, so no need to
export via XML.

Signed-off-by: Arturo Borrero González <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: remove trailing \n from all nft_*_snprintf functions
Pablo Neira Ayuso [Thu, 18 Apr 2013 23:51:57 +0000 (01:51 +0200)] 
src: remove trailing \n from all nft_*_snprintf functions

The caller should add it in case it needs it.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: remove trailing newlines, tabs and spaces from XML format
Arturo Borrero Gonzalez [Thu, 18 Apr 2013 23:37:23 +0000 (01:37 +0200)] 
src: remove trailing newlines, tabs and spaces from XML format

Delete all \n and \t from XML output, any reasonable XML viewer
already does the nifty formatting for us.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agorule: fix snprintf XML output offset for rule.
Arturo Borrero Gonzalez [Wed, 10 Apr 2013 06:39:57 +0000 (06:39 +0000)] 
rule: fix snprintf XML output offset for rule.

Signed-off-by: Arturo Borrero González <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agosrc: rule: fix compat XML output
Arturo Borrero Gonzalez [Sun, 7 Apr 2013 22:35:02 +0000 (22:35 +0000)] 
src: rule: fix compat XML output

The compat struct was not printed in XML. So, I think give output
format is the first step to parse it.

Signed-off-by: Arturo Borrero <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoexpr: basic support for printing nft_data_reg in XML format
Arturo Borrero Gonzalez [Sun, 7 Apr 2013 22:30:22 +0000 (22:30 +0000)] 
expr: basic support for printing nft_data_reg in XML format

nft_data_reg now is printed in XML according to what it contains

<data> nodes have been also renamed.

Arturo Borrero Gonzalez says:

====================
cmp is using <cmpdata> <cmpdata> has <data_reg></data_reg> which
can also be redundant.

But all around the XML printing (including sets, an incoming patch)
i've been nesting the data_reg into another XML node, so you could
easily see (also the XML parser) the difference between (for example.
in set) nft_set_elem->key and nft_set_elem->data.

As I needed to nest in nft_set_elem I decided to follow a constant
line and do nest all data_reg.
====================

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agosrc: constify nft_*_attr_set and nft_*_attr_set_str
Pablo Neira Ayuso [Sun, 14 Apr 2013 12:34:53 +0000 (14:34 +0200)] 
src: constify nft_*_attr_set and nft_*_attr_set_str

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: lookup: fix missing registration
Pablo Neira Ayuso [Sun, 14 Apr 2013 10:44:51 +0000 (12:44 +0200)] 
expr: lookup: fix missing registration

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agorule: fix wrong symbol export
Pablo Neira Ayuso [Sun, 14 Apr 2013 10:30:58 +0000 (12:30 +0200)] 
rule: fix wrong symbol export

Exported symbol should be nft_rule_attr_get_u32, not nft_rule_attr_get_u64.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agosrc: allow to get and to set NFT_*_ATTR_FAMILY
Arturo Borrero Gonzalez [Sat, 30 Mar 2013 15:15:19 +0000 (15:15 +0000)] 
src: allow to get and to set NFT_*_ATTR_FAMILY

This patch adds support to get and set the attribute
NFT_{TABLE|CHAIN|RULE}_ATTR_FAMILY.

I found this useful when parsing a XML table|chain|rule (future patch).

Signed-off-by: Arturo Borrero <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: match: Fix a typo
Arturo Borrero Gonzalez [Fri, 29 Mar 2013 05:34:27 +0000 (05:34 +0000)] 
expr: match: Fix a typo

Signed-off-by: Arturo Borrero <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexamples: fix rule addition
Pablo Neira Ayuso [Sun, 17 Mar 2013 18:01:28 +0000 (19:01 +0100)] 
examples: fix rule addition

Missing NLM_F_CREATE, otherwise the automatic handle allocation
returns -EINVAL.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agosrc: change XML output format to use element instead of attributes
Arturo Borrero Gonzalez [Wed, 13 Feb 2013 12:15:13 +0000 (12:15 +0000)] 
src: change XML output format to use element instead of attributes

There are some problems in using attributes:

* they cannot contain multiple values (child elements can)
* they are not easily expandable (for future changes)
* they cannot describe structures (child elements can)
* they are more difficult to manipulate by program code
* attribute values are not easy to test against a DTD

Extracted from "XML Elements vs. Attributes" at:

http://www.w3schools.com/dtd/dtd_el_vs_attr.asp

For more information.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: match: Delete unused includes
Arturo Borrero Gonzalez [Tue, 12 Feb 2013 13:08:31 +0000 (13:08 +0000)] 
expr: match: Delete unused includes

Signed-off-by: Arturo Borrero <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexamples: add XML output for table/chain/rule
Arturo Borrero Gonzalez [Mon, 11 Feb 2013 12:56:38 +0000 (12:56 +0000)] 
examples: add XML output for table/chain/rule

To show an instance of this patch:

(shell)$ ./nft-table-get xml
<table name="filter" >
        <properties>
                <family value="2" />
                <flags value="5" table_flags="0" />
        </properties>
</table>

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.co
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agosrc: add XML output support
Arturo Borrero Gonzalez [Fri, 8 Feb 2013 16:51:56 +0000 (17:51 +0100)] 
src: add XML output support

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: add lookup expression for set-based lookups
Pablo Neira Ayuso [Tue, 5 Feb 2013 13:01:39 +0000 (14:01 +0100)] 
expr: add lookup expression for set-based lookups

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoset: add support to add elements to sets
Pablo Neira Ayuso [Sat, 2 Feb 2013 11:17:31 +0000 (12:17 +0100)] 
set: add support to add elements to sets

This patch includes iterators and several examples.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoset: complete support
Pablo Neira Ayuso [Sat, 2 Feb 2013 10:38:46 +0000 (11:38 +0100)] 
set: complete support

Including examples.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agorule: add protocol and flags support for xtables over nftables
Pablo Neira Ayuso [Fri, 25 Jan 2013 14:56:17 +0000 (15:56 +0100)] 
rule: add protocol and flags support for xtables over nftables

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agorule: add support for rule flags
Pablo Neira Ayuso [Sat, 19 Jan 2013 19:12:15 +0000 (20:12 +0100)] 
rule: add support for rule flags

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: fix setting packet statistics
Pablo Neira Ayuso [Wed, 23 Jan 2013 01:42:13 +0000 (02:42 +0100)] 
chain: fix setting packet statistics

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: add nft_chain_list_del
Pablo Neira Ayuso [Sun, 20 Jan 2013 20:40:44 +0000 (21:40 +0100)] 
chain: add nft_chain_list_del

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: add type and flags to snprintf interface
Pablo Neira Ayuso [Tue, 15 Jan 2013 13:16:38 +0000 (14:16 +0100)] 
expr: add type and flags to snprintf interface

Propagate the type and flags parameter to the expressions, so we can
implement outputs in different formats.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agorule: Add a function to get rule's family
Tomasz Bursztyka [Thu, 10 Jan 2013 04:29:05 +0000 (04:29 +0000)] 
rule: Add a function to get rule's family

Add nft_rule_attr_get_u8 to obtain the family number.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
13 years agoinclude: update internal copy of headers
Pablo Neira Ayuso [Sun, 30 Dec 2012 00:24:52 +0000 (01:24 +0100)] 
include: update internal copy of headers

To get it in sync with the existing kernel code.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: support Patrick's chain rename approach
Pablo Neira Ayuso [Sat, 29 Dec 2012 19:50:39 +0000 (20:50 +0100)] 
chain: support Patrick's chain rename approach

Support the new approach for chain renaming based on the chain
handle.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoset: add initial support
Pablo Neira Ayuso [Mon, 24 Dec 2012 16:39:01 +0000 (17:39 +0100)] 
set: add initial support

Add initial support for nf_tables native sets

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: Add support for NAT expressions
Tomasz Bursztyka [Thu, 15 Nov 2012 04:40:25 +0000 (04:40 +0000)] 
expr: Add support for NAT expressions

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
13 years agoexamples: table: add example of dormant tables
Pablo Neira Ayuso [Sun, 11 Nov 2012 21:53:57 +0000 (22:53 +0100)] 
examples: table: add example of dormant tables

Now we add a non-dormant table which is not active. We can add
chains and rules to it that would not have any effect. Once we
change the flag to wake it up, the rule-set becomes active.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agotable: add nft_table_attr_set_u32 and nft_table_attr_get_u32
Pablo Neira Ayuso [Thu, 8 Nov 2012 16:31:04 +0000 (17:31 +0100)] 
table: add nft_table_attr_set_u32 and nft_table_attr_get_u32

Useful to obtain recently added table flags.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agotable: support NFTA_TABLE_FLAGS
Pablo Neira Ayuso [Thu, 8 Nov 2012 16:01:41 +0000 (17:01 +0100)] 
table: support NFTA_TABLE_FLAGS

This patch adds support for the table flags, only one is possible
at the moment (NFT_TABLE_F_DORMANT).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agotable: use internal flags for attribute
Pablo Neira Ayuso [Thu, 8 Nov 2012 15:53:02 +0000 (16:53 +0100)] 
table: use internal flags for attribute

Fix missing use of internal flags for table objects in attributes.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: add support for chain types
Pablo Neira Ayuso [Sat, 3 Nov 2012 12:38:54 +0000 (13:38 +0100)] 
chain: add support for chain types

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agorule: use 64-bits handle instead of 16-bits
Pablo Neira Ayuso [Sun, 28 Oct 2012 19:42:23 +0000 (20:42 +0100)] 
rule: use 64-bits handle instead of 16-bits

5c4d30c nf_tables: use 64-bits rule handle instead of 16-bits

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: Add support for NFTA_CHAIN_NEW_NAME attribute
Tomasz Bursztyka [Thu, 1 Nov 2012 02:20:37 +0000 (02:20 +0000)] 
chain: Add support for NFTA_CHAIN_NEW_NAME attribute

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agochain: Handle fixed sized name
Tomasz Bursztyka [Thu, 1 Nov 2012 02:20:36 +0000 (02:20 +0000)] 
chain: Handle fixed sized name

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexpr: add bitwise
Pablo Neira Ayuso [Sun, 28 Oct 2012 17:07:14 +0000 (18:07 +0100)] 
expr: add bitwise

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexamples: add nft-events
Pablo Neira Ayuso [Sun, 14 Oct 2012 18:33:08 +0000 (20:33 +0200)] 
examples: add nft-events

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoexamples: add nft-compat-get
Pablo Neira Ayuso [Sun, 14 Oct 2012 10:53:22 +0000 (12:53 +0200)] 
examples: add nft-compat-get

This utility allows to consult x_tables match/target revisions supported
via the nft_compat layer.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agoinitial version of libnftables
Pablo Neira Ayuso [Fri, 3 Aug 2012 15:31:48 +0000 (17:31 +0200)] 
initial version of libnftables

It adds support for table, chain and rule handling.

This also includes expression handling for each rule.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>