summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-01-29 17:14:41 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-02 13:42:36 +0200
commit39000f461de6b85877db85488b1cc7f1fad9d359 (patch)
tree8ffa214f3876009bf8778881c63b6c245244ac41 /src/stateless
parent790059069915a700905f4746b22a9a4a6cadc6ad (diff)
ipv6 scan & ping
Change-Id: I4f8112b4c942d149da5ea3f0ee01ac82d7fe32cc Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_api_class.h2
-rw-r--r--src/stateless/cp/trex_stateless.cpp2
-rw-r--r--src/stateless/cp/trex_stateless_port.cpp5
-rw-r--r--src/stateless/cp/trex_stateless_port.h15
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
*