#include <Telnet.h>
Inherits Object.
Inheritance diagram for Telnet:


Public Member Functions | |
| Telnet (Connection *conn, GetLine *gl) | |
| virtual | ~Telnet () |
| int | iac (unsigned char command, unsigned char option1, unsigned char option2=0, unsigned char option3=0, unsigned char option4=0, unsigned char option5=0) |
| int | parse (int *readCnt) |
Static Public Member Functions | |
| static int | iac (Connection *conn, unsigned char command, unsigned char option1, unsigned char option2=0, unsigned char option3=0, unsigned char option4=0, unsigned char option5=0) |
| static int | setEcho (Connection *conn, const bool on=true) |
Private Member Functions | |
| int | negotiateOptions (const uint8_t cmd, const uint8_t opt) |
Private Attributes | |
| bool | _isTelnet |
| bool | _echo |
| int | _echoCount |
| bool | _sga |
| int | _sgaCount |
| Connection * | _connection |
| GetLine * | _gl |
| unsigned int | _screenWidth |
| unsigned int | _screenHeight |
| char | _termName [TELNET_LIMIT_TERM_NAME_SIZE] |
Definition at line 22 of file Telnet.h.
| Telnet::Telnet | ( | Connection * | conn, | |
| GetLine * | gl | |||
| ) |
Definition at line 19 of file Telnet.cpp.
References _connection, _gl, ERROR, Support::failure(), and MSG_NULL_POINTER.
| Telnet::~Telnet | ( | ) | [virtual] |
Definition at line 29 of file Telnet.cpp.
| int Telnet::iac | ( | unsigned char | command, | |
| unsigned char | option1, | |||
| unsigned char | option2 = 0, |
|||
| unsigned char | option3 = 0, |
|||
| unsigned char | option4 = 0, |
|||
| unsigned char | option5 = 0 | |||
| ) |
Definition at line 33 of file Telnet.cpp.
References _connection, ERROR_BACKTRACE(), FAILED(), and OK.
Referenced by negotiateOptions(), setEcho(), and FSh::start().
| int Telnet::iac | ( | Connection * | conn, | |
| unsigned char | command, | |||
| unsigned char | option1, | |||
| unsigned char | option2 = 0, |
|||
| unsigned char | option3 = 0, |
|||
| unsigned char | option4 = 0, |
|||
| unsigned char | option5 = 0 | |||
| ) | [static] |
Definition at line 44 of file Telnet.cpp.
References ERROR, ERROR_BACKTRACE(), FAILED(), MSG_SOCKET_CANNOT_WRITE, OK, and Connection::write().
| int Telnet::parse | ( | int * | readCnt | ) |
Definition at line 83 of file Telnet.cpp.
References _connection, _gl, _isTelnet, _screenHeight, _screenWidth, _termName, DEBUG, ERROR, ERROR_BACKTRACE(), ERROR_TELNET_INVALID_COMMAND, ERROR_TELNET_INVALID_OPTION, FAILED(), negotiateOptions(), OK, Connection::read(), GetLine::setWidth(), and TELNET_LIMIT_TERM_NAME_SIZE.
| int Telnet::setEcho | ( | Connection * | conn, | |
| const bool | on = true | |||
| ) | [static] |
Definition at line 201 of file Telnet.cpp.
References ERROR_BACKTRACE(), FAILED(), iac(), and OK.
Referenced by Inetd::authorize().
| int Telnet::negotiateOptions | ( | const uint8_t | cmd, | |
| const uint8_t | opt | |||
| ) | [private] |
Definition at line 213 of file Telnet.cpp.
References _echo, _echoCount, _sga, _sgaCount, DEBUG, ERROR_BACKTRACE(), FAILED(), iac(), and OK.
Referenced by parse().
bool Telnet::_isTelnet [private] |
bool Telnet::_echo [private] |
int Telnet::_echoCount [private] |
bool Telnet::_sga [private] |
int Telnet::_sgaCount [private] |
Connection* Telnet::_connection [private] |
GetLine* Telnet::_gl [private] |
unsigned int Telnet::_screenWidth [private] |
unsigned int Telnet::_screenHeight [private] |
char Telnet::_termName[TELNET_LIMIT_TERM_NAME_SIZE] [private] |
1.5.1