diff options
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.py | 5 |
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 |