From cb21869649208118ed61354e2674858e4ff6c23c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 3 Nov 2020 12:04:20 +0100 Subject: json: tcp: add raw tcp option match support To similar change as in previous one, this time for the jason (de)serialization. Re-uses the raw payload match syntax, i.e. base,offset,length. Signed-off-by: Florian Westphal --- tests/py/any/tcpopt.t.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/py/any/tcpopt.t.json') diff --git a/tests/py/any/tcpopt.t.json b/tests/py/any/tcpopt.t.json index b15e36ee..139e97d8 100644 --- a/tests/py/any/tcpopt.t.json +++ b/tests/py/any/tcpopt.t.json @@ -414,6 +414,40 @@ } ] +# tcp option 255 missing +[ + { + "match": { + "left": { + "tcp option": { + "base": 255, + "len": 8, + "offset": 0 + } + }, + "op": "==", + "right": false + } + } +] + +# tcp option @255,8,8 255 +[ + { + "match": { + "left": { + "tcp option": { + "base": 255, + "len": 8, + "offset": 8 + } + }, + "op": "==", + "right": 255 + } + } +] + # tcp option window exists [ { -- cgit v1.2.3