summaryrefslogtreecommitdiffstats
path: root/tests/py/any
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2025-10-16 14:31:46 +0200
committerPhil Sutter <phil@nwl.cc>2026-01-27 23:01:54 +0100
commit0f566ac1c1dbd9f2e7d006ca01211aae791f09a8 (patch)
treea672d67eefb7ca5b51550721c9d440bd1845a887 /tests/py/any
parentdb82466117b8bfc93923eec49114d47200f7f913 (diff)
tests: py: Update payload records
This is the bulk change of py test suite payload records with improved data reg printing in libnftnl using data (component) size and byteorder collected in nftables. Aside from printing values in the right byte order and padded with zeroes to match their actual size, this patch also exposes the improved set element dump format: * No '[end]' marker, 'element' clearly separates elements * No semi-colon for non-map elements * 'flags' value printed only if non-zero and prefixed by 'flags' to distinguish from element data Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/any')
-rw-r--r--tests/py/any/ct.t.payload89
-rw-r--r--tests/py/any/meta.t.payload232
-rw-r--r--tests/py/any/meta.t.payload.bridge10
-rw-r--r--tests/py/any/queue.t.payload2
-rw-r--r--tests/py/any/rawpayload.t.payload64
-rw-r--r--tests/py/any/rt.t.payload5
-rw-r--r--tests/py/any/tcpopt.t.payload88
7 files changed, 244 insertions, 246 deletions
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 64504134..ae4e0ec3 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -12,7 +12,7 @@ ip test-ip4 output
# ct state {new,established, related, untracked}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000008 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000040 : 0 [end]
+ element 00000008 element 00000002 element 00000004 element 00000040
ip test-ip4 output
[ ct load state => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -20,7 +20,7 @@ ip test-ip4 output
# ct state != {new,established, related, untracked}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000008 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000040 : 0 [end]
+ element 00000008 element 00000002 element 00000004 element 00000040
ip test-ip4 output
[ ct load state => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -48,27 +48,27 @@ ip test-ip4 output
# ct direction original
ip test-ip4 output
[ ct load direction => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x00 ]
# ct direction != original
ip test-ip4 output
[ ct load direction => reg 1 ]
- [ cmp neq reg 1 0x00000000 ]
+ [ cmp neq reg 1 0x00 ]
# ct direction reply
ip test-ip4 output
[ ct load direction => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# ct direction != reply
ip test-ip4 output
[ ct load direction => reg 1 ]
- [ cmp neq reg 1 0x00000001 ]
+ [ cmp neq reg 1 0x01 ]
# ct direction {reply, original}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end]
+ element 01 element 00
ip test-ip4 output
[ ct load direction => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -76,7 +76,7 @@ ip test-ip4 output
# ct direction != {reply, original}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end]
+ element 01 element 00
ip test-ip4 output
[ ct load direction => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -106,7 +106,7 @@ ip test-ip4 output
# ct status {expected, seen-reply, assured, confirmed, dying}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000008 : 0 [end] element 00000200 : 0 [end]
+ element 00000001 element 00000002 element 00000004 element 00000008 element 00000200
ip test-ip4 output
[ ct load status => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -114,7 +114,7 @@ ip test-ip4 output
# ct status != {expected, seen-reply, assured, confirmed, dying}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000008 : 0 [end] element 00000200 : 0 [end]
+ element 00000001 element 00000002 element 00000004 element 00000008 element 00000200
ip test-ip4 output
[ ct load status => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -172,18 +172,18 @@ ip test-ip4 output
ip test-ip4 output
[ ct load mark => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x32000000 0x45000000 ]
+ [ range eq reg 1 0x00000032 0x00000045 ]
# ct mark != 0x00000032-0x00000045
ip test-ip4 output
[ ct load mark => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x32000000 0x45000000 ]
+ [ range neq reg 1 0x00000032 0x00000045 ]
# ct mark {0x32, 0x2222, 0x42de3}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000032 : 0 [end] element 00002222 : 0 [end] element 00042de3 : 0 [end]
+ element 00000032 element 00002222 element 00042de3
ip test-ip4 output
[ ct load mark => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -191,7 +191,7 @@ ip test-ip4 output
# ct mark {0x32-0x2222, 0x4444-0x42de3}
__set%d test-ip4 7
__set%d test-ip4 0
- element 00000000 : 1 [end] element 32000000 : 0 [end] element 23220000 : 1 [end] element 44440000 : 0 [end] element e42d0400 : 1 [end]
+ element 00000000 flags 1 element 00000032 element 00002223 flags 1 element 00004444 element 00042de4 flags 1
ip test-ip4 output
[ ct load mark => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -200,7 +200,7 @@ ip test-ip4 output
# ct mark != {0x32, 0x2222, 0x42de3}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000032 : 0 [end] element 00002222 : 0 [end] element 00042de3 : 0 [end]
+ element 00000032 element 00002222 element 00042de3
ip test-ip4 output
[ ct load mark => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -239,13 +239,13 @@ ip test-ip4 output
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x60ea0000 0x80ee3600 ]
+ [ range eq reg 1 0x0000ea60 0x0036ee80 ]
# ct expiration > 4d23h59m59s
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gt reg 1 0x18c8bf19 ]
+ [ cmp gt reg 1 0x19bfc818 ]
# ct expiration != 233
ip test-ip4 output
@@ -256,18 +256,18 @@ ip test-ip4 output
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0xe8800000 0xc8af0000 ]
+ [ range eq reg 1 0x000080e8 0x0000afc8 ]
# ct expiration != 33-45
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0xe8800000 0xc8af0000 ]
+ [ range neq reg 1 0x000080e8 0x0000afc8 ]
# ct expiration {33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 000080e8 : 0 [end] element 0000d6d8 : 0 [end] element 000105b8 : 0 [end] element 000157c0 : 0 [end]
+ element 000080e8 element 0000d6d8 element 000105b8 element 000157c0
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -275,7 +275,7 @@ ip test-ip4 output
# ct expiration != {33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 000080e8 : 0 [end] element 0000d6d8 : 0 [end] element 000105b8 : 0 [end] element 000157c0 : 0 [end]
+ element 000080e8 element 0000d6d8 element 000105b8 element 000157c0
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -283,7 +283,7 @@ ip test-ip4 output
# ct expiration {33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element e8800000 : 0 [end] element d9d60000 : 1 [end] element d0010100 : 0 [end] element c1570100 : 1 [end]
+ element 00000000 flags 1 element 000080e8 element 0000d6d9 flags 1 element 000101d0 element 000157c1 flags 1
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -292,7 +292,7 @@ ip test-ip4 output
# ct expiration != {33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element e8800000 : 0 [end] element d9d60000 : 1 [end] element d0010100 : 0 [end] element c1570100 : 1 [end]
+ element 00000000 flags 1 element 000080e8 element 0000d6d9 flags 1 element 000101d0 element 000157c1 flags 1
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -301,12 +301,12 @@ ip test-ip4 output
# ct helper "ftp"
ip test-ip4 output
[ ct load helper => reg 1 ]
- [ cmp eq reg 1 0x00707466 0x00000000 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x66747000 0x00000000 0x00000000 0x00000000 ]
# ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000008 12345678 : 0 [end] element 00000008 34127856 : 0 [end] element 00000002 12785634 : 0 [end]
+ element 00000008 . 12345678 element 00000008 . 34127856 element 00000002 . 12785634
ip test-ip4 output
[ ct load state => reg 1 ]
[ ct load mark => reg 9 ]
@@ -327,7 +327,7 @@ inet test-inet output
# ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 }
__map%d test-ip4 b
__map%d test-ip4 0
- element 00000001 : 0000000a 0 [end] element 00000002 : 00000014 0 [end] element 00000003 : 0000001e 0 [end]
+ element 00000001 : 0000000a element 00000002 : 00000014 element 00000003 : 0000001e
ip test-ip4 output
[ meta load mark => reg 1 ]
[ lookup reg 1 set __map%d dreg 1 ]
@@ -346,31 +346,31 @@ ip
ip test-ip4 output
[ ct load bytes => reg 1 , dir original ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp gt reg 1 0x00000000 0xa0860100 ]
+ [ cmp gt reg 1 0x00000000 0x000186a0 ]
# ct reply packets < 100
ip test-ip4 output
[ ct load packets => reg 1 , dir reply ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp lt reg 1 0x00000000 0x64000000 ]
+ [ cmp lt reg 1 0x00000000 0x00000064 ]
# ct bytes > 100000
ip test-ip4 output
[ ct load bytes => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp gt reg 1 0x00000000 0xa0860100 ]
+ [ cmp gt reg 1 0x00000000 0x000186a0 ]
# ct avgpkt > 200
ip test-ip4 output
[ ct load avgpkt => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp gt reg 1 0x00000000 0xc8000000 ]
+ [ cmp gt reg 1 0x00000000 0x000000c8 ]
# ct original avgpkt < 500
ip test-ip4 output
[ ct load avgpkt => reg 1 , dir original ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp lt reg 1 0x00000000 0xf4010000 ]
+ [ cmp lt reg 1 0x00000000 0x000001f4 ]
# ct status expected,seen-reply,assured,confirmed,snat,dnat,dying
ip test-ip4 output
@@ -423,53 +423,53 @@ ip test-ip4 output
# ct label 127
ip test-ip4 output
[ ct load label => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000000 0x00000000 0x00000000 0x80000000 ) ^ 0x00000000 0x00000000 0x00000000 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x80000000 0x00000000 0x00000000 0x00000000 ) ^ 0x00000000 0x00000000 0x00000000 0x00000000 ]
[ cmp neq reg 1 0x00000000 0x00000000 0x00000000 0x00000000 ]
# ct label set 127
ip test-ip4 output
- [ immediate reg 1 0x00000000 0x00000000 0x00000000 0x80000000 ]
+ [ immediate reg 1 0x80000000 0x00000000 0x00000000 0x00000000 ]
[ ct set label with reg 1 ]
# ct zone 0
ip test-ip4 output
[ ct load zone => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x0000 ]
# ct zone 23
ip test-ip4 output
[ ct load zone => reg 1 ]
- [ cmp eq reg 1 0x00000017 ]
+ [ cmp eq reg 1 0x0017 ]
# ct original zone 1
ip test-ip4 output
[ ct load zone => reg 1 , dir original ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
# ct reply zone 1
ip test-ip4 output
[ ct load zone => reg 1 , dir reply ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
# ct zone set 1
ip test-ip4 output
- [ immediate reg 1 0x00000001 ]
+ [ immediate reg 1 0x0001 ]
[ ct set zone with reg 1 ]
# ct original zone set 1
ip test-ip4 output
- [ immediate reg 1 0x00000001 ]
+ [ immediate reg 1 0x0001 ]
[ ct set zone with reg 1 , dir original ]
# ct reply zone set 1
ip test-ip4 output
- [ immediate reg 1 0x00000001 ]
+ [ immediate reg 1 0x0001 ]
[ ct set zone with reg 1 , dir reply ]
# ct zone set mark map { 1 : 1, 2 : 2 }
__map%d test-ip4 b
__map%d test-ip4 0
- element 00000001 : 00000001 0 [end] element 00000002 : 00000002 0 [end]
+ element 00000001 : 0001 element 00000002 : 0002
ip test-ip4 output
[ meta load mark => reg 1 ]
[ lookup reg 1 set __map%d dreg 1 ]
@@ -482,7 +482,7 @@ ip test-ip4 output
# ct direction . ct mark { original . 0x12345678, reply . 0x87654321}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 00000000 12345678 : 0 [end] element 00000001 87654321 : 0 [end]
+ element 00 . 12345678 element 01 . 87654321
ip test-ip4 output
[ ct load direction => reg 1 ]
[ ct load mark => reg 9 ]
@@ -491,7 +491,7 @@ ip test-ip4 output
# ct state . ct mark vmap { new . 0x12345678 : drop, established . 0x87654321 : accept}
__map%d test-ip4 b size 2
__map%d test-ip4 0
- element 00000008 12345678 : drop 0 [end] element 00000002 87654321 : accept 0 [end]
+ element 00000008 . 12345678 : drop element 00000002 . 87654321 : accept
ip test-ip4 output
[ ct load state => reg 1 ]
[ ct load mark => reg 9 ]
@@ -512,7 +512,7 @@ ip test-ip4 output
# ct id 12345
ip test-ip4 output
[ ct load id => reg 1 ]
- [ cmp eq reg 1 0x39300000 ]
+ [ cmp eq reg 1 0x00003039 ]
# ct status ! dnat
ip6
@@ -527,4 +527,3 @@ ip test-ip4 output
# ct count over 3
ip test-ip4 output
[ connlimit count 3 flags 1 ]
-
diff --git a/tests/py/any/meta.t.payload b/tests/py/any/meta.t.payload
index 3f9f3f22..a031148e 100644
--- a/tests/py/any/meta.t.payload
+++ b/tests/py/any/meta.t.payload
@@ -17,18 +17,18 @@ ip test-ip4 input
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x21000000 0x2d000000 ]
+ [ range eq reg 1 0x00000021 0x0000002d ]
# meta length != 33-45
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x21000000 0x2d000000 ]
+ [ range neq reg 1 0x00000021 0x0000002d ]
# meta length { 33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 00000021 element 00000037 element 00000043 element 00000058
ip test-ip4 input
[ meta load len => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -36,7 +36,7 @@ ip test-ip4 input
# meta length { 33-55, 67-88}
__set%d test-ip4 7
__set%d test-ip4 0
- element 00000000 : 1 [end] element 21000000 : 0 [end] element 38000000 : 1 [end] element 43000000 : 0 [end] element 59000000 : 1 [end]
+ element 00000000 flags 1 element 00000021 element 00000038 flags 1 element 00000043 element 00000059 flags 1
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -45,7 +45,7 @@ ip test-ip4 input
# meta length { 33-55, 56-88, 100-120}
__set%d test-ip4 7
__set%d test-ip4 0
- element 00000000 : 1 [end] element 21000000 : 0 [end] element 59000000 : 1 [end] element 64000000 : 0 [end] element 79000000 : 1 [end]
+ element 00000000 flags 1 element 00000021 element 00000059 flags 1 element 00000064 element 00000079 flags 1
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -54,7 +54,7 @@ ip test-ip4 input
# meta length != { 33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 00000021 element 00000037 element 00000043 element 00000058
ip test-ip4 input
[ meta load len => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -62,7 +62,7 @@ ip test-ip4 input
# meta protocol { ip, arp, ip6, vlan }
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000008 : 0 [end] element 00000608 : 0 [end] element 0000dd86 : 0 [end] element 00000081 : 0 [end]
+ element 0800 element 0806 element 86dd element 8100
ip test-ip4 input
[ meta load protocol => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -70,7 +70,7 @@ ip test-ip4 input
# meta protocol != {ip, arp, ip6, 8021q}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000008 : 0 [end] element 00000608 : 0 [end] element 0000dd86 : 0 [end] element 00000081 : 0 [end]
+ element 0800 element 0806 element 86dd element 8100
ip test-ip4 input
[ meta load protocol => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -78,37 +78,37 @@ ip test-ip4 input
# meta protocol ip
ip test-ip4 input
[ meta load protocol => reg 1 ]
- [ cmp eq reg 1 0x00000008 ]
+ [ cmp eq reg 1 0x0800 ]
# meta protocol != ip
ip test-ip4 input
[ meta load protocol => reg 1 ]
- [ cmp neq reg 1 0x00000008 ]
+ [ cmp neq reg 1 0x0800 ]
# meta l4proto 22
ip test-ip4 input
[ meta load l4proto => reg 1 ]
- [ cmp eq reg 1 0x00000016 ]
+ [ cmp eq reg 1 0x16 ]
# meta l4proto != 233
ip test-ip4 input
[ meta load l4proto => reg 1 ]
- [ cmp neq reg 1 0x000000e9 ]
+ [ cmp neq reg 1 0xe9 ]
# meta l4proto 33-45
ip test-ip4 input
[ meta load l4proto => reg 1 ]
- [ range eq reg 1 0x00000021 0x0000002d ]
+ [ range eq reg 1 0x21 0x2d ]
# meta l4proto != 33-45
ip test-ip4 input
[ meta load l4proto => reg 1 ]
- [ range neq reg 1 0x00000021 0x0000002d ]
+ [ range neq reg 1 0x21 0x2d ]
# meta l4proto { 33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 21 element 37 element 43 element 58
ip test-ip4 input
[ meta load l4proto => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -116,7 +116,7 @@ ip test-ip4 input
# meta l4proto != { 33, 55, 67, 88}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 21 element 37 element 43 element 58
ip test-ip4 input
[ meta load l4proto => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -196,17 +196,17 @@ ip test-ip4 input
# meta iifname "dummy0"
ip test-ip4 input
[ meta load iifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00003079 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x64756d6d 0x79300000 0x00000000 0x00000000 ]
# meta iifname != "dummy0"
ip test-ip4 input
[ meta load iifname => reg 1 ]
- [ cmp neq reg 1 0x6d6d7564 0x00003079 0x00000000 0x00000000 ]
+ [ cmp neq reg 1 0x64756d6d 0x79300000 0x00000000 0x00000000 ]
# meta iifname {"dummy0", "lo"}
__set%d test-ip4 3
__set%d test-ip4 0
- element 6d6d7564 00003079 00000000 00000000 : 0 [end] element 00006f6c 00000000 00000000 00000000 : 0 [end]
+ element 64756d6d 79300000 00000000 00000000 element 6c6f0000 00000000 00000000 00000000
ip test-ip4 input
[ meta load iifname => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -214,7 +214,7 @@ ip test-ip4 input
# meta iifname != {"dummy0", "lo"}
__set%d test-ip4 3
__set%d test-ip4 0
- element 6d6d7564 00003079 00000000 00000000 : 0 [end] element 00006f6c 00000000 00000000 00000000 : 0 [end]
+ element 64756d6d 79300000 00000000 00000000 element 6c6f0000 00000000 00000000 00000000
ip test-ip4 input
[ meta load iifname => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -222,17 +222,17 @@ ip test-ip4 input
# meta iifname "dummy*"
ip test-ip4 input
[ meta load iifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00000079 ]
+ [ cmp eq reg 1 0x64756d6d 0x79 ]
# meta iifname "dummy\*"
ip test-ip4 input
[ meta load iifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00002a79 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x64756d6d 0x792a0000 0x00000000 0x00000000 ]
# meta iiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000200 : 0 [end] element 00000300 : 0 [end] element 00000301 : 0 [end] element 00000304 : 0 [end] element 00000308 : 0 [end] element 0000030a : 0 [end]
+ element 0001 element 0200 element 0300 element 0301 element 0304 element 0308 element 030a
ip test-ip4 input
[ meta load iiftype => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -240,7 +240,7 @@ ip test-ip4 input
# meta iiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000200 : 0 [end] element 00000300 : 0 [end] element 00000301 : 0 [end] element 00000304 : 0 [end] element 00000308 : 0 [end] element 0000030a : 0 [end]
+ element 0001 element 0200 element 0300 element 0301 element 0304 element 0308 element 030a
ip test-ip4 input
[ meta load iiftype => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -248,22 +248,22 @@ ip test-ip4 input
# meta iiftype != ether
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp neq reg 1 0x00000001 ]
+ [ cmp neq reg 1 0x0001 ]
# meta iiftype ether
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
# meta iiftype != ppp
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp neq reg 1 0x00000200 ]
+ [ cmp neq reg 1 0x0200 ]
# meta iiftype ppp
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp eq reg 1 0x00000200 ]
+ [ cmp eq reg 1 0x0200 ]
# meta oif "lo" accept
ip test-ip4 input
@@ -280,17 +280,17 @@ ip test-ip4 input
# meta oifname "dummy0"
ip test-ip4 input
[ meta load oifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00003079 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x64756d6d 0x79300000 0x00000000 0x00000000 ]
# meta oifname != "dummy0"
ip test-ip4 input
[ meta load oifname => reg 1 ]
- [ cmp neq reg 1 0x6d6d7564 0x00003079 0x00000000 0x00000000 ]
+ [ cmp neq reg 1 0x64756d6d 0x79300000 0x00000000 0x00000000 ]
# meta oifname { "dummy0", "lo"}
__set%d test-ip4 3
__set%d test-ip4 0
- element 6d6d7564 00003079 00000000 00000000 : 0 [end] element 00006f6c 00000000 00000000 00000000 : 0 [end]
+ element 64756d6d 79300000 00000000 00000000 element 6c6f0000 00000000 00000000 00000000
ip test-ip4 input
[ meta load oifname => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -298,17 +298,17 @@ ip test-ip4 input
# meta oifname "dummy*"
ip test-ip4 input
[ meta load oifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00000079 ]
+ [ cmp eq reg 1 0x64756d6d 0x79 ]
# meta oifname "dummy\*"
ip test-ip4 input
[ meta load oifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00002a79 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x64756d6d 0x792a0000 0x00000000 0x00000000 ]
# meta oiftype {ether, ppp, ipip, ipip6, loopback, sit, ipgre}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000200 : 0 [end] element 00000300 : 0 [end] element 00000301 : 0 [end] element 00000304 : 0 [end] element 00000308 : 0 [end] element 0000030a : 0 [end]
+ element 0001 element 0200 element 0300 element 0301 element 0304 element 0308 element 030a
ip test-ip4 input
[ meta load oiftype => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -316,7 +316,7 @@ ip test-ip4 input
# meta oiftype != {ether, ppp, ipip, ipip6, loopback, sit, ipgre}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000200 : 0 [end] element 00000300 : 0 [end] element 00000301 : 0 [end] element 00000304 : 0 [end] element 00000308 : 0 [end] element 0000030a : 0 [end]
+ element 0001 element 0200 element 0300 element 0301 element 0304 element 0308 element 030a
ip test-ip4 input
[ meta load oiftype => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -324,17 +324,17 @@ ip test-ip4 input
# meta oiftype != ether
ip test-ip4 input
[ meta load oiftype => reg 1 ]
- [ cmp neq reg 1 0x00000001 ]
+ [ cmp neq reg 1 0x0001 ]
# meta oiftype ether
ip test-ip4 input
[ meta load oiftype => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
# meta skuid {"bin", "root", "daemon"} accept
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end] element 00000002 : 0 [end]
+ element 00000001 element 00000000 element 00000002
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -343,7 +343,7 @@ ip test-ip4 input
# meta skuid != {"bin", "root", "daemon"} accept
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end] element 00000002 : 0 [end]
+ element 00000001 element 00000000 element 00000002
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -363,14 +363,14 @@ ip test-ip4 input
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp lt reg 1 0xb80b0000 ]
+ [ cmp lt reg 1 0x00000bb8 ]
[ immediate reg 0 accept ]
# meta skuid gt 3000 accept
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gt reg 1 0xb80b0000 ]
+ [ cmp gt reg 1 0x00000bb8 ]
[ immediate reg 0 accept ]
# meta skuid eq 3000 accept
@@ -383,20 +383,20 @@ ip test-ip4 input
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0xb90b0000 0xbd0b0000 ]
+ [ range eq reg 1 0x00000bb9 0x00000bbd ]
[ immediate reg 0 accept ]
# meta skuid != 2001-2005 accept
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0xd1070000 0xd5070000 ]
+ [ range neq reg 1 0x000007d1 0x000007d5 ]
[ immediate reg 0 accept ]
# meta skgid {"bin", "root", "daemon"} accept
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end] element 00000002 : 0 [end]
+ element 00000001 element 00000000 element 00000002
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -405,7 +405,7 @@ ip test-ip4 input
# meta skgid != {"bin", "root", "daemon"} accept
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000000 : 0 [end] element 00000002 : 0 [end]
+ element 00000001 element 00000000 element 00000002
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -425,14 +425,14 @@ ip test-ip4 input
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp lt reg 1 0xb80b0000 ]
+ [ cmp lt reg 1 0x00000bb8 ]
[ immediate reg 0 accept ]
# meta skgid gt 3000 accept
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gt reg 1 0xb80b0000 ]
+ [ cmp gt reg 1 0x00000bb8 ]
[ immediate reg 0 accept ]
# meta skgid eq 3000 accept
@@ -445,14 +445,14 @@ ip test-ip4 input
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0xd1070000 0xd5070000 ]
+ [ range eq reg 1 0x000007d1 0x000007d5 ]
[ immediate reg 0 accept ]
# meta skgid != 2001-2005 accept
ip test-ip4 input
[ meta load skgid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0xd1070000 0xd5070000 ]
+ [ range neq reg 1 0x000007d1 0x000007d5 ]
[ immediate reg 0 accept ]
# meta mark set 0xffffffc8 xor 0x16
@@ -508,7 +508,7 @@ ip test-ip4 input
# meta oifname "dummy2" accept
ip test-ip4 input
[ meta load oifname => reg 1 ]
- [ cmp eq reg 1 0x6d6d7564 0x00003279 0x00000000 0x00000000 ]
+ [ cmp eq reg 1 0x64756d6d 0x79320000 0x00000000 0x00000000 ]
[ immediate reg 0 accept ]
# meta skuid 3000
@@ -529,37 +529,37 @@ ip test-ip4 input
# meta pkttype broadcast
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# meta pkttype host
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x00 ]
# meta pkttype multicast
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp eq reg 1 0x00000002 ]
+ [ cmp eq reg 1 0x02 ]
# meta pkttype != broadcast
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp neq reg 1 0x00000001 ]
+ [ cmp neq reg 1 0x01 ]
# meta pkttype != host
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp neq reg 1 0x00000000 ]
+ [ cmp neq reg 1 0x00 ]
# meta pkttype != multicast
ip test-ip4 input
[ meta load pkttype => reg 1 ]
- [ cmp neq reg 1 0x00000002 ]
+ [ cmp neq reg 1 0x02 ]
# pkttype { broadcast, multicast} accept
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 : 0 [end] element 00000002 : 0 [end]
+ element 01 element 02
ip test-ip4 input
[ meta load pkttype => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -579,18 +579,18 @@ ip test-ip4 input
ip test-ip4 input
[ meta load cpu => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x01000000 0x03000000 ]
+ [ range eq reg 1 0x00000001 0x00000003 ]
# meta cpu != 1-2
ip test-ip4 input
[ meta load cpu => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x01000000 0x02000000 ]
+ [ range neq reg 1 0x00000001 0x00000002 ]
# meta cpu { 2,3}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000002 : 0 [end] element 00000003 : 0 [end]
+ element 00000002 element 00000003
ip test-ip4 input
[ meta load cpu => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -598,7 +598,7 @@ ip test-ip4 input
# meta cpu != { 2,3}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000002 : 0 [end] element 00000003 : 0 [end]
+ element 00000002 element 00000003
ip test-ip4 input
[ meta load cpu => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -606,7 +606,7 @@ ip test-ip4 input
# meta cpu { 2-3, 5-7}
__set%d test-ip4 7
__set%d test-ip4 0
- element 00000000 : 1 [end] element 02000000 : 0 [end] element 04000000 : 1 [end] element 05000000 : 0 [end] element 08000000 : 1 [end]
+ element 00000000 flags 1 element 00000002 element 00000004 flags 1 element 00000005 element 00000008 flags 1
ip test-ip4 input
[ meta load cpu => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -635,7 +635,7 @@ ip test-ip4 input
# meta iifgroup { 11,33}
__set%d test-ip4 3
__set%d test-ip4 0
- element 0000000b : 0 [end] element 00000021 : 0 [end]
+ element 0000000b element 00000021
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -663,7 +663,7 @@ ip test-ip4 input
# meta oifgroup { 11,33}
__set%d test-ip4 3
__set%d test-ip4 0
- element 0000000b : 0 [end] element 00000021 : 0 [end]
+ element 0000000b element 00000021
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -681,7 +681,7 @@ ip test-ip4 input
# meta cgroup { 1048577, 1048578 }
__set%d test-ip4 3
__set%d test-ip4 0
- element 00100001 : 0 [end] element 00100002 : 0 [end]
+ element 00100001 element 00100002
ip test-ip4 input
[ meta load cgroup => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -689,7 +689,7 @@ ip test-ip4 input
# meta cgroup != { 1048577, 1048578}
__set%d test-ip4 3
__set%d test-ip4 0
- element 00100001 : 0 [end] element 00100002 : 0 [end]
+ element 00100001 element 00100002
ip test-ip4 input
[ meta load cgroup => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -698,18 +698,18 @@ ip test-ip4 input
ip test-ip4 input
[ meta load cgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x01001000 0x02001000 ]
+ [ range eq reg 1 0x00100001 0x00100002 ]
# meta cgroup != 1048577-1048578
ip test-ip4 input
[ meta load cgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x01001000 0x02001000 ]
+ [ range neq reg 1 0x00100001 0x00100002 ]
# meta iif . meta oif { "lo" . "lo" }
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 00000001 : 0 [end]
+ element 00000001 . 00000001
ip test-ip4 output
[ meta load iif => reg 1 ]
[ meta load oif => reg 9 ]
@@ -718,7 +718,7 @@ ip test-ip4 output
# meta iif . meta oif . meta mark { "lo" . "lo" . 0x0000000a }
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000001 00000001 0000000a : 0 [end]
+ element 00000001 . 00000001 . 0000000a
ip test-ip4 output
[ meta load iif => reg 1 ]
[ meta load oif => reg 9 ]
@@ -728,7 +728,7 @@ ip test-ip4 output
# meta iif . meta oif vmap { "lo" . "lo" : drop }
__map%d test-ip4 b
__map%d test-ip4 0
- element 00000001 00000001 : drop 0 [end]
+ element 00000001 . 00000001 : drop
ip test-ip4 output
[ meta load iif => reg 1 ]
[ meta load oif => reg 9 ]
@@ -737,12 +737,12 @@ ip test-ip4 output
# meta random eq 1
ip test-ip4 input
[ meta load prandom => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# meta random gt 1000000
ip test-ip4 input
[ meta load prandom => reg 1 ]
- [ cmp gt reg 1 0x40420f00 ]
+ [ cmp gt reg 1 0x000f4240 ]
# meta priority root
ip test-ip4 input
@@ -783,18 +783,18 @@ ip test-ip4 input
ip test-ip4 input
[ meta load priority => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0xdadaadbc 0xdcdaadbc ]
+ [ range eq reg 1 0xbcaddada 0xbcaddadc ]
# meta priority != bcad:dada-bcad:dadc
ip test-ip4 input
[ meta load priority => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0xdadaadbc 0xdcdaadbc ]
+ [ range neq reg 1 0xbcaddada 0xbcaddadc ]
# meta priority {bcad:dada, bcad:dadc, aaaa:bbbb}
__set%d test-ip4 3
__set%d test-ip4 0
- element bcaddada : 0 [end] element bcaddadc : 0 [end] element aaaabbbb : 0 [end]
+ element bcaddada element bcaddadc element aaaabbbb
ip test-ip4 input
[ meta load priority => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -807,7 +807,7 @@ ip test-ip4 input
# meta priority != {bcad:dada, bcad:dadc, aaaa:bbbb}
__set%d test-ip4 3
__set%d test-ip4 0
- element bcaddada : 0 [end] element bcaddadc : 0 [end] element aaaabbbb : 0 [end]
+ element bcaddada element bcaddadc element aaaabbbb
ip test-ip4 input
[ meta load priority => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -825,7 +825,7 @@ ip test-ip4 input
# meta length { 33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 21000000 : 0 [end] element 38000000 : 1 [end] element 42000000 : 0 [end] element 59000000 : 1 [end]
+ element 00000000 flags 1 element 00000021 element 00000038 flags 1 element 00000042 element 00000059 flags 1
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -834,7 +834,7 @@ ip test-ip4 input
# meta length != { 33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 21000000 : 0 [end] element 38000000 : 1 [end] element 42000000 : 0 [end] element 59000000 : 1 [end]
+ element 00000000 flags 1 element 00000021 element 00000038 flags 1 element 00000042 element 00000059 flags 1
ip test-ip4 input
[ meta load len => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -843,7 +843,7 @@ ip test-ip4 input
# meta l4proto { 33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 00000021 : 0 [end] element 00000038 : 1 [end] element 00000042 : 0 [end] element 00000059 : 1 [end]
+ element 00 flags 1 element 21 element 38 flags 1 element 42 element 59 flags 1
ip test-ip4 input
[ meta load l4proto => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -851,7 +851,7 @@ ip test-ip4 input
# meta l4proto != { 33-55, 66-88}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 00000021 : 0 [end] element 00000038 : 1 [end] element 00000042 : 0 [end] element 00000059 : 1 [end]
+ element 00 flags 1 element 21 element 38 flags 1 element 42 element 59 flags 1
ip test-ip4 input
[ meta load l4proto => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -859,7 +859,7 @@ ip test-ip4 input
# meta skuid { 2001-2005, 3001-3005} accept
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element d1070000 : 0 [end] element d6070000 : 1 [end] element b90b0000 : 0 [end] element be0b0000 : 1 [end]
+ element 00000000 flags 1 element 000007d1 element 000007d6 flags 1 element 00000bb9 element 00000bbe flags 1
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -869,7 +869,7 @@ ip test-ip4 input
# meta iifgroup {"default", 11}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 00000000 : 0 [end] element 0000000b : 0 [end]
+ element 00000000 element 0000000b
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -877,7 +877,7 @@ ip test-ip4 input
# meta iifgroup != {"default", 11}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 00000000 : 0 [end] element 0000000b : 0 [end]
+ element 00000000 element 0000000b
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -885,7 +885,7 @@ ip test-ip4 input
# meta iifgroup {11-33, 44-55}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 0b000000 : 0 [end] element 22000000 : 1 [end] element 2c000000 : 0 [end] element 38000000 : 1 [end]
+ element 00000000 flags 1 element 0000000b element 00000022 flags 1 element 0000002c element 00000038 flags 1
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -894,7 +894,7 @@ ip test-ip4 input
# meta iifgroup != { 11,33}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 0000000b : 0 [end] element 00000021 : 0 [end]
+ element 0000000b element 00000021
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -902,7 +902,7 @@ ip test-ip4 input
# meta iifgroup != {11-33, 44-55}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 0b000000 : 0 [end] element 22000000 : 1 [end] element 2c000000 : 0 [end] element 38000000 : 1 [end]
+ element 00000000 flags 1 element 0000000b element 00000022 flags 1 element 0000002c element 00000038 flags 1
ip test-ip4 input
[ meta load iifgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -911,7 +911,7 @@ ip test-ip4 input
# meta oifgroup {"default", 11}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 00000000 : 0 [end] element 0000000b : 0 [end]
+ element 00000000 element 0000000b
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -919,7 +919,7 @@ ip test-ip4 input
# meta oifgroup {11-33, 44-55}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 0b000000 : 0 [end] element 22000000 : 1 [end] element 2c000000 : 0 [end] element 38000000 : 1 [end]
+ element 00000000 flags 1 element 0000000b element 00000022 flags 1 element 0000002c element 00000038 flags 1
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -928,7 +928,7 @@ ip test-ip4 input
# meta oifgroup != { 11,33}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 0000000b : 0 [end] element 00000021 : 0 [end]
+ element 0000000b element 00000021
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -936,7 +936,7 @@ ip test-ip4 input
# meta oifgroup != {11-33, 44-55}
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element 0b000000 : 0 [end] element 22000000 : 1 [end] element 2c000000 : 0 [end] element 38000000 : 1 [end]
+ element 00000000 flags 1 element 0000000b element 00000022 flags 1 element 0000002c element 00000038 flags 1
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -945,7 +945,7 @@ ip test-ip4 input
# meta skuid != { 2001-2005, 3001-3005} accept
__set%d test-ip4 7 size 5
__set%d test-ip4 0
- element 00000000 : 1 [end] element d1070000 : 0 [end] element d6070000 : 1 [end] element b90b0000 : 0 [end] element be0b0000 : 1 [end]
+ element 00000000 flags 1 element 000007d1 element 000007d6 flags 1 element 00000bb9 element 00000bbe flags 1
ip test-ip4 input
[ meta load skuid => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
@@ -955,7 +955,7 @@ ip test-ip4 input
# meta oifgroup != {"default", 11}
__set%d test-ip4 3 size 2
__set%d test-ip4 0
- element 00000000 : 0 [end] element 0000000b : 0 [end]
+ element 00000000 element 0000000b
ip test-ip4 input
[ meta load oifgroup => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -963,63 +963,63 @@ ip test-ip4 input
# meta time "1970-05-23 21:07:14" drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0x43f05400 0x002bd503 ]
+ [ cmp eq reg 1 0x002bd503 0x43f05400 ]
[ immediate reg 0 drop ]
# meta time 12341234 drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0x74a8f400 0x002bd849 ]
+ [ cmp eq reg 1 0x002bd849 0x74a8f400 ]
[ immediate reg 0 drop ]
# meta time "2019-06-21 17:00:00" drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0x767d6000 0x15aa3ebc ]
+ [ cmp eq reg 1 0x15aa3ebc 0x767d6000 ]
[ immediate reg 0 drop ]
# meta time "2019-07-01 00:00:00" drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0xe750c000 0x15ad18e0 ]
+ [ cmp eq reg 1 0x15ad18e0 0xe750c000 ]
[ immediate reg 0 drop ]
# meta time "2019-07-01 00:01:00" drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0xdf981800 0x15ad18ee ]
+ [ cmp eq reg 1 0x15ad18ee 0xdf981800 ]
[ immediate reg 0 drop ]
# meta time "2019-07-01 00:00:01" drop
ip meta-test input
[ meta load time => reg 1 ]
- [ cmp eq reg 1 0x22eb8a00 0x15ad18e1 ]
+ [ cmp eq reg 1 0x15ad18e1 0x22eb8a00 ]
[ immediate reg 0 drop ]
# meta time < "2022-07-01 11:00:00" accept
ip test-ip4 input
[ meta load time => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp lt reg 1 0xf3a8fd16 0x00a07719 ]
+ [ cmp lt reg 1 0x16fda8f3 0x1977a000 ]
[ immediate reg 0 accept ]
# meta time > "2022-07-01 11:00:00" accept
ip test-ip4 input
[ meta load time => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp gt reg 1 0xf3a8fd16 0x00a07719 ]
+ [ cmp gt reg 1 0x16fda8f3 0x1977a000 ]
[ immediate reg 0 accept ]
# meta day "Saturday" drop
ip test-ip4 input
[ meta load day => reg 1 ]
- [ cmp eq reg 1 0x00000006 ]
+ [ cmp eq reg 1 0x06 ]
[ immediate reg 0 drop ]
# meta day 6 drop
ip test-ip4 input
[ meta load day => reg 1 ]
- [ cmp eq reg 1 0x00000006 ]
+ [ cmp eq reg 1 0x06 ]
[ immediate reg 0 drop ]
# meta hour "17:00" drop
@@ -1079,66 +1079,66 @@ ip test-ip4 input
# meta hour "00:00"-"02:02" drop
[ meta load hour => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x78000000 0x60350100 ]
+ [ range neq reg 1 0x00000078 0x00013560 ]
[ immediate reg 0 drop ]
# meta hour "01:01"-"03:03" drop
ip test-ip4 input
[ meta load hour => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0xc40e0000 0xac430100 ]
+ [ range neq reg 1 0x00000ec4 0x000143ac ]
[ immediate reg 0 drop ]
# meta hour "02:02"-"04:04" drop
ip test-ip4 input
[ meta load hour => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range eq reg 1 0x78000000 0x101d0000 ]
+ [ range eq reg 1 0x00000078 0x00001d10 ]
[ immediate reg 0 drop ]
# meta hour "21:00"-"02:00" drop
ip test-ip4 input
[ meta load hour => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ range neq reg 1 0x00000000 0x300b0100 ]
+ [ range neq reg 1 0x00000000 0x00010b30 ]
[ immediate reg 0 drop ]
# time < "2022-07-01 11:00:00" accept
ip test-ip4 input
[ meta load time => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp lt reg 1 0xf3a8fd16 0x00a07719 ]
+ [ cmp lt reg 1 0x16fda8f3 0x1977a000 ]
[ immediate reg 0 accept ]
# time > "2022-07-01 11:00:00" accept
ip test-ip4 input
[ meta load time => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 8, 8) ]
- [ cmp gt reg 1 0xf3a8fd16 0x00a07719 ]
+ [ cmp gt reg 1 0x16fda8f3 0x1977a000 ]
[ immediate reg 0 accept ]
# meta mark set vlan id map { 1 : 0x00000001, 4095 : 0x00004095 }
__map%d test-ip4 b size 2
__map%d test-ip4 0
- element 00000100 : 00000001 0 [end] element 0000ff0f : 00004095 0 [end]
+ element 0001 : 00000001 element 0fff : 00004095
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
[ payload load 2b @ link header + 12 => reg 1 ]
- [ cmp eq reg 1 0x00000081 ]
+ [ cmp eq reg 1 0x8100 ]
[ payload load 2b @ link header + 14 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000ff0f ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x0fff ) ^ 0x0000 ]
[ lookup reg 1 set __map%d dreg 1 ]
[ meta set mark with reg 1 ]
# meta mark set vlan id map @map1
ip test-ip4 input
[ meta load iiftype => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x0001 ]
[ payload load 2b @ link header + 12 => reg 1 ]
- [ cmp eq reg 1 0x00000081 ]
+ [ cmp eq reg 1 0x8100 ]
[ payload load 2b @ link header + 14 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000ff0f ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x0fff ) ^ 0x0000 ]
[ lookup reg 1 set map1 dreg 1 ]
[ meta set mark with reg 1 ]
diff --git a/tests/py/any/meta.t.payload.bridge b/tests/py/any/meta.t.payload.bridge
index 5997ccc7..b4e7ba37 100644
--- a/tests/py/any/meta.t.payload.bridge
+++ b/tests/py/any/meta.t.payload.bridge
@@ -1,20 +1,20 @@
# meta mark set vlan id map { 1 : 0x00000001, 4095 : 0x00004095 }
__map%d test-bridge b size 2
__map%d test-bridge 0
- element 00000100 : 00000001 0 [end] element 0000ff0f : 00004095 0 [end]
+ element 0001 : 00000001 element 0fff : 00004095
bridge test-bridge input
[ payload load 2b @ link header + 12 => reg 1 ]
- [ cmp eq reg 1 0x00000081 ]
+ [ cmp eq reg 1 0x8100 ]
[ payload load 2b @ link header + 14 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000ff0f ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x0fff ) ^ 0x0000 ]
[ lookup reg 1 set __map%d dreg 1 ]
[ meta set mark with reg 1 ]
# meta mark set vlan id map @map1
bridge test-bridge input
[ payload load 2b @ link header + 12 => reg 1 ]
- [ cmp eq reg 1 0x00000081 ]
+ [ cmp eq reg 1 0x8100 ]
[ payload load 2b @ link header + 14 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000ff0f ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x0fff ) ^ 0x0000 ]
[ lookup reg 1 set map1 dreg 1 ]
[ meta set mark with reg 1 ]
diff --git a/tests/py/any/queue.t.payload b/tests/py/any/queue.t.payload
index 2f221930..b3b5dc05 100644
--- a/tests/py/any/queue.t.payload
+++ b/tests/py/any/queue.t.payload
@@ -50,7 +50,7 @@ ip
# queue flags bypass to oifname map { "eth0" : 0, "ppp0" : 2, "eth1" : 2 }
__map%d test-ip4 b size 3
__map%d test-ip4 0
- element 30687465 00000000 00000000 00000000 : 00000000 0 [end] element 30707070 00000000 00000000 00000000 : 00000002 0 [end] element 31687465 00000000 00000000 00000000 : 00000002 0 [end]
+ element 65746830 00000000 00000000 00000000 : 0000 element 70707030 00000000 00000000 00000000 : 0002 element 65746831 00000000 00000000 00000000 : 0002
ip
[ meta load oifname => reg 1 ]
[ lookup reg 1 set __map%d dreg 1 ]
diff --git a/tests/py/any/rawpayload.t.payload b/tests/py/any/rawpayload.t.payload
index dfc651e2..2d6ae565 100644
--- a/tests/py/any/rawpayload.t.payload
+++ b/tests/py/any/rawpayload.t.payload
@@ -1,10 +1,10 @@
# meta l4proto { tcp, udp, sctp} @th,16,16 { 22, 23, 80 }
__set%d test-inet 3 size 3
__set%d test-inet 0
- element 00000006 : 0 [end] element 00000011 : 0 [end] element 00000084 : 0 [end]
+ element 06 element 11 element 84
__set%d test-inet 3 size 3
__set%d test-inet 0
- element 00001600 : 0 [end] element 00001700 : 0 [end] element 00005000 : 0 [end]
+ element 0016 element 0017 element 0050
inet test-inet input
[ meta load l4proto => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -14,105 +14,105 @@ inet test-inet input
# meta l4proto tcp @th,16,16 { 22, 23, 80}
__set%d test-inet 3 size 3
__set%d test-inet 0
- element 00001600 : 0 [end] element 00001700 : 0 [end] element 00005000 : 0 [end]
+ element 0016 element 0017 element 0050
inet test-inet input
[ meta load l4proto => reg 1 ]
- [ cmp eq reg 1 0x00000006 ]
+ [ cmp eq reg 1 0x06 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
[ lookup reg 1 set __set%d ]
# @nh,8,8 0xff
inet test-inet input
[ payload load 1b @ network header + 1 => reg 1 ]
- [ cmp eq reg 1 0x000000ff ]
+ [ cmp eq reg 1 0xff ]
# @nh,8,16 0x0
inet test-inet input
[ payload load 2b @ network header + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x0000 ]
# @ll,0,1 1
inet test-inet input
[ payload load 1b @ link header + 0 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000080 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000080 ]
+ [ bitwise reg 1 = ( reg 1 & 0x80 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x80 ]
# @ll,0,8 & 0x80 == 0x80
inet test-inet input
[ payload load 1b @ link header + 0 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000080 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000080 ]
+ [ bitwise reg 1 = ( reg 1 & 0x80 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x80 ]
# @ll,0,128 0xfedcba987654321001234567890abcde
inet test-inet input
[ payload load 16b @ link header + 0 => reg 1 ]
- [ cmp eq reg 1 0x98badcfe 0x10325476 0x67452301 0xdebc0a89 ]
+ [ cmp eq reg 1 0xfedcba98 0x76543210 0x01234567 0x890abcde ]
# meta l4proto 91 @th,400,16 0x0 accept
inet test-inet input
[ meta load l4proto => reg 1 ]
- [ cmp eq reg 1 0x0000005b ]
+ [ cmp eq reg 1 0x5b ]
[ payload load 2b @ transport header + 50 => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x0000 ]
[ immediate reg 0 accept ]
# meta l4proto 91 @th,0,16 0x0 accept
inet test-inet input
[ meta load l4proto => reg 1 ]
- [ cmp eq reg 1 0x0000005b ]
+ [ cmp eq reg 1 0x5b ]
[ payload load 2b @ transport header + 0 => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x0000 ]
[ immediate reg 0 accept ]
# @ih,32,32 0x14000000
inet test-inet input
[ payload load 4b @ inner header + 4 => reg 1 ]
- [ cmp eq reg 1 0x00000014 ]
+ [ cmp eq reg 1 0x14000000 ]
# @ih,58,6 set 0 @ih,86,6 set 0 @ih,170,22 set 0
inet test-inet input
[ payload load 2b @ inner header + 6 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000c0ff ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xffc0 ) ^ 0x0000 ]
[ payload write reg 1 => 2b @ inner header + 6 csum_type 0 csum_off 0 csum_flags 0x1 ]
[ payload load 2b @ inner header + 10 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000ffc ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfc0f ) ^ 0x0000 ]
[ payload write reg 1 => 2b @ inner header + 10 csum_type 0 csum_off 0 csum_flags 0x1 ]
[ payload load 4b @ inner header + 20 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000c0ff ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xffc00000 ) ^ 0x00000000 ]
[ payload write reg 1 => 4b @ inner header + 20 csum_type 0 csum_off 0 csum_flags 0x1 ]
# @ih,58,6 set 0x1 @ih,86,6 set 0x2 @ih,170,22 set 0x3
inet test-inet input
[ payload load 2b @ inner header + 6 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000c0ff ) ^ 0x00000100 ]
+ [ bitwise reg 1 = ( reg 1 & 0xffc0 ) ^ 0x0001 ]
[ payload write reg 1 => 2b @ inner header + 6 csum_type 0 csum_off 0 csum_flags 0x1 ]
[ payload load 2b @ inner header + 10 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000ffc ) ^ 0x00002000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfc0f ) ^ 0x0020 ]
[ payload write reg 1 => 2b @ inner header + 10 csum_type 0 csum_off 0 csum_flags 0x1 ]
[ payload load 4b @ inner header + 20 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000c0ff ) ^ 0x03000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xffc00000 ) ^ 0x00000003 ]
[ payload write reg 1 => 4b @ inner header + 20 csum_type 0 csum_off 0 csum_flags 0x1 ]
# @ih,58,6 0x0 @ih,86,6 0x0 @ih,170,22 0x0
inet test-inet input
[ payload load 1b @ inner header + 7 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000003f ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x3f ) ^ 0x00 ]
+ [ cmp eq reg 1 0x00 ]
[ payload load 2b @ inner header + 10 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f003 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x03f0 ) ^ 0x0000 ]
+ [ cmp eq reg 1 0x0000 ]
[ payload load 3b @ inner header + 21 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00ffff3f ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x3fffff ) ^ 0x000000 ]
+ [ cmp eq reg 1 0x000000 ]
# @ih,1,2 0x2
inet test-inet input
[ payload load 1b @ inner header + 0 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000060 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000040 ]
+ [ bitwise reg 1 = ( reg 1 & 0x60 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x40 ]
# @ih,35,3 0x2
inet test-inet input
[ payload load 1b @ inner header + 4 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000001c ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000008 ]
+ [ bitwise reg 1 = ( reg 1 & 0x1c ) ^ 0x00 ]
+ [ cmp eq reg 1 0x08 ]
diff --git a/tests/py/any/rt.t.payload b/tests/py/any/rt.t.payload
index e1ecb286..a3d7a7cc 100644
--- a/tests/py/any/rt.t.payload
+++ b/tests/py/any/rt.t.payload
@@ -6,10 +6,9 @@ ip test-ip4 input
# rt ipsec exists
ip test-ip4 input
[ rt load ipsec => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# rt ipsec missing
ip test-ip4 input
[ rt load ipsec => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
-
+ [ cmp eq reg 1 0x00 ]
diff --git a/tests/py/any/tcpopt.t.payload b/tests/py/any/tcpopt.t.payload
index 437e073a..15b111ba 100644
--- a/tests/py/any/tcpopt.t.payload
+++ b/tests/py/any/tcpopt.t.payload
@@ -1,203 +1,203 @@
# tcp option eol exists
inet
[ exthdr load tcpopt 1b @ 0 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option nop exists
inet
[ exthdr load tcpopt 1b @ 1 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option maxseg exists
inet
[ exthdr load tcpopt 1b @ 2 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option maxseg length 1
inet
[ exthdr load tcpopt 1b @ 2 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option maxseg size 1
inet
[ exthdr load tcpopt 2b @ 2 + 2 => reg 1 ]
- [ cmp eq reg 1 0x00000100 ]
+ [ cmp eq reg 1 0x0001 ]
# tcp option window length 1
inet
[ exthdr load tcpopt 1b @ 3 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option window count 1
inet
[ exthdr load tcpopt 1b @ 3 + 2 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option sack-perm exists
inet
[ exthdr load tcpopt 1b @ 4 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option sack-perm length 1
inet
[ exthdr load tcpopt 1b @ 4 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option sack exists
inet
[ exthdr load tcpopt 1b @ 5 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option sack length 1
inet
[ exthdr load tcpopt 1b @ 5 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option sack left 1
inet
[ exthdr load tcpopt 4b @ 5 + 2 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack0 left 1
inet
[ exthdr load tcpopt 4b @ 5 + 2 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack1 left 1
inet
[ exthdr load tcpopt 4b @ 5 + 10 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack2 left 1
inet
[ exthdr load tcpopt 4b @ 5 + 18 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack3 left 1
inet
[ exthdr load tcpopt 4b @ 5 + 26 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack right 1
inet
[ exthdr load tcpopt 4b @ 5 + 6 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack0 right 1
inet
[ exthdr load tcpopt 4b @ 5 + 6 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack1 right 1
inet
[ exthdr load tcpopt 4b @ 5 + 14 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack2 right 1
inet
[ exthdr load tcpopt 4b @ 5 + 22 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option sack3 right 1
inet
[ exthdr load tcpopt 4b @ 5 + 30 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option timestamp exists
inet
[ exthdr load tcpopt 1b @ 8 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option timestamp length 1
inet
[ exthdr load tcpopt 1b @ 8 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option timestamp tsval 1
inet
[ exthdr load tcpopt 4b @ 8 + 2 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option timestamp tsecr 1
inet
[ exthdr load tcpopt 4b @ 8 + 6 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# tcp option 255 missing
inet
[ exthdr load tcpopt 1b @ 255 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x00 ]
# tcp option 6 exists
inet
[ exthdr load tcpopt 1b @ 6 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option @255,8,8 255
inet
[ exthdr load tcpopt 1b @ 255 + 1 => reg 1 ]
- [ cmp eq reg 1 0x000000ff ]
+ [ cmp eq reg 1 0xff ]
# tcp option window exists
inet
[ exthdr load tcpopt 1b @ 3 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option window missing
inet
[ exthdr load tcpopt 1b @ 3 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ cmp eq reg 1 0x00 ]
# tcp option maxseg size set 1360
inet
- [ immediate reg 1 0x00005005 ]
+ [ immediate reg 1 0x0550 ]
[ exthdr write tcpopt reg 1 => 2b @ 2 + 2 ]
# tcp option md5sig exists
-inet
+ip test-ip4 input
[ exthdr load tcpopt 1b @ 19 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option fastopen exists
inet
[ exthdr load tcpopt 1b @ 34 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option mptcp exists
inet
[ exthdr load tcpopt 1b @ 30 + 0 present => reg 1 ]
- [ cmp eq reg 1 0x00000001 ]
+ [ cmp eq reg 1 0x01 ]
# tcp option mptcp subtype mp-capable
inet
[ exthdr load tcpopt 1b @ 30 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x000000f0 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xf0 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x00 ]
# tcp option mptcp subtype 1
inet
[ exthdr load tcpopt 1b @ 30 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x000000f0 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000010 ]
+ [ bitwise reg 1 = ( reg 1 & 0xf0 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x10 ]
# tcp option mptcp subtype { mp-capable, mp-join, remove-addr, mp-prio, mp-fail, mp-fastclose, mp-tcprst }
__set%d test-ip4 3 size 7
__set%d test-ip4 0
- element 00000000 : 0 [end] element 00000010 : 0 [end] element 00000040 : 0 [end] element 00000050 : 0 [end] element 00000060 : 0 [end] element 00000070 : 0 [end] element 00000080 : 0 [end]
+ element 00 element 10 element 40 element 50 element 60 element 70 element 80
ip test-ip4 input
[ exthdr load tcpopt 1b @ 30 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x000000f0 ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xf0 ) ^ 0x00 ]
[ lookup reg 1 set __set%d ]
# tcp option mptcp subtype . tcp dport { mp-capable . 10, mp-join . 100, add-addr . 200, remove-addr . 300, mp-prio . 400, mp-fail . 500, mp-fastclose . 600, mp-tcprst . 700 }
__set%d test-ip4 3
__set%d test-ip4 0
- element 00000000 00000a00 : 0 [end] element 00000001 00006400 : 0 [end] element 00000003 0000c800 : 0 [end] element 00000004 00002c01 : 0 [end] element 00000005 00009001 : 0 [end] element 00000006 0000f401 : 0 [end] element 00000007 00005802 : 0 [end] element 00000008 0000bc02 : 0 [end]
+ element 00 . 000a element 01 . 0064 element 03 . 00c8 element 04 . 012c element 05 . 0190 element 06 . 01f4 element 07 . 0258 element 08 . 02bc
ip test-ip4 input
[ meta load l4proto => reg 1 ]
- [ cmp eq reg 1 0x00000006 ]
+ [ cmp eq reg 1 0x06 ]
[ exthdr load tcpopt 1b @ 30 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x000000f0 ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xf0 ) ^ 0x00 ]
[ bitwise reg 1 = ( reg 1 >> 0x00000004 ) ]
[ payload load 2b @ transport header + 2 => reg 9 ]
[ lookup reg 1 set __set%d ]