~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/tc-testing/creating-testcases/scapy-example.json

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 [
  2     {
  3         "id": "b1e9",
  4         "name": "Test matching of source IP",
  5         "category": [
  6             "actions",
  7             "scapy"
  8         ],
  9         "plugins": {
 10             "requires": [
 11                 "nsPlugin",
 12                 "scapyPlugin"
 13             ]
 14         },
 15         "setup": [
 16             [
 17                 "$TC qdisc del dev $DEV1 ingress",
 18                 0,
 19                 1,
 20                 2,
 21                 255
 22             ],
 23             "$TC qdisc add dev $DEV1 ingress"
 24         ],
 25         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 protocol ip flower src_ip 16.61.16.61 flowid 1:1 action ok",
 26         "scapy": {
 27             "iface": "$DEV0",
 28             "count": 1,
 29             "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()"
 30         },
 31         "expExitCode": "0",
 32         "verifyCmd": "$TC -s -j filter ls dev $DEV1 ingress prio 3",
 33         "matchJSON": [
 34             {
 35                 "path": [
 36                     1,
 37                     "options",
 38                     "actions",
 39                     0,
 40                     "stats",
 41                     "packets"
 42                 ],
 43                 "value": 1
 44             }
 45         ],
 46         "teardown": [
 47             "$TC qdisc del dev $DEV1 ingress"
 48         ]
 49     },
 50     {
 51         "id": "e9c4",
 52         "name": "Test matching of source IP with wrong count",
 53         "category": [
 54             "actions",
 55             "scapy"
 56         ],
 57         "plugins": {
 58             "requires": [
 59                 "nsPlugin",
 60                 "scapyPlugin"
 61             ]
 62         },
 63         "setup": [
 64             [
 65                 "$TC qdisc del dev $DEV1 ingress",
 66                 0,
 67                 1,
 68                 2,
 69                 255
 70             ],
 71             "$TC qdisc add dev $DEV1 ingress"
 72         ],
 73         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 protocol ip flower src_ip 16.61.16.61 flowid 1:1 action ok",
 74         "scapy": {
 75             "iface": "$DEV0",
 76             "count": 3,
 77             "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()"
 78         },
 79         "expExitCode": "0",
 80         "verifyCmd": "$TC -s -j filter ls dev $DEV1 parent ffff:",
 81         "matchJSON": [
 82             {
 83                 "path": [
 84                     1,
 85                     "options",
 86                     "actions",
 87                     0,
 88                     "stats",
 89                     "packets"
 90                 ],
 91                 "value": 1
 92             }
 93         ],
 94         "teardown": [
 95             "$TC qdisc del dev $DEV1 ingress"
 96         ]
 97     }
 98 ]

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php