summaryrefslogtreecommitdiffstats
path: root/src/stateless/trex_stream_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/trex_stream_api.h')
-rw-r--r--src/stateless/trex_stream_api.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/stateless/trex_stream_api.h b/src/stateless/trex_stream_api.h
index 97e0b7f7..c9248999 100644
--- a/src/stateless/trex_stream_api.h
+++ b/src/stateless/trex_stream_api.h
@@ -35,6 +35,7 @@ class TrexRpcCmdAddStream;
class TrexStream {
/* provide the RPC parser a way to access private fields */
friend class TrexRpcCmdAddStream;
+ friend class TrexRpcCmdGetStream;
friend class TrexStreamTable;
public:
@@ -53,7 +54,7 @@ private:
/* config fields */
double m_isg_usec;
- uint32_t m_next_stream_id;
+ int m_next_stream_id;
/* indicators */
bool m_enabled;
@@ -87,6 +88,11 @@ class TrexStreamContinuous : public TrexStream {
public:
TrexStreamContinuous(uint8_t port_id, uint32_t stream_id, uint32_t pps) : TrexStream(port_id, stream_id), m_pps(pps) {
}
+
+ uint32_t get_pps() {
+ return m_pps;
+ }
+
protected:
uint32_t m_pps;
};
@@ -171,6 +177,12 @@ public:
*/
void get_stream_list(std::vector<uint32_t> &stream_list);
+ /**
+ * get the table size
+ *
+ */
+ int size();
+
private:
/**
* holds all the stream in a hash table by stream id