libfluid
The ONF OpenFlow driver
OFServerSettings.hh
1 
2 #ifndef __OFSERVERSETTINGS_HH__
3 #define __OFSERVERSETTINGS_HH__
4 
5 #include <stdint.h>
6 
7 namespace fluid_base {
8 
9 #define ECHO_XID 0x0F
10 #define HELLO_XID 0x0F
11 
12 class OFServer;
13 
19 public:
34 
46  OFServerSettings& supported_version(const uint8_t version);
47 
51  uint32_t* supported_versions();
52 
56  uint8_t max_supported_version();
57 
66 
70  int echo_interval();
71 
79 
83  bool liveness_check();
84 
92 
96  bool handshake();
97 
106 
110  bool dispatch_all_messages();
111 
121 
125  bool use_hello_elements();
126 
139 
144  bool keep_data_ownership();
145 
146  private:
147  friend class OFServer;
148 
149  uint32_t _supported_versions;
150  uint8_t _max_supported_version;
151 
152  bool version_set_by_hand;
153  void add_version(const uint8_t version);
154 
155  int _echo_interval;
156  bool _liveness_check;
157  bool _handshake;
158  bool _dispatch_all_messages;
159  bool _use_hello_elements;
160  bool _keep_data_ownership;
161 };
162 
163 }
164 
165 #endif