diff options
author | Phil Sutter <phil@nwl.cc> | 2021-05-04 13:41:38 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-05-19 11:52:05 +0200 |
commit | 0e3871cfd9a1e32a4ac041ce87a8057b11a89924 (patch) | |
tree | 926b57779c199024a9d8e1ceb8fd031ff28f88b7 /tests/py/inet/sctp.t | |
parent | fd81d3ec3ae8b8d1d54a708d63b2dab2c8508c90 (diff) |
exthdr: Implement SCTP Chunk matching
Extend exthdr expression to support scanning through SCTP packet chunks
and matching on fixed fields' values.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/inet/sctp.t')
-rw-r--r-- | tests/py/inet/sctp.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/py/inet/sctp.t b/tests/py/inet/sctp.t index 5188b57e..3d1c2fd6 100644 --- a/tests/py/inet/sctp.t +++ b/tests/py/inet/sctp.t @@ -41,3 +41,40 @@ sctp vtag {33, 55, 67, 88};ok sctp vtag != {33, 55, 67, 88};ok sctp vtag { 33-55};ok sctp vtag != { 33-55};ok + +# assert all chunk types are recognized +sctp chunk data exists;ok +sctp chunk init exists;ok +sctp chunk init-ack exists;ok +sctp chunk sack exists;ok +sctp chunk heartbeat exists;ok +sctp chunk heartbeat-ack exists;ok +sctp chunk abort exists;ok +sctp chunk shutdown exists;ok +sctp chunk shutdown-ack exists;ok +sctp chunk error exists;ok +sctp chunk cookie-echo exists;ok +sctp chunk cookie-ack exists;ok +sctp chunk ecne exists;ok +sctp chunk cwr exists;ok +sctp chunk shutdown-complete exists;ok +sctp chunk asconf-ack exists;ok +sctp chunk forward-tsn exists;ok +sctp chunk asconf exists;ok + +# test common header fields in random chunk types +sctp chunk data type 0;ok +sctp chunk init flags 23;ok +sctp chunk init-ack length 42;ok + +# test one custom field in every applicable chunk type +sctp chunk data stream 1337;ok +sctp chunk init initial-tsn 5;ok +sctp chunk init-ack num-outbound-streams 3;ok +sctp chunk sack a-rwnd 1;ok +sctp chunk shutdown cum-tsn-ack 65535;ok +sctp chunk ecne lowest-tsn 5;ok +sctp chunk cwr lowest-tsn 8;ok +sctp chunk asconf-ack seqno 12345;ok +sctp chunk forward-tsn new-cum-tsn 31337;ok +sctp chunk asconf seqno 12345;ok |