From 22535a98470a908b879db8fc0354c5f2bbb3984e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 28 Feb 2017 13:31:54 +0100 Subject: src: revisit tcp options support Rework syntax, add tokens so we can extend the grammar more easily. This has triggered several syntax changes with regards to the original patch, specifically: tcp option sack0 left 1 There is no space between sack and the block number anymore, no more offset field, now they are a single field. Just like we do with rt, rt0 and rt2. This simplifies our grammar and that is good since it makes our life easier when extending it later on to accomodate new features. I have also renamed sack_permitted to sack-permitted. I couldn't find any option using underscore so far, so let's keep it consistent with what we have. Signed-off-by: Pablo Neira Ayuso --- tests/py/ip6/tcpopt.t.payload | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/py/ip6/tcpopt.t.payload') diff --git a/tests/py/ip6/tcpopt.t.payload b/tests/py/ip6/tcpopt.t.payload index 98389b0a..88e277d1 100644 --- a/tests/py/ip6/tcpopt.t.payload +++ b/tests/py/ip6/tcpopt.t.payload @@ -54,14 +54,14 @@ ip6 test-ip input [ exthdr load tcpopt 1b @ 3 + 2 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack_permitted kind 1 +# tcp option sack-permitted kind 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 0 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack_permitted length 1 +# tcp option sack-permitted length 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] @@ -89,28 +89,28 @@ ip6 test-ip input [ exthdr load tcpopt 4b @ 5 + 2 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 0 left 1 +# tcp option sack0 left 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 2 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 1 left 1 +# tcp option sack1 left 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 10 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 2 left 1 +# tcp option sack2 left 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 18 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 3 left 1 +# tcp option sack3 left 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] @@ -124,28 +124,28 @@ ip6 test-ip input [ exthdr load tcpopt 4b @ 5 + 6 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 0 right 1 +# tcp option sack0 right 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 6 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 1 right 1 +# tcp option sack1 right 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 14 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 2 right 1 +# tcp option sack2 right 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 4b @ 5 + 22 => reg 1 ] [ cmp eq reg 1 0x01000000 ] -# tcp option sack 3 right 1 +# tcp option sack3 right 1 ip6 test-ip input [ payload load 1b @ network header + 6 => reg 1 ] [ cmp eq reg 1 0x00000006 ] -- cgit v1.2.3