From b716c2b48a77fd0c01be128d704d9cd2cd5243b3 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 3 Sep 2015 18:23:18 +0200 Subject: tests: add concatenations and maps; combine them too This patch adds simple tests for concatenation and maps, including more advanced tests that combine them. Signed-off-by: Pablo Neira Ayuso --- tests/regression/ip/ip.t.payload.inet | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/regression/ip/ip.t.payload.inet') diff --git a/tests/regression/ip/ip.t.payload.inet b/tests/regression/ip/ip.t.payload.inet index dbc7852b..4caea1e3 100644 --- a/tests/regression/ip/ip.t.payload.inet +++ b/tests/regression/ip/ip.t.payload.inet @@ -465,3 +465,15 @@ inet test-inet input [ bitwise reg 1 = (reg=1 & 0x0000ffff ) ^ 0x00000000 ] [ cmp eq reg 1 0x0000ffff ] +# ip saddr . ip daddr . ip protocol { 1.1.1.1 . 2.2.2.2 . tcp, 1.1.1.1 . 3.3.3.3 . udp} +set%d test-ip 3 +set%d test-ip 0 + element 01010101 02020202 00000006 : 0 [end] element 01010101 03030303 00000011 : 0 [end] +inet test-ip input + [ meta load nfproto => reg 1 ] + [ cmp eq reg 1 0x00000002 ] + [ payload load 4b @ network header + 12 => reg 1 ] + [ payload load 4b @ network header + 16 => reg 9 ] + [ payload load 1b @ network header + 9 => reg 10 ] + [ lookup reg 1 set set%d ] + -- cgit v1.2.3