Telnet Class Reference

#include <Telnet.h>

Inherits Object.

Inheritance diagram for Telnet:

Inheritance graph
[legend]
Collaboration diagram for Telnet:

Collaboration graph
[legend]
List of all members.

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]

Detailed Description

Definition at line 22 of file Telnet.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().


Member Data Documentation

bool Telnet::_isTelnet [private]

Definition at line 48 of file Telnet.h.

Referenced by parse().

bool Telnet::_echo [private]

Definition at line 50 of file Telnet.h.

Referenced by negotiateOptions().

int Telnet::_echoCount [private]

Definition at line 51 of file Telnet.h.

Referenced by negotiateOptions().

bool Telnet::_sga [private]

Definition at line 53 of file Telnet.h.

Referenced by negotiateOptions().

int Telnet::_sgaCount [private]

Definition at line 54 of file Telnet.h.

Referenced by negotiateOptions().

Connection* Telnet::_connection [private]

Definition at line 56 of file Telnet.h.

Referenced by iac(), parse(), and Telnet().

GetLine* Telnet::_gl [private]

Definition at line 57 of file Telnet.h.

Referenced by parse(), and Telnet().

unsigned int Telnet::_screenWidth [private]

Definition at line 58 of file Telnet.h.

Referenced by parse().

unsigned int Telnet::_screenHeight [private]

Definition at line 58 of file Telnet.h.

Referenced by parse().

char Telnet::_termName[TELNET_LIMIT_TERM_NAME_SIZE] [private]

Definition at line 59 of file Telnet.h.

Referenced by parse().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:14:02 2007 for Pylon Application Platform by  doxygen 1.5.1