diff options
author | 2016-02-18 16:49:24 +0200 | |
---|---|---|
committer | 2016-02-18 16:49:24 +0200 | |
commit | 8b12867a012f56b92bd3a3797aa2e554c0b71bef (patch) | |
tree | a740c0f3cbeedfe525126e0bbde1d7f8203198f0 /scripts/stl/pcap_with_vm.py | |
parent | 2c9504ac710b7ae9021601b8947069d922040a34 (diff) | |
parent | d650f106869eef15b7c347f8e49896dc9a572c3c (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'scripts/stl/pcap_with_vm.py')
-rw-r--r-- | scripts/stl/pcap_with_vm.py | 17 |
1 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'}): |