diff options
author | Florian Westphal <fw@strlen.de> | 2015-08-12 03:23:40 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2015-09-18 00:06:12 +0200 |
commit | e540acb8c1e16c9a9afc4c800ce524e47be803d4 (patch) | |
tree | 8bdd03c6d0b9c34bff2aed1791816035927a1eb6 /tests/regression/inet/tcp.t.payload.ip | |
parent | 048a5e093fde9db515ebc7b14f91bceb6cbd5949 (diff) |
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 <fw@strlen.de>
Diffstat (limited to 'tests/regression/inet/tcp.t.payload.ip')
-rw-r--r-- | tests/regression/inet/tcp.t.payload.ip | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regression/inet/tcp.t.payload.ip b/tests/regression/inet/tcp.t.payload.ip index c21cca1b..34c97143 100644 --- a/tests/regression/inet/tcp.t.payload.ip +++ b/tests/regression/inet/tcp.t.payload.ip @@ -498,3 +498,11 @@ ip test-ip4 input [ payload load 2b @ transport header + 18 => reg 1 ] [ lookup reg 1 set set%d ] +# tcp doff 8 +ip test-ip4 input + [ payload load 1b @ network header + 9 => 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 ] + |