[
    {
        "id": "319a",
        "name": "Add pedit action that mangles IP TTL",
        "category": [
            "actions",
            "pedit"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip ttl set 10",
        "expExitCode": "0",
        "verifyCmd": "$TC actions ls action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 1 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "7e67",
        "name": "Replace pedit action with invalid goto chain",
        "category": [
            "actions",
            "pedit"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ],
            "$TC actions add action pedit ex munge ip ttl set 10 pass index 90"
        ],
        "cmdUnderTest": "$TC actions replace action pedit ex munge ip ttl set 10 goto chain 42 index 90 cookie c1a0c1a0",
        "expExitCode": "255",
        "verifyCmd": "$TC actions ls action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*index 90 ref.*key #0  at ipv4\\+8: val 0a000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "377e",
        "name": "Add pedit action with RAW_OP offset u32",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x90abcdef",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "12: val 90abcdef mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "a0ca",
        "name": "Add pedit action with RAW_OP offset u32 (INVALID)",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 2 u32 set 0x12345678",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "dd8a",
        "name": "Add pedit action with RAW_OP offset u16 u16",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 set 0x1234 munge offset 14 u16 set 0x5678",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "val 12340000 mask 0000ffff.*val 00005678 mask ffff0000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "53db",
        "name": "Add pedit action with RAW_OP offset u16 (INVALID)",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 15 u16 set 0x1234",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "5c7e",
        "name": "Add pedit action with RAW_OP offset u8 add value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge offset 16 u8 add 0xf",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 16: add 0f000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "2893",
        "name": "Add pedit action with RAW_OP offset u8 quad",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u8 set 0x12 munge offset 13 u8 set 0x34 munge offset 14 u8 set 0x56 munge offset 15 u8 set 0x78",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "val 12000000 mask 00ffffff.*val 00340000 mask ff00ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "3a07",
        "name": "Add pedit action with RAW_OP offset u8-u16-u8",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "val 12000000 mask 00ffffff.*val 00345600 mask ff0000ff.*val 00000078 mask ffffff00",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "ab0f",
        "name": "Add pedit action with RAW_OP offset u16-u8-u8",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 set 0x1234 munge offset 2 u8 set 0x56 munge offset 3 u8 set 0x78",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "val 12340000 mask 0000ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "9d12",
        "name": "Add pedit action with RAW_OP offset u32 set u16 clear u8 invert",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 set 0x12345678 munge offset 1 u16 clear munge offset 2 u8 invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "val 12345678 mask 00000000.*val 00000000 mask ff0000ff.*val 0000ff00 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "ebfa",
        "name": "Add pedit action with RAW_OP offset overflow u32 (INVALID)",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0xffffffffffffffffffffffffffffffffffffffffff u32 set 0x1",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "f512",
        "name": "Add pedit action with RAW_OP offset u16 at offmask shift set",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 at 12 ffff 1 set 0xaaaa",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 12: val aaaa0000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "c2cb",
        "name": "Add pedit action with RAW_OP offset u32 retain value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x12345678 retain 0xff00",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 12: val 00005600 mask ffff00ff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "1762",
        "name": "Add pedit action with RAW_OP offset u8 clear value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 clear",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "bcee",
        "name": "Add pedit action with RAW_OP offset u8 retain value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 set 0x11 retain 0x0f",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 01000000 mask f0ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "e89f",
        "name": "Add pedit action with RAW_OP offset u16 retain value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 set 0x1122 retain 0xff00",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 11000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "c282",
        "name": "Add pedit action with RAW_OP offset u32 clear value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 clear",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "c422",
        "name": "Add pedit action with RAW_OP offset u16 invert value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 12: val ffff0000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "d3d3",
        "name": "Add pedit action with RAW_OP offset u32 invert value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 12: val ffffffff mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "57e5",
        "name": "Add pedit action with RAW_OP offset u8 preserve value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 preserve",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "99e0",
        "name": "Add pedit action with RAW_OP offset u16 preserve value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 preserve",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "1892",
        "name": "Add pedit action with RAW_OP offset u32 preserve value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 preserve",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 1.*key #0.*at 0: val 00000000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "4b60",
        "name": "Add pedit action with RAW_OP negative offset u16/u32 set value",
        "category": [
            "actions",
            "pedit",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge offset -14 u16 set 0x0000 munge offset -12 u32 set 0x00000100 munge offset -8 u32 set 0x0aaf0100 munge offset -4 u32 set 0x0008eb06 pipe",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:.*pedit.*keys 4.*key #0.*at -16: val 00000000 mask ffff0000.*key #1.*at -12: val 00000100 mask 00000000.*key #2.*at -8: val 0aaf0100 mask 00000000.*key #3.*at -4: val 0008eb06 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "a5a7",
        "name": "Add pedit action with LAYERED_OP eth set src",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+4: val 00001122 mask ffff0000.*key #1  at eth\\+8: val 33445566 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "86d4",
        "name": "Add pedit action with LAYERED_OP eth set src & dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "f8a9",
        "name": "Add pedit action with LAYERED_OP eth set dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst set 11:22:33:44:55:66",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+0: val 11223344 mask 00000000.*key #1  at eth\\+4: val 55660000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "c715",
        "name": "Add pedit action with LAYERED_OP eth set src (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set %e:11:m2:33:x4:-5",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "8131",
        "name": "Add pedit action with LAYERED_OP eth set dst (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst set %e:11:m2:33:x4:-5",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "ba22",
        "name": "Add pedit action with LAYERED_OP eth type set/clear sequence",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "dec4",
        "name": "Add pedit action with LAYERED_OP eth set type (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth type set 0xabcdef",
        "expExitCode": "255",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth+12: val ",
        "matchCount": "0",
        "teardown": []
    },
    {
        "id": "ab06",
        "name": "Add pedit action with LAYERED_OP eth add type",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth type add 0x1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth\\+12: add 00010000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "918d",
        "name": "Add pedit action with LAYERED_OP eth invert src",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+4: val 0000ff00 mask ffff0000.*key #1  at eth\\+8: val 00000000 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "a8d4",
        "name": "Add pedit action with LAYERED_OP eth invert dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth dst invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 2.*key #0  at eth\\+0: val ff000000 mask 00000000.*key #1  at eth\\+4: val 00000000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "ee13",
        "name": "Add pedit action with LAYERED_OP eth invert type",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth type invert",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at eth\\+12: val ffff0000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "7588",
        "name": "Add pedit action with LAYERED_OP ip set src",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip src set 1.1.1.1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at 12: val 01010101 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "0fa7",
        "name": "Add pedit action with LAYERED_OP ip set dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip dst set 2.2.2.2",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at 16: val 02020202 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "5810",
        "name": "Add pedit action with LAYERED_OP ip set src & dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip src set 18.52.86.120 munge ip dst set 18.52.86.120",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 12: val 12345678 mask 00000000.* 16: val 12345678 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "1092",
        "name": "Add pedit action with LAYERED_OP ip set ihl & dsfield",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ihl set 0xff munge ip dsfield set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 0: val 0f000000 mask f0ffffff.* 0: val 00ff0000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "02d8",
        "name": "Add pedit action with LAYERED_OP ip set ttl & protocol",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip protocol set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 00ff0000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "3e2d",
        "name": "Add pedit action with LAYERED_OP ip set ttl (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 300",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "31ae",
        "name": "Add pedit action with LAYERED_OP ip ttl clear/set",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ttl clear munge ip ttl set 0x1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 8: val 00000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "486f",
        "name": "Add pedit action with LAYERED_OP ip set duplicate fields",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip ttl set 0x1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "e790",
        "name": "Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip ce set 0xff munge ip df set 0xff munge ip mf set 0xff munge ip firstfrag set 0xff munge ip nofrag set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 4: val 00008000 mask ffff7fff.* 4: val 00004000 mask ffffbfff.* 4: val 00002000 mask ffffdfff.* 4: val 00001f00 mask ffffe0ff.* 4: val 00003f00 mask ffffc0ff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "cc8a",
        "name": "Add pedit action with LAYERED_OP ip set tos",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip tos set 0x4 continue",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action continue keys 1.*key #0  at 0: val 00040000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "7a17",
        "name": "Add pedit action with LAYERED_OP ip set precedence",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip precedence set 3 jump 2",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action jump 2 keys 1.*key #0  at 0: val 00030000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "c3b6",
        "name": "Add pedit action with LAYERED_OP ip add tos",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip tos add 0x1 pass",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 1.*key #0  at ipv4\\+0: add 00010000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "43d3",
        "name": "Add pedit action with LAYERED_OP ip add precedence",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip precedence add 0x1 pipe",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pipe keys 1.*key #0  at ipv4\\+0: add 00010000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "438e",
        "name": "Add pedit action with LAYERED_OP ip clear tos",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip tos clear continue",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action continue keys 1.*key #0  at 0: val 00000000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "6b1b",
        "name": "Add pedit action with LAYERED_OP ip clear precedence",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip precedence clear jump 2",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action jump 2 keys 1.*key #0  at 0: val 00000000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "824a",
        "name": "Add pedit action with LAYERED_OP ip invert tos",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip tos invert pipe",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pipe keys 1.*key #0  at 0: val 00ff0000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "106f",
        "name": "Add pedit action with LAYERED_OP ip invert precedence",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip precedence invert reclassify",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action reclassify keys 1.*key #0  at 0: val 00ff0000 mask ffffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "6829",
        "name": "Add pedit action with LAYERED_OP beyond ip set dport & sport",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip dport set 0x1234 munge ip sport set 0x5678",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 20: val 00001234 mask ffff0000.* 20: val 56780000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "afd8",
        "name": "Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit munge ip icmp_type set 0xff munge ip icmp_code set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": " 20: val ff000000 mask 00ffffff.* 20: val ff000000 mask 00ffffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "3143",
        "name": "Add pedit action with LAYERED_OP beyond ip set dport (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip dport set 0x1234",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "815c",
        "name": "Add pedit action with LAYERED_OP ip6 set src",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 src set 2001:0db8:0:f101::1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 4.*key #0  at ipv6\\+8: val 20010db8 mask 00000000.*key #1  at ipv6\\+12: val 0000f101 mask 00000000.*key #2  at ipv6\\+16: val 00000000 mask 00000000.*key #3  at ipv6\\+20: val 00000001 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "4dae",
        "name": "Add pedit action with LAYERED_OP ip6 set dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 dst set 2001:0db8:0:f101::1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "action order [0-9]+:  pedit action pass keys 4.*key #0  at ipv6\\+24: val 20010db8 mask 00000000.*key #1  at ipv6\\+28: val 0000f101 mask 00000000.*key #2  at ipv6\\+32: val 00000000 mask 00000000.*key #3  at ipv6\\+36: val 00000001 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "fc1f",
        "name": "Add pedit action with LAYERED_OP ip6 set src & dst",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 src set 2001:0db8:0:f101::1 munge ip6 dst set 2001:0db8:0:f101::1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "ipv6\\+8: val 20010db8 mask 00000000.*ipv6\\+12: val 0000f101 mask 00000000.*ipv6\\+16: val 00000000 mask 00000000.*ipv6\\+20: val 00000001 mask 00000000.*ipv6\\+24: val 20010db8 mask 00000000.*ipv6\\+28: val 0000f101 mask 00000000.*ipv6\\+32: val 00000000 mask 00000000.*ipv6\\+36: val 00000001 mask 00000000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "6d34",
        "name": "Add pedit action with LAYERED_OP ip6 dst retain value (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 dst set 2001:0db8:0:f101::1 retain 0xff0000",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "94bb",
        "name": "Add pedit action with LAYERED_OP ip6 traffic_class",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 traffic_class set 0x40 continue",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit",
        "matchPattern": "ipv6\\+0: val 04000000 mask f00fffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "6f5e",
        "name": "Add pedit action with LAYERED_OP ip6 flow_lbl",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 flow_lbl set 0xfffff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "ipv6\\+0: val 0007ffff mask fff80000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "6795",
        "name": "Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 000000ff mask ffffff00",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "1442",
        "name": "Add pedit action with LAYERED_OP tcp set dport & sport",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "b7ac",
        "name": "Add pedit action with LAYERED_OP tcp sport set (INVALID)",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge tcp sport set -200",
        "expExitCode": "255",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "cfcc",
        "name": "Add pedit action with LAYERED_OP tcp flags set",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge tcp flags set 0x16",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "tcp\\+12: val 00160000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "3bc4",
        "name": "Add pedit action with LAYERED_OP tcp set dport, sport & flags fields",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1 munge tcp flags set 0x1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff.*tcp\\+12: val 00010000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "f1c8",
        "name": "Add pedit action with LAYERED_OP udp set dport & sport",
        "category": [
            "actions",
            "pedit",
            "layered_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge udp dport set 4789 munge udp sport set 4789",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "udp\\+0: val 000012b5 mask ffff0000.*udp\\+0: val 12b50000 mask 0000ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "d784",
        "name": "Add pedit action with mixed RAW/LAYERED_OP #1",
        "category": [
            "actions",
            "pedit",
            "layered_op",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge ip ttl set 0xff munge tcp flags clear munge offset 15 u8 add 40 retain 0xf0 munge udp dport add 1",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*ipv4\\+8: val ff000000 mask 00ffffff.*tcp\\+12: val 00000000 mask ff00ffff.* 12: add 00000020 mask ffffff0f.*udp\\+0: add 00000001 mask ffff0000",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    },
    {
        "id": "70ca",
        "name": "Add pedit action with mixed RAW/LAYERED_OP #2",
        "category": [
            "actions",
            "pedit",
            "layered_op",
            "raw_op"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            [
                "$TC actions flush action pedit",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit preserve munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78 munge ip ttl set 0xaa munge ip protocol set 0xff",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action pedit | grep 'key '",
        "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff.*ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 00000000 mask ffffffff.* 0: val 12000000 mask 00ffffff.* 0: val 00345600 mask ff0000ff.* 0: val 00000078 mask ffffff00.*ipv4\\+8: val aa000000 mask 00ffffff.*ipv4\\+8: val 00ff0000 mask ff00ffff",
        "matchCount": "1",
        "teardown": [
            "$TC actions flush action pedit"
        ]
    }
]
