summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/ct.t.payload
blob: 944208f2dde4b0210bee961d6d98a30f1a184c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ct mark set ip6 dscp << 2 | 0x10
ip6 test-ip6 output
  [ payload load 2b @ network header + 0 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
  [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
  [ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
  [ bitwise reg 1 = ( reg 1 << 0x00000002 ) ]
  [ bitwise reg 1 = ( reg 1 & 0xffffffef ) ^ 0x00000010 ]
  [ ct set mark with reg 1 ]

# ct mark set ip6 dscp << 26 | 0x10
ip6 test-ip6 output
  [ payload load 2b @ network header + 0 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
  [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
  [ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
  [ bitwise reg 1 = ( reg 1 << 0x0000001a ) ]
  [ bitwise reg 1 = ( reg 1 & 0xffffffef ) ^ 0x00000010 ]
  [ ct set mark with reg 1 ]

# ct mark set ip6 dscp | 0x04
ip6 test-ip6 output
  [ payload load 2b @ network header + 0 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
  [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
  [ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
  [ bitwise reg 1 = ( reg 1 & 0xfffffffb ) ^ 0x00000004 ]
  [ ct set mark with reg 1 ]

# ct mark set ip6 dscp | 0xff000000
ip6 test-ip6 output
  [ payload load 2b @ network header + 0 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
  [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
  [ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
  [ bitwise reg 1 = ( reg 1 & 0x00ffffff ) ^ 0xff000000 ]
  [ ct set mark with reg 1 ]

# ct mark set ip6 dscp & 0x0f << 2
ip6 test-ip6 output
  [ payload load 2b @ network header + 0 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
  [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
  [ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
  [ bitwise reg 1 = ( reg 1 & 0x0000003c ) ^ 0x00000000 ]
  [ ct set mark with reg 1 ]