From 39000f461de6b85877db85488b1cc7f1fad9d359 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sun, 29 Jan 2017 17:14:41 +0200 Subject: ipv6 scan & ping Change-Id: I4f8112b4c942d149da5ea3f0ee01ac82d7fe32cc Signed-off-by: Yaroslav Brustinov --- src/stateless/cp/trex_api_class.h | 2 +- src/stateless/cp/trex_stateless.cpp | 2 +- src/stateless/cp/trex_stateless_port.cpp | 5 +++++ src/stateless/cp/trex_stateless_port.h | 15 +++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) (limited to 'src/stateless/cp') 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 @@ -915,6 +915,11 @@ TrexStatelessPort::get_pci_info(std::string &pci_addr, int &numa_node) { numa_node = m_api_info.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) { 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 * -- cgit 1.2.3-korg