diff options
Diffstat (limited to 'src/stateless/cp')
-rw-r--r-- | src/stateless/cp/trex_api_class.h | 2 | ||||
-rw-r--r-- | src/stateless/cp/trex_stateless.cpp | 2 | ||||
-rw-r--r-- | src/stateless/cp/trex_stateless_port.cpp | 5 | ||||
-rw-r--r-- | src/stateless/cp/trex_stateless_port.h | 15 |
4 files changed, 22 insertions, 2 deletions
diff --git a/src/stateless/cp/trex_api_class.h b/src/stateless/cp/trex_api_class.h index 748d1478..a4c4bb65 100644 --- a/src/stateless/cp/trex_api_class.h +++ b/src/stateless/cp/trex_api_class.h @@ -82,7 +82,7 @@ public: } std::string get_server_ver() { - return ver(m_major, m_major); + return ver(m_major, m_minor); } std::string & verify_api(int major, int minor) { diff --git a/src/stateless/cp/trex_stateless.cpp b/src/stateless/cp/trex_stateless.cpp index 6ab9b417..b42391f5 100644 --- a/src/stateless/cp/trex_stateless.cpp +++ b/src/stateless/cp/trex_stateless.cpp @@ -56,7 +56,7 @@ TrexStateless::TrexStateless(const TrexStatelessCfg &cfg) { /* API core version */ const int API_VER_MAJOR = 3; - const int API_VER_MINOR = 0; + const int API_VER_MINOR = 1; m_api_classes[APIClass::API_CLASS_TYPE_CORE].init(APIClass::API_CLASS_TYPE_CORE, API_VER_MAJOR, API_VER_MINOR); diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp index b88ac715..b0366fb5 100644 --- a/src/stateless/cp/trex_stateless_port.cpp +++ b/src/stateless/cp/trex_stateless_port.cpp @@ -916,6 +916,11 @@ TrexStatelessPort::get_pci_info(std::string &pci_addr, int &numa_node) { } void +TrexStatelessPort::get_hw_mac(std::string &hw_mac) { + utl_macaddr_to_str(m_api_info.hw_macaddr, hw_mac); +} + +void TrexStatelessPort::add_stream(TrexStream *stream) { verify_state(PORT_STATE_IDLE | PORT_STATE_STREAMS, "add_stream"); diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h index 4b8ea3d9..296e0d05 100644 --- a/src/stateless/cp/trex_stateless_port.h +++ b/src/stateless/cp/trex_stateless_port.h @@ -388,6 +388,21 @@ public: void get_pci_info(std::string &pci_addr, int &numa_node); + void get_hw_mac(std::string &hw_mac); + + + /** + * enable RX capture on port + * + */ + void start_rx_capture(const std::string &pcap_filename, uint64_t limit); + + /** + * disable RX capture if on + * + */ + void stop_rx_capture(); + /** * start RX queueing of packets * |