Back to home page

OSCL-LXR

 
 

    


0001 [
0002     {
0003         "id": "b1e9",
0004         "name": "Test matching of source IP",
0005         "category": [
0006             "actions",
0007             "scapy"
0008         ],
0009         "plugins": {
0010             "requires": [
0011                 "nsPlugin",
0012                 "scapyPlugin"
0013             ]
0014         },
0015         "setup": [
0016             [
0017                 "$TC qdisc del dev $DEV1 ingress",
0018                 0,
0019                 1,
0020                 2,
0021                 255
0022             ],
0023             "$TC qdisc add dev $DEV1 ingress"
0024         ],
0025         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 protocol ip flower src_ip 16.61.16.61 flowid 1:1 action ok",
0026         "scapy": {
0027             "iface": "$DEV0",
0028             "count": 1,
0029             "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()"
0030         },
0031         "expExitCode": "0",
0032         "verifyCmd": "$TC -s -j filter ls dev $DEV1 ingress prio 3",
0033         "matchJSON": [
0034             {
0035                 "path": [
0036                     1,
0037                     "options",
0038                     "actions",
0039                     0,
0040                     "stats",
0041                     "packets"
0042                 ],
0043                 "value": 1
0044             }
0045         ],
0046         "teardown": [
0047             "$TC qdisc del dev $DEV1 ingress"
0048         ]
0049     },
0050     {
0051         "id": "e9c4",
0052         "name": "Test matching of source IP with wrong count",
0053         "category": [
0054             "actions",
0055             "scapy"
0056         ],
0057         "plugins": {
0058             "requires": [
0059                 "nsPlugin",
0060                 "scapyPlugin"
0061             ]
0062         },
0063         "setup": [
0064             [
0065                 "$TC qdisc del dev $DEV1 ingress",
0066                 0,
0067                 1,
0068                 2,
0069                 255
0070             ],
0071             "$TC qdisc add dev $DEV1 ingress"
0072         ],
0073         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 protocol ip flower src_ip 16.61.16.61 flowid 1:1 action ok",
0074         "scapy": {
0075             "iface": "$DEV0",
0076             "count": 3,
0077             "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()"
0078         },
0079         "expExitCode": "0",
0080         "verifyCmd": "$TC -s -j filter ls dev $DEV1 parent ffff:",
0081         "matchJSON": [
0082             {
0083                 "path": [
0084                     1,
0085                     "options",
0086                     "actions",
0087                     0,
0088                     "stats",
0089                     "packets"
0090                 ],
0091                 "value": 1
0092             }
0093         ],
0094         "teardown": [
0095             "$TC qdisc del dev $DEV1 ingress"
0096         ]
0097     }
0098 ]