8 #ifndef COFQUEUESTATS_H_
9 #define COFQUEUESTATS_H_ 1
11 #include "rofl/common/cmemory.h"
12 #include "rofl/common/openflow/openflow.h"
13 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
38 uint8_t of_version = 0);
73 pack(uint8_t *buf,
size_t buflen)
const;
79 unpack(uint8_t *buf,
size_t buflen);
96 set_version(uint8_t of_version) { this->of_version = of_version; };
103 get_version()
const {
return of_version; };
110 get_port_no()
const {
return port_no; };
117 get_queue_id()
const {
return queue_id; };
124 set_port_no(uint32_t port_no) { this->port_no = port_no; };
131 set_queue_id(uint32_t queue_id) { this->queue_id = queue_id; };
137 os <<
indent(0) <<
"<cofqueue_stats_request >" << std::endl;
138 os <<
indent(2) <<
"<port-no: 0x" << std::hex << (int)r.get_port_no() << std::dec <<
" >" << std::endl;
139 os <<
indent(2) <<
"<queue-id: " << (int)r.get_queue_id() <<
" >" << std::endl;
156 uint32_t duration_sec;
157 uint32_t duration_nsec;
167 uint8_t of_version = 0);
179 uint32_t duration_sec,
180 uint32_t duration_nsec);
214 pack(uint8_t *buf,
size_t buflen)
const;
220 unpack(uint8_t *buf,
size_t buflen);
237 set_version(uint8_t of_version) { this->of_version = of_version; };
244 get_version()
const {
return of_version; };
251 get_port_no()
const {
return port_no; };
257 get_queue_id()
const {
return queue_id; };
263 get_tx_bytes()
const {
return tx_bytes; };
269 get_tx_packets()
const {
return tx_packets; };
275 get_tx_errors()
const {
return tx_errors; };
281 get_duration_sec()
const {
return duration_sec; };
287 get_duration_nsec()
const {
return duration_nsec; };
293 set_port_no(uint32_t port_no) { this->port_no = port_no; };
299 set_queue_id(uint32_t queue_id) { this->queue_id = queue_id; };
305 set_tx_bytes(uint64_t tx_bytes) { this->tx_bytes = tx_bytes; };
311 set_tx_packets(uint64_t tx_packets) { this->tx_packets = tx_packets; };
317 set_tx_errors(uint64_t tx_errors) { this->tx_errors = tx_errors; };
323 set_duration_sec(uint32_t duration_sec) { this->duration_sec = duration_sec; };
329 set_duration_nsec(uint32_t duration_nsec) { this->duration_nsec = duration_nsec; };
335 os <<
indent(0) <<
"<cofqueue_stats_reply >" << std::endl;
337 os <<
indent(2) <<
"<port-no: 0x" << (int)r.get_port_no() <<
" >" << std::endl;
338 os <<
indent(2) <<
"<queue-id: 0x" << (int)r.get_queue_id() <<
" >" << std::endl;
339 os <<
indent(2) <<
"<tx-packets: 0x" << (
unsigned long long)r.get_tx_packets() <<
" >" << std::endl;
340 os <<
indent(2) <<
"<tx-bytes: 0x" << (
unsigned long long)r.get_tx_bytes() <<
" >" << std::endl;
341 os <<
indent(2) <<
"<tx-errors: 0x" << (
unsigned long long)r.get_tx_errors() <<
" >" << std::endl;
343 switch (r.get_version()) {
344 case rofl::openflow13::OFP_VERSION: {
345 os <<
indent(2) <<
"<duration-sec: " << (
unsigned long long)r.get_duration_sec() <<
" >" << std::endl;
346 os <<
indent(2) <<
"<duration-nsec: " << (
unsigned long long)r.get_duration_nsec() <<
" >" << std::endl;
Definition: cofqueuestats.h:146
Definition: cofqueuestats.h:20
Definition: cofqueuestats.h:19
Definition: cofqueuestats.h:18
Definition: cofqueuestats.h:22
Definition: croflexception.h:27