summaryrefslogtreecommitdiffstats
path: root/src/stateless/trex_stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/trex_stream.cpp')
-rw-r--r--src/stateless/trex_stream.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/stateless/trex_stream.cpp b/src/stateless/trex_stream.cpp
index 1465b1ba..b3919770 100644
--- a/src/stateless/trex_stream.cpp
+++ b/src/stateless/trex_stream.cpp
@@ -32,16 +32,16 @@ TrexStream::TrexStream(uint8_t port_id, uint32_t stream_id) : m_port_id(port_id)
m_enabled = false;
m_self_start = false;
- m_pkt = NULL;
- m_pkt_len = 0;
+ m_pkt.binary = NULL;
+ m_pkt.len = 0;
m_rx_check.m_enable = false;
}
TrexStream::~TrexStream() {
- if (m_pkt) {
- delete [] m_pkt;
+ if (m_pkt.binary) {
+ delete [] m_pkt.binary;
}
}
@@ -91,3 +91,11 @@ TrexStream * TrexStreamTable::get_stream_by_id(uint32_t stream_id) {
return NULL;
}
}
+
+void TrexStreamTable::get_stream_list(std::vector<uint32_t> &stream_list) {
+ stream_list.clear();
+
+ for (auto stream : m_stream_table) {
+ stream_list.push_back(stream.first);
+ }
+}