summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/map.t.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/py/inet/map.t.json')
-rw-r--r--tests/py/inet/map.t.json66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/py/inet/map.t.json b/tests/py/inet/map.t.json
new file mode 100644
index 00000000..b7bb10a9
--- /dev/null
+++ b/tests/py/inet/map.t.json
@@ -0,0 +1,66 @@
+# mark set ip saddr map { 10.2.3.2 : 0x0000002a, 10.2.3.1 : 0x00000017}
+[
+ {
+ "mangle": {
+ "left": {
+ "meta": "mark"
+ },
+ "right": {
+ "map": {
+ "left": {
+ "payload": {
+ "field": "saddr",
+ "name": "ip"
+ }
+ },
+ "right": {
+ "set": [
+ [
+ "10.2.3.2",
+ "0x0000002a"
+ ],
+ [
+ "10.2.3.1",
+ "0x00000017"
+ ]
+ ]
+ }
+ }
+ }
+ }
+ }
+]
+
+# mark set ip hdrlength map { 5 : 0x00000017, 4 : 0x00000001}
+[
+ {
+ "mangle": {
+ "left": {
+ "meta": "mark"
+ },
+ "right": {
+ "map": {
+ "left": {
+ "payload": {
+ "field": "hdrlength",
+ "name": "ip"
+ }
+ },
+ "right": {
+ "set": [
+ [
+ 5,
+ "0x00000017"
+ ],
+ [
+ 4,
+ "0x00000001"
+ ]
+ ]
+ }
+ }
+ }
+ }
+ }
+]
+