8 #ifndef COFDESCSTATS_H_
9 #define COFDESCSTATS_H_ 1
11 #include "rofl/common/cmemory.h"
12 #include "rofl/common/openflow/openflow.h"
13 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
26 std::string serial_num;
38 uint8_t of_version = rofl::openflow::OFP_VERSION_UNKNOWN,
39 std::string
const& mfr_desc = std::string(
""),
40 std::string
const& hw_desc = std::string(
""),
41 std::string
const& sw_desc = std::string(
""),
42 std::string
const& serial_num = std::string(
""),
43 std::string
const& dp_desc = std::string(
""));
84 set_version(uint8_t of_version);
116 get_serial_num()
const;
128 pack(uint8_t *buf,
size_t buflen)
const;
134 unpack(uint8_t *buf,
size_t buflen);
140 switch (reply.get_version()) {
141 case rofl::openflow::OFP_VERSION_UNKNOWN: {
142 os <<
indent(0) <<
"<cofdesc_stats_reply ofp-version:" << (int)reply.get_version() <<
" >" << std::endl;
145 case rofl::openflow10::OFP_VERSION: {
146 os <<
indent(0) <<
"<cofdesc_stats_reply ofp-version:" << (int)reply.get_version() <<
" >" << std::endl;
147 os <<
indent(2) <<
"<mfr-desc: " << reply.mfr_desc <<
" >" << std::endl;
148 os <<
indent(2) <<
"<hw-desc: " << reply.hw_desc <<
" >" << std::endl;
149 os <<
indent(2) <<
"<sw-desc: " << reply.sw_desc <<
" >" << std::endl;
150 os <<
indent(2) <<
"<serial-num: " << reply.serial_num <<
" >" << std::endl;
151 os <<
indent(2) <<
"<dp-desc: " << reply.dp_desc <<
" >" << std::endl;
154 case rofl::openflow12::OFP_VERSION:
155 case rofl::openflow13::OFP_VERSION: {
156 os <<
indent(0) <<
"<cofdesc_stats_reply ofp-version:" << (int)reply.get_version() <<
" >" << std::endl;
157 os <<
indent(2) <<
"<mfr-desc: " << reply.mfr_desc <<
" >" << std::endl;
158 os <<
indent(2) <<
"<hw-desc: " << reply.hw_desc <<
" >" << std::endl;
159 os <<
indent(2) <<
"<sw-desc: " << reply.sw_desc <<
" >" << std::endl;
160 os <<
indent(2) <<
"<serial-num: " << reply.serial_num <<
" >" << std::endl;
161 os <<
indent(2) <<
"<dp-desc: " << reply.dp_desc <<
" >" << std::endl;
Definition: croflexception.h:73
Definition: cofdescstats.h:18