aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2018-04-20 08:23:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-20 08:23:25 +0000
commit7440717327dabe7ae37f99cb060bce43a7878096 (patch)
tree9443820fe650c7a14c81bdff3d20cfe66f04d7fa
parent5829fcd9c14c92729820f5c5e72ca49d23257de2 (diff)
parentd99f5906cc24436499eae91e5fa854ecc86a2e8b (diff)
Merge "scapy: Load default SCAPY protocols"
-rw-r--r--docs/testing/user/configguide/trafficgen.rst14
-rw-r--r--src/trex/Makefile2
2 files changed, 7 insertions, 9 deletions
diff --git a/docs/testing/user/configguide/trafficgen.rst b/docs/testing/user/configguide/trafficgen.rst
index f9e2db11..42141c59 100644
--- a/docs/testing/user/configguide/trafficgen.rst
+++ b/docs/testing/user/configguide/trafficgen.rst
@@ -974,8 +974,8 @@ definition and supported network layers at: http://www.secdev.org/projects/scapy
'scapy': {
'enabled': True,
- '0' : 'Ether(src={Ether_src}, dst={Ether_dst})/IP(proto={IP_proto}, src={IP_src}, dst={IP_dst})/ICMP()',
- '1' : 'Ether(src={Ether_dst}, dst={Ether_src})/IP(proto={IP_proto}, src={IP_dst}, dst={IP_src})/ICMP()',
+ '0' : 'Ether(src={Ether_src}, dst={Ether_dst})/IP(proto="icmp", src={IP_src}, dst={IP_dst})/ICMP()',
+ '1' : 'Ether(src={Ether_dst}, dst={Ether_src})/IP(proto="icmp", src={IP_dst}, dst={IP_src})/ICMP()',
}
#. Generate IPv6 ICMP Echo Request
@@ -992,17 +992,13 @@ definition and supported network layers at: http://www.secdev.org/projects/scapy
'1' : 'Ether(src={Ether_dst}, dst={Ether_src})/IPv6(src={IP_dst}, dst={IP_src})/ICMPv6EchoRequest()',
}
-#. Generate SCTP frames:
+#. Generate TCP frames:
- Example uses default SCAPY frame definition, which can reflect ``TRAFFIC['l3']['proto']`` settings. The same
- approach can be used to generate other protocols, e.g. TCP.
+ Example uses default SCAPY frame definition, which can reflect ``TRAFFIC['l3']['proto']`` settings.
.. code-block:: console
'l3' : {
- 'proto' : 'sctp',
+ 'proto' : 'tcp',
},
- 'scapy': {
- 'enabled': True,
- }
diff --git a/src/trex/Makefile b/src/trex/Makefile
index 41eb52ab..9a0704af 100644
--- a/src/trex/Makefile
+++ b/src/trex/Makefile
@@ -29,6 +29,8 @@ all: force_pull
force_pull: $(TAG_DONE_FLAG)
$(AT)cd $(WORK_DIR) && git pull $(TREX_URL) $(TREX_TAG)
@echo "git pull done"
+ $(AT)wget https://raw.githubusercontent.com/phaethon/scapy/v0.18/scapy/layers/all.py -O $(WORK_DIR)/scripts/external_libs/scapy-2.3.1/python3/scapy/layers/all.py
+ @echo "orignal SCAPY 2.3.1 layers/all.py was restored"
$(WORK_DIR):
$(AT)git clone $(TREX_URL) $(WORK_DIR)