8 #ifndef COFTABLEFEATUREPROPS_H_
9 #define COFTABLEFEATUREPROPS_H_
18 #include "rofl/common/openflow/coftablefeatureprop.h"
19 #include "rofl/common/croflexception.h"
20 #include "rofl/common/logging.h"
32 std::map<uint16_t, coftable_feature_prop*> tfprops;
78 pack(uint8_t *buf,
size_t buflen);
84 unpack(uint8_t *buf,
size_t buflen);
92 get_version()
const {
return ofp_version; };
98 set_version(uint8_t ofp_version) { this->ofp_version = ofp_version; };
104 add_tfp_instructions() {
109 set_tfp_instructions() {
114 get_tfp_instructions()
const {
119 drop_tfp_instructions() {
120 drop_tfp(rofl::openflow13::OFPTFPT_INSTRUCTIONS);
124 has_tfp_instructions()
const {
125 return has_tfp(rofl::openflow13::OFPTFPT_INSTRUCTIONS);
132 add_tfp_instructions_miss() {
137 set_tfp_instructions_miss() {
142 get_tfp_instructions_miss()
const {
147 drop_tfp_instructions_miss() {
148 drop_tfp(rofl::openflow13::OFPTFPT_INSTRUCTIONS_MISS);
152 has_tfp_instructions_miss()
const {
153 return has_tfp(rofl::openflow13::OFPTFPT_INSTRUCTIONS_MISS);
162 add_tfp_next_tables() {
167 set_tfp_next_tables() {
172 get_tfp_next_tables()
const {
177 drop_tfp_next_tables() {
178 drop_tfp(rofl::openflow13::OFPTFPT_NEXT_TABLES);
182 has_tfp_next_tables()
const {
183 return has_tfp(rofl::openflow13::OFPTFPT_NEXT_TABLES);
190 add_tfp_next_tables_miss() {
195 set_tfp_next_tables_miss() {
200 get_tfp_next_tables_miss()
const {
205 drop_tfp_next_tables_miss() {
206 drop_tfp(rofl::openflow13::OFPTFPT_NEXT_TABLES_MISS);
210 has_tfp_next_tables_miss()
const {
211 return has_tfp(rofl::openflow13::OFPTFPT_NEXT_TABLES_MISS);
221 add_tfp_write_actions() {
226 set_tfp_write_actions() {
231 get_tfp_write_actions()
const {
236 drop_tfp_write_actions() {
237 drop_tfp(rofl::openflow13::OFPTFPT_WRITE_ACTIONS);
241 has_tfp_write_actions()
const {
242 return has_tfp(rofl::openflow13::OFPTFPT_WRITE_ACTIONS);
249 add_tfp_write_actions_miss() {
254 set_tfp_write_actions_miss() {
259 get_tfp_write_actions_miss()
const {
264 drop_tfp_write_actions_miss() {
265 drop_tfp(rofl::openflow13::OFPTFPT_WRITE_ACTIONS_MISS);
269 has_tfp_write_actions_miss()
const {
270 return has_tfp(rofl::openflow13::OFPTFPT_WRITE_ACTIONS_MISS);
281 add_tfp_apply_actions() {
286 set_tfp_apply_actions() {
291 get_tfp_apply_actions()
const {
296 drop_tfp_apply_actions() {
297 drop_tfp(rofl::openflow13::OFPTFPT_APPLY_ACTIONS);
301 has_tfp_apply_actions()
const {
302 return has_tfp(rofl::openflow13::OFPTFPT_APPLY_ACTIONS);
309 add_tfp_apply_actions_miss() {
314 set_tfp_apply_actions_miss() {
319 get_tfp_apply_actions_miss()
const {
324 drop_tfp_apply_actions_miss() {
325 drop_tfp(rofl::openflow13::OFPTFPT_APPLY_ACTIONS_MISS);
329 has_tfp_apply_actions_miss()
const {
330 return has_tfp(rofl::openflow13::OFPTFPT_APPLY_ACTIONS_MISS);
351 get_tfp_match()
const {
357 drop_tfp(rofl::openflow13::OFPTFPT_MATCH);
361 has_tfp_match()
const {
362 return has_tfp(rofl::openflow13::OFPTFPT_MATCH);
372 add_tfp_wildcards() {
377 set_tfp_wildcards() {
382 get_tfp_wildcards()
const {
387 drop_tfp_wildcards() {
388 drop_tfp(rofl::openflow13::OFPTFPT_WILDCARDS);
392 has_tfp_wildcards()
const {
393 return has_tfp(rofl::openflow13::OFPTFPT_WILDCARDS);
403 add_tfp_write_setfield() {
408 set_tfp_write_setfield() {
413 get_tfp_write_setfield()
const {
418 drop_tfp_write_setfield() {
419 drop_tfp(rofl::openflow13::OFPTFPT_WRITE_SETFIELD);
423 has_tfp_write_setfield()
const {
424 return has_tfp(rofl::openflow13::OFPTFPT_WRITE_SETFIELD);
431 add_tfp_write_setfield_miss() {
436 set_tfp_write_setfield_miss() {
441 get_tfp_write_setfield_miss()
const {
446 drop_tfp_write_setfield_miss() {
447 drop_tfp(rofl::openflow13::OFPTFPT_WRITE_SETFIELD_MISS);
451 has_tfp_write_setfield_miss()
const {
452 return has_tfp(rofl::openflow13::OFPTFPT_WRITE_SETFIELD_MISS);
463 add_tfp_apply_setfield() {
468 set_tfp_apply_setfield() {
473 get_tfp_apply_setfield()
const {
478 drop_tfp_apply_setfield() {
479 drop_tfp(rofl::openflow13::OFPTFPT_APPLY_SETFIELD);
483 has_tfp_apply_setfield()
const {
484 return has_tfp(rofl::openflow13::OFPTFPT_APPLY_SETFIELD);
491 add_tfp_apply_setfield_miss() {
496 set_tfp_apply_setfield_miss() {
501 get_tfp_apply_setfield_miss()
const {
506 drop_tfp_apply_setfield_miss() {
507 drop_tfp(rofl::openflow13::OFPTFPT_APPLY_SETFIELD_MISS);
511 has_tfp_apply_setfield_miss()
const {
512 return has_tfp(rofl::openflow13::OFPTFPT_APPLY_SETFIELD_MISS);
527 add_tfp(
unsigned int type);
530 set_tfp(
unsigned int type);
533 get_tfp(
unsigned int type)
const;
536 drop_tfp(
unsigned int type);
539 has_tfp(
unsigned int type)
const;
545 os <<
indent(0) <<
"<coftable_feature_props ofp-version:" << (int)tfps.get_version() <<
" >" << std::endl;
546 for (std::map<uint16_t, coftable_feature_prop*>::const_iterator
547 it = tfps.tfprops.begin(); it != tfps.tfprops.end(); ++it) {
550 unsigned int type = it->first;
553 case rofl::openflow13::OFPTFPT_INSTRUCTIONS:
554 case rofl::openflow13::OFPTFPT_INSTRUCTIONS_MISS: {
555 os << dynamic_cast<coftable_feature_prop_instructions const&>( *(it->second) );
557 case rofl::openflow13::OFPTFPT_NEXT_TABLES:
558 case rofl::openflow13::OFPTFPT_NEXT_TABLES_MISS: {
559 os << dynamic_cast<coftable_feature_prop_next_tables const&>( *(it->second) );
561 case rofl::openflow13::OFPTFPT_WRITE_ACTIONS:
562 case rofl::openflow13::OFPTFPT_WRITE_ACTIONS_MISS:
563 case rofl::openflow13::OFPTFPT_APPLY_ACTIONS:
564 case rofl::openflow13::OFPTFPT_APPLY_ACTIONS_MISS: {
565 os << dynamic_cast<coftable_feature_prop_actions const&>( *(it->second) );
567 case rofl::openflow13::OFPTFPT_MATCH:
568 case rofl::openflow13::OFPTFPT_WILDCARDS:
569 case rofl::openflow13::OFPTFPT_WRITE_SETFIELD:
570 case rofl::openflow13::OFPTFPT_WRITE_SETFIELD_MISS:
571 case rofl::openflow13::OFPTFPT_APPLY_SETFIELD:
572 case rofl::openflow13::OFPTFPT_APPLY_SETFIELD_MISS: {
573 os << dynamic_cast<coftable_feature_prop_oxm const&>( *(it->second) );
576 os << dynamic_cast<coftable_feature_prop const&>( *(it->second) );
Definition: coftablefeatureprop.h:149
Definition: coftablefeatureprops.h:27
Definition: coftablefeatureprops.h:29
Definition: coftablefeatureprops.h:25
Definition: coftablefeatureprops.h:26
Definition: coftablefeatureprop.h:608
Definition: coftablefeatureprop.h:418
Definition: coftablefeatureprop.h:28
Definition: coftablefeatureprop.h:301
Definition: croflexception.h:27