summaryrefslogtreecommitdiffstats
path: root/examples/chain.xml
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-05-22 00:33:25 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2013-05-23 12:34:13 +0200
commit4d6045630bb90182abf553df1b7f2764a24620b0 (patch)
tree38f1f95d7f8adc073ded4aefb98a29bf7fcec164 /examples/chain.xml
parent51370f0eedb1c8167ab2c340d2a53f0d9f02509c (diff)
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>
Diffstat (limited to 'examples/chain.xml')
-rw-r--r--examples/chain.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/chain.xml b/examples/chain.xml
new file mode 100644
index 0000000..01ccb85
--- /dev/null
+++ b/examples/chain.xml
@@ -0,0 +1,11 @@
+<chain name="test" handle="0" bytes="59" packets="1" version="0">
+ <properties>
+ <type>filter</type>
+ <table>filter</table>
+ <prio>1</prio>
+ <use>0</use>
+ <hooknum>4</hooknum>
+ <policy>1</policy>
+ <family>10</family>
+ </properties>
+</chain>