summaryrefslogtreecommitdiffstats
path: root/tests/xmlfiles/21-rule-byteorder.xml
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-06-27 20:09:34 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-27 21:17:54 +0200
commitdc9733e097959f4e167244549f58cd3bef7af79b (patch)
treee003e7557b63b7b00eb4864cb4bb0b2d92660ec6 /tests/xmlfiles/21-rule-byteorder.xml
parent443410dd335732dbcb2a6f1524d7481e506d67c1 (diff)
test: add testbench for XML
This patch add a testbench for XML parsing, which may be extended to test JSON as well. To use it: $ cd test/ $ make nft-parsing-test $ ./nft-parsing-test xmlfiles/ This testbench supersedes old .sh test scripts, so they are deleted. [ I have mangled this patch to rename/mangle files, to colorize the test output and not to compile XML inconditionally --pablo ] Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/xmlfiles/21-rule-byteorder.xml')
-rw-r--r--tests/xmlfiles/21-rule-byteorder.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/xmlfiles/21-rule-byteorder.xml b/tests/xmlfiles/21-rule-byteorder.xml
new file mode 100644
index 0000000..44f9b78
--- /dev/null
+++ b/tests/xmlfiles/21-rule-byteorder.xml
@@ -0,0 +1,12 @@
+<rule family="ip" table="test" chain="test" handle="1000" version="0">
+ <rule_flags>123</rule_flags>
+ <compat_flags>123</compat_flags>
+ <compat_proto>123</compat_proto>
+ <expr type="byteorder">
+ <sreg>3</sreg>
+ <dreg>4</dreg>
+ <op>hton</op>
+ <len>4</len>
+ <size>4</size>
+ </expr>
+</rule>