summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/map.t.payload.ip
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/inet/map.t.payload.ip')
-rw-r--r--tests/py/inet/map.t.payload.ip10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/py/inet/map.t.payload.ip b/tests/py/inet/map.t.payload.ip
index 54b9583a..465a55ae 100644
--- a/tests/py/inet/map.t.payload.ip
+++ b/tests/py/inet/map.t.payload.ip
@@ -7,3 +7,13 @@ ip test-ip input
[ lookup reg 1 set map%d dreg 1 ]
[ meta set mark with reg 1 ]
+# mark set ip hdrlength map { 5 : 0x00000017, 4 : 0x00000001}
+map%d test-ip4 b
+map%d test-ip4 0
+ element 00000004 : 00000001 0 [end] element 00000005 : 00000017 0 [end]
+ip test-ip4 input
+ [ payload load 1b @ network header + 0 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x0000000f ) ^ 0x00000000 ]
+ [ lookup reg 1 set map%d dreg 1 ]
+ [ meta set mark with reg 1 ]
+