8 #ifndef COFMSG_GROUP_MOD_H_
9 #define COFMSG_GROUP_MOD_H_ 1
11 #include "rofl/common/openflow/messages/cofmsg.h"
12 #include "rofl/common/openflow/cofbuckets.h"
13 #include "rofl/common/openflow/cofgroupmod.h"
29 uint8_t* ofhu_group_mod;
34 #define ofh_group_mod ofhu.ofhu_group_mod
35 #define ofh12_group_mod ofhu.ofhu12_group_mod
36 #define ofh13_group_mod ofhu.ofhu13_group_mod
54 uint8_t of_version = 0,
57 uint8_t group_type = 0,
58 uint32_t group_id = 0,
115 pack(uint8_t *buf = (uint8_t*)0,
size_t buflen = 0);
122 unpack(uint8_t *buf,
size_t buflen);
135 check_prerequisites()
const;
151 set_command(uint16_t command);
157 get_group_type()
const;
163 set_group_type(uint8_t group_type);
169 get_group_id()
const;
175 set_group_id(uint32_t group_id);
181 get_buckets() {
return buckets; };
187 os <<
rofl::indent(0) <<
"<cofmsg_group_mod >" << std::endl;
188 {
rofl::indent i(2); os << dynamic_cast<const cofmsg&>( msg ); };
189 switch (msg.get_command()) {
190 case rofl::openflow12::OFPGC_ADD: {
191 os <<
indent(4) <<
"<command: -ADD- >" << std::endl;
193 case rofl::openflow12::OFPGC_MODIFY: {
194 os <<
indent(4) <<
"<command: -MODIFY- >" << std::endl;
196 case rofl::openflow12::OFPGC_DELETE: {
197 os <<
indent(4) <<
"<command: -DELETE- >" << std::endl;
200 os <<
indent(4) <<
"<command: -UNKNOWN- >" << std::endl;
203 os <<
indent(4) <<
"<group-type:" << (int)msg.get_group_type() <<
" >" << std::endl;
204 os <<
indent(4) <<
"<group-id:" << (int)msg.get_group_id() <<
" >" << std::endl;
virtual void unpack(uint8_t *buf, size_t buflen)
Definition: cofmsg_group_mod.cc:186
Definition: cofmsg_group_mod.h:21
Definition: cofgroupmod.h:24
virtual void validate()
Definition: cofmsg_group_mod.cc:196
virtual size_t length() const
Definition: cofmsg_group_mod.cc:137
virtual void pack(uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
Definition: cofmsg_group_mod.cc:155
Definition: openflow13.h:859
virtual void reset()
Definition: cofmsg_group_mod.cc:121
Definition: cofbuckets.h:28
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
virtual ~cofmsg_group_mod()
Definition: cofmsg_group_mod.cc:113
Definition: openflow12.h:1000