21#include <basictypes.h>
24#if defined(NB_SSH_SUPPORTED)
37#define CMD_AUTH_FAIL (3)
38#define CMD_TO_MANY_FDS (4)
39#define CMD_FAILED_SSH_KEY_GEN (5)
68#if defined(NB_SSH_SUPPORTED)
98extern int (*
CmdCmd_func)(
const char *command, FILE *fRespondto,
void *pData);
116extern int (*
CmdChar_func)(
char command, FILE *fRespondto,
void *pData);
131extern void *(*CmdConnect_func)(FILE *fRespondto);
150#define CMD_DIS_CAUSE_TIMEOUT (1)
151#define CMD_DIS_CAUSE_CLOSED (2)
152#define CMD_DIS_SOCKET_CLOSED (3)
153#define CMD_DIS_AUTH_FAILED (4)
186void CmdStopCommandProcessor();
200int CmdAddCommandFd(
int fd,
bool require_auth,
bool time_out_conn,
bool local_echo =
true);
236#if defined(NB_SSH_SUPPORTED)
272#if defined(NB_SSH_SUPPORTED)
291void SendToAll(
const char *buffer,
int len,
bool include_serial_ports);
NetBurner User Authorization Manager.
ListenOn
The various remote channels that the command processor can listen to.
Definition command.h:50
@ eListenOnTcp
Listen on TCP.
Definition command.h:51
@ eListenOnSsh
Listen on SSH.
Definition command.h:52
int(* CmdCmd_func)(const char *command, FILE *fRespondto, void *pData)
The command processing callback function for handling string commands.
const char * Cmdlogin_prompt
If this is defined, then it will be sent to the socket on connection before Authentication is tried.
int CmdListenQuietOnSshPort(uint16_t port, int max_connections)
Start listening for a connection over SSH, but without the siggnon or password.
void(* CmdPrompt_func)(FILE *fRespondto, void *pData)
Prompt callback function. If this function is not NULL, then the system will call this function every...
int(* CmdAuthenticateSshFunc)(const char *name, const char *authVal, AuthType authType)
External Authentication function CALLBACK for SSH connections, used to verify username and password....
int CmdAddCommandFd(int fd, bool require_auth, bool time_out_conn, bool local_echo=true)
Add an established FD connection to the list of fd's managed by the command processor.
int CmdStartCommandProcessor(int priority)
Start the command processor.
int CmdStopListeningOnSshPort(uint16_t port)
Stop Listening for connections on the specified port. Also closes all open connections that were base...
void(* CmdDisConnect_func)(FILE *fRespondto, int cause, void *pData)
Dis-Connect callback function, if this function is not NULL then the system will call this function e...
int CmdStopListeningOnTcpPort(uint16_t port)
Stop Listening for connections on the specified port. Also closes all open connections that were base...
int CmdRemoveCommandFd(int fd)
Remove an established FD (either a TCP session, a serial connection, or an SSH session).
int CmdListenOnSshPort(uint16_t port, int max_connections)
Start listening for a connection over SSH.
int(* CmdChar_func)(char command, FILE *fRespondto, void *pData)
The command processing callback function for handling single character commands. If this is implement...
int(* CmdAuthenticateFunc)(const char *name, const char *passwd)
External Authentication function CALLBACK for TCP connections, used to verify username and password....
void SendToAll(const char *buffer, int len, bool include_serial_ports)
Send a message to all connected sockets, excluding "Listening sockets".
int CmdListenQuietOnTcpPort(uint16_t port, int do_telnet_processing, int max_connections)
Start listening for a connection over TCP, but without the siggnon or password.
int CmdListenOnTcpPort(uint16_t port, int do_telnet_processing, int max_connections)
Start listening for a connection over TCP.
AuthType
The types of authorization requests that are managed. These just indicate what the has value is,...
Definition UserAuthManager.h:44