Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
cofmsg_table_features_stats.h
1 /*
2  * cofmsg_table_stats.h
3  *
4  * Created on: 18.03.2013
5  * Author: andi
6  */
7 
8 #ifndef COFMSG_TABLE_FEATURES_H_
9 #define COFMSG_TABLE_FEATURES_H_ 1
10 
11 #include <map>
12 
13 #include "rofl/common/openflow/messages/cofmsg_stats.h"
14 #include "rofl/common/openflow/coftables.h"
15 
16 namespace rofl {
17 namespace openflow {
18 
24 {
25 protected:
26 
28 
29  union {
30  uint8_t* ofhu_generic;
31  struct rofl::openflow13::ofp_table_features* ofhu_table_features;
32  } ofh_ofhu;
33 
34 #define ofh_generic ofh_ofhu.ofhu_generic
35 #define ofh_table_features ofh_ofhu.ofhu_table_features
36 
37 public:
38 
39 
44  uint8_t of_version = rofl::openflow::OFP_VERSION_UNKNOWN,
45  uint32_t xid = 0,
46  uint16_t stats_flags = 0,
48 
49 
55 
56 
61  operator= (
63 
64 
68  virtual
70 
71 
76 
77 
81  virtual void
82  reset();
83 
84 
88  virtual uint8_t*
89  resize(size_t len);
90 
91 
95  virtual size_t
96  length() const;
97 
98 
102  virtual void
103  pack(uint8_t *buf = (uint8_t*)0, size_t buflen = 0);
104 
105 
109  virtual void
110  unpack(uint8_t *buf, size_t buflen);
111 
112 
115  virtual void
116  validate();
117 
118 public:
119 
124  get_tables() const { return tables; };
125 
130  set_tables() { return tables; };
131 
132 
133 public:
134 
135  friend std::ostream&
136  operator<< (std::ostream& os, cofmsg_table_features_stats_request const& msg) {
137  os << dynamic_cast<cofmsg_stats_request const&>( msg );
138  os << indent(2) << "<cofmsg_table_features_request >" << std::endl;
139  indent i(4); os << msg.tables;
140  return os;
141  };
142 
143  std::string
144  str() const {
145  std::stringstream ss;
146  ss << "-Table-Features-Stats-Request- " << cofmsg::str() << " ";
147  return ss.str();
148  };
149 };
150 
151 
152 
153 
154 
155 
156 
157 
162  public cofmsg_stats_reply
163 {
164 protected:
165 
167 
168  union {
169  uint8_t* ofhu_generic;
170  struct rofl::openflow13::ofp_table_features* ofhu_table_features;
171  } ofh_ofhu;
172 
173 #define ofh_generic ofh_ofhu.ofhu_generic
174 #define ofh_table_features ofh_ofhu.ofhu_table_features
175 
176 public:
177 
178 
183  uint8_t of_version = rofl::openflow::OFP_VERSION_UNKNOWN,
184  uint32_t xid = 0,
185  uint16_t stats_flags = 0,
187 
188 
194 
195 
200  operator= (
202 
203 
207  virtual
209 
210 
215 
216 
220  virtual void
221  reset();
222 
223 
227  virtual uint8_t*
228  resize(size_t len);
229 
230 
234  virtual size_t
235  length() const;
236 
237 
241  virtual void
242  pack(uint8_t *buf = (uint8_t*)0, size_t buflen = 0);
243 
244 
248  virtual void
249  unpack(uint8_t *buf, size_t buflen);
250 
251 
254  virtual void
255  validate();
256 
257 public:
258 
263  get_tables() const { return tables; };
264 
269  set_tables() { return tables; };
270 
271 
272 public:
273 
274  friend std::ostream&
275  operator<< (std::ostream& os, cofmsg_table_features_stats_reply const& msg) {
276  os << dynamic_cast<cofmsg_stats_reply const&>( msg );
277  os << indent(2) << "<cofmsg_table_features_reply >" << std::endl;
278  indent i(4); os << msg.tables;
279  return os;
280  };
281 
282  std::string
283  str() const {
284  std::stringstream ss;
285  ss << "-Table-Features-Stats-Reply- " << cofmsg::str() << " ";
286  return ss.str();
287  };
288 };
289 
290 } // end of namespace openflow
291 } // end of namespace rofl
292 
293 #endif /* COFMSG_TABLE_STATS_H_ */
virtual void unpack(uint8_t *buf, size_t buflen)
Definition: cofmsg_table_features_stats.cc:135
Definition: cofmsg_stats.h:264
cofmsg_table_features_stats_reply(uint8_t of_version=rofl::openflow::OFP_VERSION_UNKNOWN, uint32_t xid=0, uint16_t stats_flags=0, rofl::openflow::coftables const tables=rofl::openflow::coftables())
Definition: cofmsg_table_features_stats.cc:169
virtual void reset()
Definition: cofmsg_table_features_stats.cc:70
Definition: openflow13.h:1274
virtual void unpack(uint8_t *buf, size_t buflen)
Definition: cofmsg_table_features_stats.cc:301
Definition: cofmsg_table_features_stats.h:22
Definition: cofmsg_stats.h:187
Definition: cofmsg_table_features_stats.h:161
virtual ~cofmsg_table_features_stats_reply()
Definition: cofmsg_table_features_stats.cc:226
virtual ~cofmsg_table_features_stats_request()
Definition: cofmsg_table_features_stats.cc:62
Definition: coftables.h:27
virtual void pack(uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
Definition: cofmsg_table_features_stats.cc:109
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
virtual void validate()
Definition: cofmsg_table_features_stats.cc:311
virtual void validate()
Definition: cofmsg_table_features_stats.cc:145
cofmsg_table_features_stats_request(uint8_t of_version=rofl::openflow::OFP_VERSION_UNKNOWN, uint32_t xid=0, uint16_t stats_flags=0, rofl::openflow::coftables const &tables=rofl::openflow::coftables())
Definition: cofmsg_table_features_stats.cc:5
Definition: logging.h:76
virtual size_t length() const
Definition: cofmsg_table_features_stats.cc:95
virtual void pack(uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
Definition: cofmsg_table_features_stats.cc:273
virtual void reset()
Definition: cofmsg_table_features_stats.cc:234
virtual size_t length() const
Definition: cofmsg_table_features_stats.cc:259