summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-02-11 09:31:45 -0500
committerimarom <imarom@cisco.com>2016-02-11 09:32:25 -0500
commit96e96afa83a47268000194ddf75ec2323e336d18 (patch)
treebd07ecebc4402524a3443f389616519fc1f179d1 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
parent53cb5b1f7340e72374eb30c6b5e495c63776ecd9 (diff)
fixed 'streams' command that was broken because of my big commit
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
index de96350a..0b90d3e1 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
@@ -700,10 +700,15 @@ class CScapyTRexPktBuilder(CTrexPktBuilderInterface):
"""
pkt_buf = self._get_pkt_as_str()
+ return self.pkt_layers_desc_from_buffer(pkt_buf)
+
+ @staticmethod
+ def pkt_layers_desc_from_buffer (pkt_buf):
scapy_pkt = Ether(pkt_buf);
pkt_utl = CTRexScapyPktUtl(scapy_pkt);
return pkt_utl.get_pkt_layers()
+
def set_pkt_as_str (self, pkt_buffer):
assert type(pkt_buffer)==str, "pkt_buffer should be string"
self.pkt_raw = pkt_buffer