From e540acb8c1e16c9a9afc4c800ce524e47be803d4 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 12 Aug 2015 03:23:40 +0200 Subject: tests: add tests for ip version/hdrlength/tcp doff Header fields of 4 bit lengths. Requires implicit masks and shifting of RHS constant. Signed-off-by: Florian Westphal --- tests/regression/inet/tcp.t.payload.ip6 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/regression/inet/tcp.t.payload.ip6') diff --git a/tests/regression/inet/tcp.t.payload.ip6 b/tests/regression/inet/tcp.t.payload.ip6 index 32115edc..44decab4 100644 --- a/tests/regression/inet/tcp.t.payload.ip6 +++ b/tests/regression/inet/tcp.t.payload.ip6 @@ -498,3 +498,11 @@ ip6 test-ip6 input [ payload load 2b @ transport header + 18 => reg 1 ] [ lookup reg 1 set set%d ] +# tcp doff 8 +ip6 test-ip6 input + [ payload load 1b @ network header + 6 => reg 1 ] + [ cmp eq reg 1 0x00000006 ] + [ payload load 1b @ transport header + 12 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x000000f0 ) ^ 0x00000000 ] + [ cmp eq reg 1 0x00000080 ] + -- cgit v1.2.3