8 #ifndef COFQUEUEPROP_H_
9 #define COFQUEUEPROP_H_ 1
15 #include "../endian_conversion.h"
18 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
19 #include "rofl/common/cmemory.h"
20 #include "rofl/common/croflexception.h"
21 #include "rofl/common/openflow/openflow.h"
37 uint8_t of_version = openflow::OFP_VERSION_UNKNOWN,
38 uint16_t property = 0) :
39 ofp_version(of_version),
69 ofp_version = qp.ofp_version;
70 property = qp.property;
92 uint8_t *buf,
size_t buflen);
100 uint8_t *buf,
size_t buflen);
109 get_version()
const {
return ofp_version; };
115 set_version(uint8_t ofp_version) { this->ofp_version = ofp_version; };
121 get_property()
const {
return property; };
129 uint16_t property) { this->
property = property; };
136 get_length()
const {
return len; };
143 set_length(uint16_t len) { this->len = len; };
153 <<
"version: " << (int)prop.get_version() <<
" "
155 <<
"property: 0x" << (int)prop.get_property() <<
" "
157 <<
"length: " << (int)prop.get_length() <<
" "
167 mutable uint16_t len;
179 uint8_t ofp_version = rofl::openflow::OFP_VERSION_UNKNOWN,
180 uint16_t min_rate = OFPQ_MIN_RATE_UNCFG) :
181 cofqueue_prop(ofp_version, rofl::openflow13::OFPQT_MIN_RATE),
182 min_rate(min_rate) {};
206 cofqueue_prop::operator= (prop);
207 min_rate = prop.min_rate;
224 uint8_t *buf,
size_t buflen);
232 uint8_t *buf,
size_t buflen);
242 get_min_rate()
const {
return min_rate; };
249 set_min_rate(uint16_t min_rate) { this->min_rate = min_rate; };
255 os <<
rofl::indent(0) <<
"<cofqueue_prop_min_rate version: " << (
unsigned int)prop.get_version() <<
" >" << std::endl;
256 {
rofl::indent i(2); os << dynamic_cast<const cofqueue_prop&>( prop ); }
257 os <<
rofl::indent(4) <<
"<min-rate: 0x" << std::hex << (
unsigned int)prop.get_min_rate() << std::dec <<
" >" << std::endl;
275 uint8_t ofp_version = rofl::openflow::OFP_VERSION_UNKNOWN,
276 uint16_t max_rate = OFPQ_MAX_RATE_UNCFG) :
277 cofqueue_prop(ofp_version, rofl::openflow13::OFPQT_MAX_RATE),
278 max_rate(max_rate) {};
302 cofqueue_prop::operator= (prop);
303 max_rate = prop.max_rate;
320 uint8_t *buf,
size_t buflen);
328 uint8_t *buf,
size_t buflen);
338 get_max_rate()
const {
return max_rate; };
345 set_max_rate(uint16_t max_rate) { this->max_rate = max_rate; };
351 os <<
rofl::indent(0) <<
"<cofqueue_prop_max_rate version: " << (
unsigned int)prop.get_version() <<
" >" << std::endl;
352 {
rofl::indent i(2); os << dynamic_cast<const cofqueue_prop&>( prop ); }
353 os <<
rofl::indent(4) <<
"<max-rate: 0x" << std::hex << (
unsigned int)prop.get_max_rate() << std::dec <<
" >" << std::endl;
371 uint8_t ofp_version = rofl::openflow::OFP_VERSION_UNKNOWN,
374 cofqueue_prop(ofp_version, rofl::openflow13::OFPQT_EXPERIMENTER),
376 exp_body(exp_body) {};
400 cofqueue_prop::operator= (prop);
401 exp_id = prop.exp_id;
402 exp_body = prop.exp_body;
419 uint8_t *buf,
size_t buflen);
427 uint8_t *buf,
size_t buflen);
437 get_exp_id()
const {
return exp_id; };
444 set_exp_id(uint32_t exp_id) { this->exp_id = exp_id; };
450 get_exp_body()
const {
return exp_body; };
456 set_exp_body() {
return exp_body; };
462 os <<
rofl::indent(0) <<
"<cofqueue_prop_experimenter version: " << (
unsigned int)prop.get_version() <<
" >" << std::endl;
463 {
rofl::indent i(2); os << dynamic_cast<const cofqueue_prop&>( prop ); }
464 os <<
rofl::indent(4) <<
"<exp-id: 0x" << std::hex << (
unsigned int)prop.get_exp_id() <<
" >" << std::dec << std::endl;
Definition: cofqueueprop.h:30
Definition: cofqueueprop.h:172
Definition: cofqueueprop.h:27
Definition: cofqueueprop.h:268
Definition: cofqueueprop.h:26
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
Definition: cofqueueprop.h:364
Definition: croflexception.h:27