]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #925 in SNORT/snort3 from control_coverage to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Tue, 27 Jun 2017 18:47:14 +0000 (14:47 -0400)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Tue, 27 Jun 2017 18:47:14 +0000 (14:47 -0400)
Squashed commit of the following:

commit 1f704f85c48153704fc9a8ee4eb36514afbc55fb
Author: Bhagya Tholpady <bbantwal@cisco.com>
Date:   Tue Jun 13 23:43:46 2017 -0400

    documentation updates to control channel code

src/dev_notes.txt
src/main/control.h
src/main/control_mgmt.cc
src/main/control_mgmt.h
src/main/dev_notes.txt
src/main/request.h

index 62f905a883cff26f7b5e68e57db564554e23e9f8..47e88274bf0535fce36edeca40066b0a388b7a99 100644 (file)
@@ -13,8 +13,8 @@ It also does housekeeping functions like servicing signal flags, shell
 commands, etc.
 
 The shell has to be explicitly enabled at build time to be available and
-then must be configured at run time to be activated.  Presently only one
-remote shell at a time is supported.
+then must be configured at run time to be activated. Multiple simultaneous
+remote shells are supported.
 
 Unit test and piglet test harness build options also impact actual
 execution.
index 8828275ca8a5319497ecf12139474a47e21bfc7d..8a27d018d58159595ae282b625872ab39ffec997 100644 (file)
 // with this program; if not, write to the Free Software Foundation, Inc.,
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
+// control.h author Bhagya Tholpady <bbantwal@cisco.com>
+//
+// Header file defining control class used for remote and local connections.
+// Each control class has a request and shell associated with it.
 
 #ifndef CONTROL_H
 #define CONTROL_H
index c91ad0e2654b41385c2b2987129e56472f9d617f..014ab3039f5fbdeac8cb8eb257b9395dccb8d45f 100644 (file)
@@ -89,11 +89,6 @@ void ControlMgmt::reconfigure_controls()
     }
 }
 
-std::vector<ControlConn*>& ControlMgmt::get_controls()
-{
-    return controls;
-}
-
 void ControlMgmt::delete_controls()
 {
     for ( auto control : controls )
index 46e3f5d62699f2b47166692b3436594656e9ab3b..192ef3b9aac58cd0b77de2ebd38a0644c8a831e2 100644 (file)
 // with this program; if not, write to the Free Software Foundation, Inc.,
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
+// control_mgmt.h author Bhagya Tholpady <bbantwal@cisco.com>
+//
+// This provides functions to create and control remote/local connections,
+// socket creation/deletion/management functions, and shell commands used by the analyzer.
 
 #ifndef CONTROL_MGMT_H
 #define CONTROL_MGMT_H
@@ -39,7 +43,6 @@ public:
 
     static bool find_control(int fd, std::vector<ControlConn*>::iterator& control);
     static void delete_control(std::vector<ControlConn*>::iterator& control);
-    static std::vector<ControlConn*>& get_controls();
 
     static int socket_init();
     static int socket_term();
index b2ebdd66a0a1a6dd204aa4317f337b6e6a38962e..aeae057fc6e62e609047389bb8452f197237c6dd 100644 (file)
@@ -28,6 +28,14 @@ will swap in a new configuration at the earliest convenience, and the ROTATE
 command will cause open per-thread output files to be closed, rotated, and
 reopened anew.
 
+On Control connections and management:
+
+Remote control connections can be created using tcp sockets or unix sockets.
+Each control connection (local and/or remote) has a request and shell
+associated with it. The asynchronous control commands within the control
+connection are blocking and control connections are not returned the shell prompt
+until the control commands are completed.
+
 
 Re THREAD_LOCAL defined in thread.h:
 
index eaeb88326f336d6486848f4c18f0fd51e5ac0721..f2630875dee4296af27828977bcc87bc63104ab5 100644 (file)
@@ -16,6 +16,9 @@
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+// This header includes request class which is used by the control connections
+// to read control commands and send responses for those commands.
+
 #ifndef REQUEST_H
 #define REQUEST_H