summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-02-18 06:53:43 -0500
committerimarom <imarom@cisco.com>2016-02-18 06:53:43 -0500
commitd650f106869eef15b7c347f8e49896dc9a572c3c (patch)
tree2d65eef5ca1edfaaa70dc4dbefafb72eb3ee94aa /scripts/stl
parentc6f710bc844e812fe448f7a2850fe15058328777 (diff)
added tests for PCAP profiles
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/pcap_with_vm.py17
-rw-r--r--scripts/stl/sample.pcapbin98768 -> 496 bytes
2 files changed, 13 insertions, 4 deletions
diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py
index 7962d2b2..c3f34cfb 100644
--- a/scripts/stl/pcap_with_vm.py
+++ b/scripts/stl/pcap_with_vm.py
@@ -11,24 +11,33 @@ class STLPcap(object):
if not ip_src_range and not ip_dst_range:
return None
- vm = [STLVmFixIpv4(offset = "IP")]
+ # until the feature of offsets will be fixed for PCAP use hard coded offsets
+
+ vm = []
if ip_src_range:
vm += [STLVmFlowVar(name="src", min_value = ip_src_range['start'], max_value = ip_src_range['end'], size = 4, op = "inc"),
- STLVmWrFlowVar(fv_name="src",pkt_offset= "IP.src")
+ #STLVmWrFlowVar(fv_name="src",pkt_offset= "IP.src")
+ STLVmWrFlowVar(fv_name="src",pkt_offset = 26)
]
if ip_dst_range:
vm += [STLVmFlowVar(name="dst", min_value = ip_dst_range['start'], max_value = ip_dst_range['end'], size = 4, op = "inc"),
- STLVmWrFlowVar(fv_name="dst",pkt_offset= "IP.dst")
+
+ #STLVmWrFlowVar(fv_name="dst",pkt_offset= "IP.dst")
+ STLVmWrFlowVar(fv_name="dst",pkt_offset = 30)
]
+ vm += [#STLVmFixIpv4(offset = "IP")
+ STLVmFixIpv4(offset = 14)
+ ]
+
return vm
def get_streams (self,
ipg_usec = 10.0,
- loop_count = 1,
+ loop_count = 5,
ip_src_range = None,
ip_dst_range = {'start' : '10.0.0.1', 'end': '10.0.0.254'}):
diff --git a/scripts/stl/sample.pcap b/scripts/stl/sample.pcap
index 2cb9d893..c4598a33 100644
--- a/scripts/stl/sample.pcap
+++ b/scripts/stl/sample.pcap
Binary files differ