]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
HA-SC effort.
authorEd Borgoyn <eborgoyn@cisco.com>
Tue, 12 Apr 2016 19:58:55 +0000 (15:58 -0400)
committerEd Borgoyn <eborgoyn@cisco.com>
Wed, 20 Apr 2016 19:59:57 +0000 (15:59 -0400)
src/flow/ha.cc
src/flow/ha.h
src/flow/ha_module.cc
src/side_channel/Makefile.am
src/stream/udp/udp_session.h

index 5f133dfcccd40d4686886d32391816a1eea3498d..62c544752bc77d778748f58ea15179eb4928aa1d 100644 (file)
@@ -111,12 +111,12 @@ bool FlowHAState::check(uint8_t state_mask)
 
 bool FlowHAState::is_critical()
 {
-    return ((state & CRITICAL) != 0);
+    return ((state & critical) != 0);
 }
 
 bool FlowHAState::is_major()
 {
-    return ((state & MAJOR) != 0);
+    return ((state & major) != 0);
 }
 
 void FlowHAState::config_lifetime(struct timeval min_lifetime)
index 658bb701db1891cc5bab1ebfd35f0ea78d46bbd2..d31329a56f59352698dc7c060aaefd17fde8994a 100644 (file)
@@ -46,12 +46,18 @@ enum HAEvent
     HA_UPDATE_EVENT = 2
 };
 
+enum HAEvent
+{
+    ha_delete_event = 1,
+    ha_update_event = 2
+};
+
 // Each active flow will have an associated FlowHAState instance.
 class FlowHAState
 {
 public:
-    static const uint8_t CRITICAL = 0x20;
-    static const uint8_t MAJOR = 0x10;
+    static const uint8_t critical = 0x20;
+    static const uint8_t major = 0x10;
 
     static const uint8_t CREATED = 0x01;
     static const uint8_t MODIFIED = 0x02;
index e498dc7d51ea6f145b7fbdac2a960ef5382147fe..0d363c7c7eef7ae8faeccb0570236a4585bae301 100644 (file)
@@ -89,7 +89,6 @@ bool HighAvailabilityModule::set(const char* fqn, Value& v, SnortConfig*)
             config.ports = new PortBitSet;
         v.get_bits(*(config.ports) );
     }
-
     else
         return false;
 
index 8916fb13cc811d3fd00244e22ef0313a7b0e1a69..129df6cf92855fbfca472b8d332aa9c7fbc9959e 100644 (file)
@@ -11,3 +11,7 @@ if BUILD_UNIT_TESTS
 SUBDIRS = test
 endif
 
+if BUILD_UNIT_TESTS
+SUBDIRS = test
+endif
+
index b19dd24a44dbc292814085e6df9acc2f9158b9b4..7f1befb959eaf60a1f8d095e2ab204ef2af54540 100644 (file)
 #define UDP_SESSION_H
 
 #include <sys/time.h>
-#include "flow/ha.h"
 #include "flow/session.h"
 
-class UdpHAClient : public FlowHAClient
-{
-};
-
 class UdpSession : public Session
 {
 public: