#include <net/DSPNetStack.h>
Classes | |
struct | tsTelnetConn |
struct | _tsTelnetdParams |
class | tcTelnetd |
Typedefs | |
typedef int(* | tfTelnetConnect )(tsTelnetConn *telnetconn) |
typedef int(* | tfTelnetChkUser )(tsTelnetConn *telnetconn, const char *user) |
typedef int(* | tfTelnetChkPswd )(tsTelnetConn *telnetconn, const char *pswd) |
typedef void(* | tfTelnetClose )(tsTelnetConn *telnetconn) |
typedef int(* | tfTelnetInChar )(tsTelnetConn *telnetconn, char c) |
typedef bool(* | tfTelnetHandleOption )(tsTelnetConn *telnetconn, unsigned char cmd, unsigned char opt) |
typedef bool(* | tfTelnetHandleCmd )(tsTelnetConn *telnetconn, unsigned char cmd) |
typedef bool(* | tfTelnetHandleSubNeg )(tsTelnetConn *telnetconn, unsigned char *NegStream, int StreamLen) |
typedef struct _tsTelnetdParams | tsTelnetdParams |
Variables | |
const int | TELNET_SOCKET_CLOSE_ERR = -1 |
const int | TELNET_MAX_USERNAME_LEN = 30 |
const int | TELNET_MAX_PASSWORD_LEN = 30 |
const unsigned char | TELNET_CMD_IAC = 255 |
const unsigned char | TELNET_CMD_SE = 240 |
const unsigned char | TELNET_CMD_NOP = 241 |
const unsigned char | TELNET_CMD_DATAMARK = 242 |
const unsigned char | TELNET_CMD_BREAK = 243 |
const unsigned char | TELNET_CMD_IP = 244 |
const unsigned char | TELNET_CMD_AO = 245 |
const unsigned char | TELNET_CMD_AYT = 246 |
const unsigned char | TELNET_CMD_EC = 247 |
const unsigned char | TELNET_CMD_EL = 248 |
const unsigned char | TELNET_CMD_GA = 249 |
const unsigned char | TELNET_CMD_SB = 250 |
const unsigned char | TELNET_CMD_WILL = 251 |
const unsigned char | TELNET_CMD_WONT = 252 |
const unsigned char | TELNET_CMD_DO = 253 |
const unsigned char | TELNET_CMD_DONT = 254 |
const unsigned char | TELNET_OPTION_ECHO = 1 |
const unsigned char | TELNET_OPTION_SUPPRESSGA = 3 |
const unsigned char | TELNET_OPTION_AUTHENTICATION = 37 |
typedef int(* tfTelnetConnect)(tsTelnetConn *telnetconn) |
This application supplied callback function is called each time a telnet client connects to the telnet server. This function MUST be specified in tsTelnetdParams::connect_func field passed to tcTelnetd::run().
telnetconn | The connection structure for the new connection. Typically your application would set the tsTelnetConn::user2 field during execution of this callback if you have application specific data which you will reference in the future. |
typedef int(* tfTelnetChkUser)(tsTelnetConn *telnetconn, const char *user) |
This application supplied callback function is called each time a telnet client enters a username during connection login. This function may optionally be specified in tsTelnetdParams::chk_user_func field passed to tcTelnetd::run(). If the tsTelnetdParams::chk_user_func field is set to NULL, then no user name verification will be performed.
telnetconn | The connection structure for the connection. |
user | The user name from the telnet client. |
typedef int(* tfTelnetChkPswd)(tsTelnetConn *telnetconn, const char *pswd) |
This application supplied callback function is called each time a telnet client enters a password during connection login. This function may optionally be specified in tsTelnetdParams::chk_pswd_func field passed to tcTelnetd::run(). If the tsTelnetdParams::chk_pswd_func field is set to NULL, then no password verification will be performed.
telnetconn | The connection structure for the connection. |
password | The password from the telnet client. |
typedef void(* tfTelnetClose)(tsTelnetConn *telnetconn) |
This application supplied callback function is called each time a telnet connection is closed. This function may optionally be specified in tsTelnetdParams::close_func field passed to tcTelnetd::run(). If the tsTelnetdParams::close_func field is set to NULL, then no close notification will be generated.
telnetconn | The connection structure for the connection. |
typedef int(* tfTelnetInChar)(tsTelnetConn *telnetconn, char c) |
This application supplied callback function is called each time a telnet client sends a character. This function MUST be specified in tsTelnetdParams::in_char_func field passed to tcTelnetd::run().
telnetconn | The connection structure for the connection. |
typedef bool(* tfTelnetHandleOption)(tsTelnetConn *telnetconn, unsigned char cmd, unsigned char opt) |
This application supplied callback function is called whenever an RFC 854 Option Request is received.
telnetconn | The connection structure for the connection. |
cmd | command option (WILL, WONT, DO, DONT) |
option | code requested |
typedef bool(* tfTelnetHandleCmd)(tsTelnetConn *telnetconn, unsigned char cmd) |
This application supplied callback function is called whenever an RFC 854 Command is received
telnetconn | The connection structure for the connection. |
cmd | command (NOP, DM, BRK, IP, AO, AYT, EC, EL, GA) |
typedef bool(* tfTelnetHandleSubNeg)(tsTelnetConn *telnetconn, unsigned char *NegStream, int StreamLen) |
This application supplied callback function is called whenever an RFC 854 Subnegotiation sequence is received.
telnetconn | The connection structure for the connection. |
NegStream | negotiation stream (without SB or SE character) |
StreamLen | length of negotiation stream |
typedef struct _tsTelnetdParams tsTelnetdParams |
This structure specifies the application callback functions which the telnet server will call during execution. You will also specify the tsTelnetConn::user1 parameter which you may access during callback function execution.
const int TELNET_SOCKET_CLOSE_ERR = -1 |
Error returned when a connection is closed
const int TELNET_MAX_USERNAME_LEN = 30 |
Maximum length of a user name.
const int TELNET_MAX_PASSWORD_LEN = 30 |
Maximum length of a password.
const unsigned char TELNET_CMD_IAC = 255 |
Interpret as Command
const unsigned char TELNET_CMD_SE = 240 |
end of subnegotiation parameters
const unsigned char TELNET_CMD_NOP = 241 |
no operation
const unsigned char TELNET_CMD_DATAMARK = 242 |
Data Stream Portion of a Sync.
const unsigned char TELNET_CMD_BREAK = 243 |
NVT character BRK
const unsigned char TELNET_CMD_IP = 244 |
Interrupt Process
const unsigned char TELNET_CMD_AO = 245 |
Abort Output
const unsigned char TELNET_CMD_AYT = 246 |
Are you there?
const unsigned char TELNET_CMD_EC = 247 |
Ethernet Character
const unsigned char TELNET_CMD_EL = 248 |
Erase Line
const unsigned char TELNET_CMD_GA = 249 |
Go Ahead
const unsigned char TELNET_CMD_SB = 250 |
Subnegotiation parameters begin
const unsigned char TELNET_CMD_WILL = 251 |
Desire to begin, or confirmation that now performing option
const unsigned char TELNET_CMD_WONT = 252 |
refusal to perform option
const unsigned char TELNET_CMD_DO = 253 |
request remote side to perform, or confirm expectation of performing option
const unsigned char TELNET_CMD_DONT = 254 |
request side to stop performing option
const unsigned char TELNET_OPTION_ECHO = 1 |
telnet option parameter, local echo, RFC857
const unsigned char TELNET_OPTION_SUPPRESSGA = 3 |
telnet option parameter, suppress go-ahead, RFC858
const unsigned char TELNET_OPTION_AUTHENTICATION = 37 |