From: Alexander Aring <aring@mojatatu.com>
To: Lucas Bates <lucasb@mojatatu.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, mleitner@redhat.com,
vladbu@mellanox.com, dcaratti@redhat.com, kernel@mojatatu.com
Subject: Re: [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic
Date: Thu, 4 Jul 2019 16:29:09 -0400 [thread overview]
Message-ID: <20190704202909.gmggf3agxjgvyjsj@x220t> (raw)
In-Reply-To: <1562201102-4332-4-git-send-email-lucasb@mojatatu.com>
Hi,
On Wed, Jul 03, 2019 at 08:45:02PM -0400, Lucas Bates wrote:
> The scapyPlugin allows for simple traffic generation in tdc to
> test various tc features. It was tested with scapy v2.4.2, but
> should work with any successive version.
>
> In order to use the plugin's functionality, scapy must be
> installed. This can be done with:
> pip3 install scapy
>
> or to install 2.4.2:
> pip3 install scapy==2.4.2
>
> If the plugin is unable to import the scapy module, it will
> terminate the tdc run.
>
> The plugin makes use of a new key in the test case data, 'scapy'.
> This block contains three other elements: 'iface', 'count', and
> 'packet':
>
> "scapy": {
> "iface": "$DEV0",
> "count": 1,
> "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()"
> },
>
> * iface is the name of the device on the host machine from which
> the packet(s) will be sent. Values contained within tdc_config.py's
> NAMES dict can be used here - this is useful if paired with
> nsPlugin
> * count is the number of copies of this packet to be sent
> * packet is a string detailing the different layers of the packet
> to be sent. If a property isn't explicitly set, scapy will set
> default values for you.
>
> Layers in the packet info are separated by slashes. For info about
> common TCP and IP properties, see:
> https://blogs.sans.org/pen-testing/files/2016/04/ScapyCheatSheet_v0.2.pdf
>
> Caution is advised when running tests using the scapy functionality,
> since the plugin blindly sends the packet as defined in the test case
> data.
>
> See creating-testcases/scapy-example.json for sample test cases;
> the first test is intended to pass while the second is intended to
> fail. Consider using the matchJSON functionality for verification
> when using scapy.
>
Is there a way to introduce thrid party scapy level descriptions which
are not upstream yet?
- Alex
next prev parent reply other threads:[~2019-07-04 20:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 0:44 [PATCH v2 net-next 0/3] tc-testing: Add JSON verification and simple traffic generation Lucas Bates
2019-07-04 0:45 ` [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc Lucas Bates
2019-07-04 20:21 ` Alexander Aring
2019-07-08 16:48 ` Lucas Bates
2019-07-08 17:24 ` Alexander Aring
2019-07-09 1:17 ` Lucas Bates
2019-07-04 0:45 ` [PATCH v2 net-next 2/3] tc-testing: Allow tdc plugins to see test case data Lucas Bates
2019-07-04 0:45 ` [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic Lucas Bates
2019-07-04 20:29 ` Alexander Aring [this message]
2019-07-09 1:28 ` Lucas Bates
2019-07-09 15:10 ` Alexander Aring
2019-07-08 1:57 ` [PATCH v2 net-next 0/3] tc-testing: Add JSON verification and simple traffic generation David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190704202909.gmggf3agxjgvyjsj@x220t \
--to=aring@mojatatu.com \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=lucasb@mojatatu.com \
--cc=mleitner@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=vladbu@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).