Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
cofmsg_port_desc_stats.h
1 /*
2  * cofmsg_port_desc_stats.h
3  *
4  * Created on: 18.03.2013
5  * Author: andi
6  */
7 
8 #ifndef COFMSG_PORT_DESC_STATS_H_
9 #define COFMSG_PORT_DESC_STATS_H_ 1
10 
11 #include <vector>
12 
13 #include "rofl/common/openflow/messages/cofmsg_stats.h"
14 #include "rofl/common/openflow/cofports.h"
15 
16 namespace rofl {
17 namespace openflow {
18 
24 {
25 private:
26 
27 public:
28 
29 
34  uint8_t of_version = 0,
35  uint32_t xid = 0,
36  uint16_t flags = 0);
37 
38 
43  cofmsg_port_desc_stats_request const& stats);
44 
45 
50  operator= (
51  cofmsg_port_desc_stats_request const& stats);
52 
53 
57  virtual
59 
60 
65 
66 
70  virtual void
71  reset();
72 
73 
77  virtual uint8_t*
78  resize(size_t len);
79 
80 
84  virtual size_t
85  length() const;
86 
87 
91  virtual void
92  pack(uint8_t *buf = (uint8_t*)0, size_t buflen = 0);
93 
94 
98  virtual void
99  unpack(uint8_t *buf, size_t buflen);
100 
101 
104  virtual void
105  validate();
106 
107 public:
108 
109  friend std::ostream&
110  operator<< (std::ostream& os, cofmsg_port_desc_stats_request const& msg) {
111  os << dynamic_cast<cofmsg const&>( msg );
112  os << indent(2) << "<cofmsg_port_desc_stats_request >" << std::endl;
113  return os;
114  };
115 };
116 
117 
118 
119 
124  public cofmsg_stats_reply
125 {
126 private:
127 
129 
130  union {
131  uint8_t *ofhu_pds_reply;
132  struct openflow13::ofp_multipart_reply *ofhu13_pds_reply;
133  } ofhu;
134 
135 #define ofh_pds_reply ofhu.ofhu_pds_reply
136 #define ofh13_pds_reply ofhu.ofhu13_pds_reply
137 
138 public:
139 
140 
145  uint8_t of_version = 0,
146  uint32_t xid = 0,
147  uint16_t flags = 0,
149 
150 
155  cofmsg_port_desc_stats_reply const& stats);
156 
157 
162  operator= (
163  cofmsg_port_desc_stats_reply const& stats);
164 
165 
169  virtual
171 
172 
177 
178 
182  virtual void
183  reset();
184 
185 
189  virtual uint8_t*
190  resize(size_t len);
191 
192 
196  virtual size_t
197  length() const;
198 
199 
203  virtual void
204  pack(uint8_t *buf = (uint8_t*)0, size_t buflen = 0);
205 
206 
210  virtual void
211  unpack(uint8_t *buf, size_t buflen);
212 
213 
216  virtual void
217  validate();
218 
219 
220 public:
221 
222 
227  set_ports() { return ports; };
228 
233  get_ports() const { return ports; };
234 
235 
236 public:
237 
238  friend std::ostream&
239  operator<< (std::ostream& os, cofmsg_port_desc_stats_reply const& msg) {
240  os << dynamic_cast<cofmsg const&>( msg );
241  os << indent(2) << "<cofmsg_port_desc_stats_reply >" << std::endl;
242  indent i(4);
243  os << msg.ports;
244  return os;
245  };
246 };
247 
248 } // end of namespace openflow
249 } // end of namespace rofl
250 
251 #endif /* COFMSG_PORT_DESC_STATS_H_ */
cofmsg_port_desc_stats_reply(uint8_t of_version=0, uint32_t xid=0, uint16_t flags=0, rofl::openflow::cofports const &ports=rofl::openflow::cofports())
Definition: cofmsg_port_desc_stats.cc:148
Definition: openflow13.h:1035
virtual void unpack(uint8_t *buf, size_t buflen)
Definition: cofmsg_port_desc_stats.cc:120
virtual void reset()
Definition: cofmsg_port_desc_stats.cc:223
Definition: cofmsg_stats.h:264
Definition: cofmsg_port_desc_stats.h:22
virtual ~cofmsg_port_desc_stats_reply()
Definition: cofmsg_port_desc_stats.cc:215
virtual void pack(uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
Definition: cofmsg_port_desc_stats.cc:97
virtual size_t length() const
Definition: cofmsg_port_desc_stats.cc:82
virtual void unpack(uint8_t *buf, size_t buflen)
Definition: cofmsg_port_desc_stats.cc:280
virtual void validate()
Definition: cofmsg_port_desc_stats.cc:290
Definition: cofmsg_stats.h:187
cofmsg_port_desc_stats_request(uint8_t of_version=0, uint32_t xid=0, uint16_t flags=0)
Definition: cofmsg_port_desc_stats.cc:5
Definition: cofmsg_port_desc_stats.h:123
virtual void pack(uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
Definition: cofmsg_port_desc_stats.cc:254
virtual void validate()
Definition: cofmsg_port_desc_stats.cc:130
virtual ~cofmsg_port_desc_stats_request()
Definition: cofmsg_port_desc_stats.cc:58
Definition: cofports.h:22
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
virtual size_t length() const
Definition: cofmsg_port_desc_stats.cc:239
Definition: logging.h:76
virtual void reset()
Definition: cofmsg_port_desc_stats.cc:66