diff options
Diffstat (limited to 'scripts/stl/pcap_with_vm.py')
-rw-r--r-- | scripts/stl/pcap_with_vm.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py index a073f959..6531a129 100644 --- a/scripts/stl/pcap_with_vm.py +++ b/scripts/stl/pcap_with_vm.py @@ -29,14 +29,17 @@ class STLPcap(object): return vm - def get_streams (self, - ipg_usec = 10.0, - loop_count = 5, - ip_src_range = None, - ip_dst_range = {'start' : '10.0.0.1', 'end': '10.0.0.254'}): + def get_streams (self, direction = 0, **kwargs): + + ip_src_range = kwargs.get('ip_src_range', None) + ip_dst_range = kwargs.get('up_dst_range', {'start' : '10.0.0.1', 'end': '10.0.0.254'}) vm = self.create_vm(ip_src_range, ip_dst_range) - profile = STLProfile.load_pcap(self.pcap_file, ipg_usec = ipg_usec, loop_count = loop_count, vm = vm) + + profile = STLProfile.load_pcap(self.pcap_file, + ipg_usec = kwargs.get('ipg_usec', 10.0), + loop_count = kwargs.get('loop_count', 5), + vm = vm) return profile.get_streams() |