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.
// 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
}
}
-std::vector<ControlConn*>& ControlMgmt::get_controls()
-{
- return controls;
-}
-
void ControlMgmt::delete_controls()
{
for ( auto control : controls )
// 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
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();
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:
// 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