diff options
Diffstat (limited to 'tests/py/ip/ip.t.payload')
-rw-r--r-- | tests/py/ip/ip.t.payload | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/py/ip/ip.t.payload b/tests/py/ip/ip.t.payload index 4c7bd7df..fade387e 100644 --- a/tests/py/ip/ip.t.payload +++ b/tests/py/ip/ip.t.payload @@ -50,8 +50,7 @@ ip test-ip4 input # ip length != 333-453 ip test-ip4 input [ payload load 2b @ network header + 2 => reg 1 ] - [ cmp lt reg 1 0x00004d01 ] - [ cmp gt reg 1 0x0000c501 ] + [ range neq reg 1 0x00004d01 0x0000c501 ] # ip length { 333, 553, 673, 838} __set%d test-ip4 3 @@ -88,8 +87,7 @@ ip test-ip4 input # ip id != 33-45 ip test-ip4 input [ payload load 2b @ network header + 4 => reg 1 ] - [ cmp lt reg 1 0x00002100 ] - [ cmp gt reg 1 0x00002d00 ] + [ range neq reg 1 0x00002100 0x00002d00 ] # ip id { 33, 55, 67, 88} __set%d test-ip4 3 @@ -127,8 +125,7 @@ ip test-ip4 input # ip frag-off != 33-45 ip test-ip4 input [ payload load 2b @ network header + 6 => reg 1 ] - [ cmp lt reg 1 0x00002100 ] - [ cmp gt reg 1 0x00002d00 ] + [ range neq reg 1 0x00002100 0x00002d00 ] # ip frag-off { 33, 55, 67, 88} __set%d test-ip4 3 @@ -166,8 +163,7 @@ ip test-ip4 input # ip ttl != 45-50 ip test-ip4 input [ payload load 1b @ network header + 8 => reg 1 ] - [ cmp lt reg 1 0x0000002d ] - [ cmp gt reg 1 0x00000032 ] + [ range neq reg 1 0x0000002d 0x00000032 ] # ip ttl {43, 53, 45 } __set%d test-ip4 3 @@ -234,8 +230,7 @@ ip test-ip4 input # ip checksum != 33-45 ip test-ip4 input [ payload load 2b @ network header + 10 => reg 1 ] - [ cmp lt reg 1 0x00002100 ] - [ cmp gt reg 1 0x00002d00 ] + [ range neq reg 1 0x00002100 0x00002d00 ] # ip checksum { 33, 55, 67, 88} __set%d test-ip4 3 @@ -307,8 +302,7 @@ ip test-ip4 input # ip daddr != 192.168.0.1-192.168.0.250 ip test-ip4 input [ payload load 4b @ network header + 16 => reg 1 ] - [ cmp lt reg 1 0x0100a8c0 ] - [ cmp gt reg 1 0xfa00a8c0 ] + [ range neq reg 1 0x0100a8c0 0xfa00a8c0 ] # ip daddr { 192.168.0.1-192.168.0.250} __set%d test-ip4 7 @@ -336,8 +330,7 @@ ip test-ip4 input # ip daddr != 192.168.1.2-192.168.1.55 ip test-ip4 input [ payload load 4b @ network header + 16 => reg 1 ] - [ cmp lt reg 1 0x0201a8c0 ] - [ cmp gt reg 1 0x3701a8c0 ] + [ range neq reg 1 0x0201a8c0 0x3701a8c0 ] # ip saddr 192.168.1.3-192.168.33.55 ip test-ip4 input @@ -348,8 +341,7 @@ ip test-ip4 input # ip saddr != 192.168.1.3-192.168.33.55 ip test-ip4 input [ payload load 4b @ network header + 12 => reg 1 ] - [ cmp lt reg 1 0x0301a8c0 ] - [ cmp gt reg 1 0x3721a8c0 ] + [ range neq reg 1 0x0301a8c0 0x3721a8c0 ] # ip daddr 192.168.0.1 ip test-ip4 input |