6 #define COFGROUPMOD_H_ 1
11 #include "rofl/common/cmemory.h"
12 #include "rofl/common/caddress.h"
13 #include "rofl/common/croflexception.h"
14 #include "rofl/common/openflow/cofmatch.h"
15 #include "rofl/common/openflow/cofbuckets.h"
16 #include "rofl/common/openflow/cofinstruction.h"
36 #define grp_mod ofgm_gmu.gmu_grp_mod
37 #define of12_grp_mod ofgm_gmu.gmu12_grp_mod
38 #define of13_grp_mod ofgm_gmu.gmu13_grp_mod
120 get_group_id()
const;
134 set_buckets() {
return buckets; };
140 get_buckets()
const {
return buckets; };
145 operator<< (std::ostream& os,
cofgroupmod const& ge) {
146 os <<
"<cgroupentry ";
148 switch (ge.ofp_version) {
149 case openflow12::OFP_VERSION: {
150 switch (ge.get_command()) {
151 case openflow12::OFPGC_ADD: os <<
"ADD ";
break;
152 case openflow12::OFPGC_MODIFY: os <<
"MODIFY ";
break;
153 case openflow12::OFPGC_DELETE: os <<
"DELETE ";
break;
154 default: os <<
"UNKNOWN ";
break;
157 switch (ge.get_type()) {
158 case openflow12::OFPGT_ALL: os <<
"ALL ";
break;
159 case openflow12::OFPGT_SELECT: os <<
"SELECT ";
break;
160 case openflow12::OFPGT_INDIRECT:os <<
"INDIRECT ";
break;
161 case openflow12::OFPGT_FF: os <<
"FAST-FAILOVER";
break;
162 default: os <<
"UNKNOWN";
break;
165 case openflow13::OFP_VERSION: {
166 switch (ge.get_command()) {
167 case openflow13::OFPGC_ADD: os <<
"ADD ";
break;
168 case openflow13::OFPGC_MODIFY: os <<
"MODIFY ";
break;
169 case openflow13::OFPGC_DELETE: os <<
"DELETE ";
break;
170 default: os <<
"UNKNOWN ";
break;
173 switch (ge.get_type()) {
174 case openflow13::OFPGT_ALL: os <<
"ALL ";
break;
175 case openflow13::OFPGT_SELECT: os <<
"SELECT ";
break;
176 case openflow13::OFPGT_INDIRECT:os <<
"INDIRECT ";
break;
177 case openflow13::OFPGT_FF: os <<
"FAST-FAILOVER";
break;
178 default: os <<
"UNKNOWN";
break;
184 os <<
"group-id:" << (int)ge.get_group_id() <<
" >" << std::endl;
185 os <<
indent(2) <<
"<buckets: >" << std::endl;
Definition: croflexception.h:73
Definition: cofgroupmod.h:24
void clear()
reset instance
Definition: cofgroupmod.cc:58
Definition: openflow13.h:859
Definition: cofbuckets.h:28
Definition: cofgroupmod.h:22
virtual ~cofgroupmod()
destructor
Definition: cofgroupmod.cc:35
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
cofgroupmod & operator=(const cofgroupmod &fe)
assignment operator
Definition: cofgroupmod.cc:42
Definition: cofgroupmod.h:21
cofgroupmod(uint8_t ofp_version)
constructor
Definition: cofgroupmod.cc:10
Definition: openflow12.h:1000
Definition: croflexception.h:27