summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/tcp.t.payload
blob: ed0dcc8481ee67d6eb9ac416ecc14219599e22c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ip protocol tcp tcp dport ssh accept
ip test-ip input
  [ payload load 1b @ network header + 9 => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ payload load 2b @ transport header + 2 => reg 1 ]
  [ cmp eq reg 1 0x00001600 ]
  [ immediate reg 0 accept ]

# ip protocol ne tcp udp dport ssh accept
ip test-ip input
  [ payload load 1b @ network header + 9 => reg 1 ]
  [ cmp neq reg 1 0x00000006 ]
  [ payload load 1b @ network header + 9 => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ payload load 2b @ transport header + 2 => reg 1 ]
  [ cmp eq reg 1 0x00001600 ]
  [ immediate reg 0 accept ]