15 #include "rofl/common/logging.h"
16 #include "rofl/common/croflexception.h"
17 #include "rofl/common/openflow/openflow.h"
18 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
27 uint64_t generation_id;
34 uint64_t generation_id;
42 distance(int64_t rcvd_gen_id, int64_t cached_gen_id);
50 uint8_t ofp_version = rofl::openflow::OFP_VERSION_UNKNOWN);
89 pack(uint8_t *buf,
size_t buflen);
95 unpack(uint8_t *buf,
size_t buflen);
103 get_version()
const {
return ofp_version; };
109 set_version(uint8_t ofp_version) { this->ofp_version = ofp_version; };
115 get_role()
const {
return role; };
121 set_role(uint32_t role) { this->role = role; };
127 set_role() {
return role; };
133 get_generation_id()
const {
return generation_id; };
139 set_generation_id(uint64_t generation_id) { this->generation_id = generation_id; };
145 set_generation_id() {
return generation_id; };
153 operator<< (std::ostream& os, cofrole
const& role) {
154 os <<
rofl::indent(0) <<
"<cofrole ofp-version:" << (int)role.get_version() <<
" >" << std::endl;
156 os <<
rofl::indent(2) <<
"<role: 0x" << (
unsigned int)role.get_role() <<
" >" << std::endl;
157 os <<
rofl::indent(2) <<
"<generation-id: 0x" << (
unsigned long long)role.get_generation_id() <<
" >" << std::endl;