From b22e3ed1570f5c36e012022b75d6d025c8cc44d5 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 16 Feb 2017 11:38:23 +0200 Subject: tx_capture - code review Signed-off-by: imarom --- src/stateless/dp/trex_stateless_dp_core.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp') diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index 56184aeb..b6aa15be 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -27,11 +27,16 @@ limitations under the License. #include "trex_streams_compiler.h" #include "mbuf.h" - -class DPCoreWrapper : public CVirtualIF { +/** + * a wrapper for service mode + * it will move the fast send_node virtual call + * to send_node_service_mode which does capturing + * + */ +class ServiceModeWrapper : public CVirtualIF { public: - - DPCoreWrapper() { + + ServiceModeWrapper() { m_wrapped = nullptr; } @@ -644,7 +649,7 @@ TrexStatelessDpCore::TrexStatelessDpCore() { m_core = NULL; m_duration = -1; m_is_service_mode = NULL; - m_wrapper = new DPCoreWrapper(); + m_wrapper = new ServiceModeWrapper(); } TrexStatelessDpCore::~TrexStatelessDpCore() { -- cgit 1.2.3-korg