diff options
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.h')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.h b/src/stateless/dp/trex_stateless_dp_core.h index bdf84cfd..af2187ae 100644 --- a/src/stateless/dp/trex_stateless_dp_core.h +++ b/src/stateless/dp/trex_stateless_dp_core.h @@ -33,7 +33,7 @@ class CFlowGenListPerThread; class CGenNodeStateless; class TrexStreamsCompiledObj; class TrexStream; - +class CGenNodePCAP; class CDpOneStream { public: @@ -54,7 +54,8 @@ public: enum state_e { ppSTATE_IDLE, ppSTATE_TRANSMITTING, - ppSTATE_PAUSE + ppSTATE_PAUSE, + ppSTATE_PCAP_TX, }; @@ -70,6 +71,12 @@ public: bool update_traffic(uint8_t port_id, double factor); + bool push_pcap(uint8_t port_id, + const std::string &pcap_filename, + double ipg_usec, + double speedup, + uint32_t count); + bool stop_traffic(uint8_t port_id, bool stop_on_id, int event_id); @@ -91,11 +98,11 @@ public: public: state_e m_state; - uint8_t m_port_id; uint32_t m_active_streams; /* how many active streams on this port */ std::vector<CDpOneStream> m_active_nodes; /* holds the current active nodes */ + CGenNodePCAP *m_active_pcap_node; CFlowGenListPerThread * m_core ; int m_event_id; }; @@ -113,6 +120,7 @@ public: enum state_e { STATE_IDLE, STATE_TRANSMITTING, + STATE_PCAP_TX, STATE_TERMINATE }; @@ -151,7 +159,7 @@ public: */ void start_traffic(TrexStreamsCompiledObj *obj, double duration, - int m_event_id); + int event_id); /* pause the streams, work only if all are continues */ @@ -163,6 +171,19 @@ public: /** + * push a PCAP file on port + * + */ + void push_pcap(uint8_t port_id, + int event_id, + const std::string &pcap_filename, + double ipg_usec, + double speedup, + uint32_t count, + double duration); + + + /** * update current traffic rate * * @author imarom (25-Nov-15) |