Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::TelnetChars Class Reference

A class holding a bunch of telnet character constants. More...

#include <StrMod/TelnetChars.h>

List of all members.

Public Types

typedef lcore::U1Byte U1Byte
enum  Commands {
  C_EOF = TEOF, C_SUSP = SUSP, C_ABORT = ABORT, C_EOR = EOR,
  C_NOP = NOP, C_DM = DM, C_BRK = BRK, C_IP = IP,
  C_AO = AO, C_AYT = AYT, C_EC = EC, C_EL = EL,
  C_GA = GA
}
 An enum of all the telnet single character commands. More...

enum  OptionNegotiations { O_WILL = WILL, O_WONT = WONT, O_DO = DO, O_DONT = DONT }
 An enum of all the different types of option negotiation there are. More...


Static Public Methods

bool convertCharToCommand (U1Byte ch, Commands &cmd)
 Convert a character to an enum value in the Commands enum, if possible.

bool convertCharToOptionNegotiation (U1Byte ch, OptionNegotiations &opt)
 Convert a character to an enum value in the OptionNegotiations enum, if possible.


Static Public Attributes

const U1Byte TEOF = 236U
 End Of File.

const U1Byte SUSP = 237U
 Suspend process.

const U1Byte ABORT = 238U
 Abort process.

const U1Byte EOR = 239U
 End Of Record.

const U1Byte SE = 240U
 Suboption End.

const U1Byte NOP = 241U
 No Operation.

const U1Byte DM = 242U
 Data mark, use with Synch option, requires out-of-band data support.

const U1Byte BRK = 243U
 Break (often a long string of 0 bits in RS232).

const U1Byte IP = 244U
 Interrupt Process.

const U1Byte AO = 245U
 Abort output.

const U1Byte AYT = 246U
 Are You There? Remote side expected to reply with 'Yes'.

const U1Byte EC = 247U
 Erease Character (like backspace).

const U1Byte EL = 248U
 Erase Line.

const U1Byte GA = 249U
 Go Ahead (for half duplex (the default) connections).

const U1Byte SB = 250U
 Suboption Begin.

const U1Byte WILL = 251U
 Sender wants to enable option for itself.

const U1Byte WONT = 252U
 Sender wants to disable option for itself.

const U1Byte DO = 253U
 Sender wants receiver to enable option.

const U1Byte DONT = 254U
 Sender wants receiver to disable option.

const U1Byte IAC = 255U
 Interpret As Command.


Detailed Description

A class holding a bunch of telnet character constants.

Perhaps this class should be a namespace instead.

Definition at line 40 of file TelnetChars.h.


Member Enumeration Documentation

enum strmod::strmod::TelnetChars::Commands
 

An enum of all the telnet single character commands.

This is here so that functions that expect a telnet special character representing a telnet single character command can say that's what they want instead of generically expecting a character and being upset when it doesn't qualify.

These are defined in RFCs 854, 885, and 1184

Enumeration values:
C_EOF  See TEOF.
C_SUSP  See SUSP.
C_ABORT  See ABORT.
C_EOR  See EOR.
C_NOP  See NOP.
C_DM  See DM.
C_BRK  See BRK.
C_IP  See IP.
C_AO  See AO.
C_AYT  See AYT.
C_EC  See EC.
C_EL  See EL.
C_GA  See GA.

Definition at line 74 of file TelnetChars.h.

enum strmod::strmod::TelnetChars::OptionNegotiations
 

An enum of all the different types of option negotiation there are.

This is here so that functions that expect an option negotiation character can say that's what they want instead of generically expecting a character and being upset when it's the wrong one.

The telnet protocol is designed as a peer-to-peer protocol, and so either side can initiate an option negotiation to enable or disable an option for either half (or direction) of the conversation. A request to disable must always be honored, and a refusal to enable must always be honored.

Enumeration values:
O_WILL  Sender wants to enable option for itself.
O_WONT  Sender wants to disable option for itself.
O_DO  Sender wants receiver to enable option.
O_DONT  Sender wants receiver to disable option.

Definition at line 108 of file TelnetChars.h.


Member Function Documentation

bool strmod::strmod::TelnetChars::convertCharToCommand U1Byte    ch,
Commands   cmd
[inline, static]
 

Convert a character to an enum value in the Commands enum, if possible.

Parameters:
ch The character to be converted.
cmd The character's value in the Commands enum if conversion possible, no modification if not.
Returns:
true if conversion successful, false if not.

Definition at line 126 of file TelnetChars.h.

bool strmod::strmod::TelnetChars::convertCharToOptionNegotiation U1Byte    ch,
OptionNegotiations   opt
[inline, static]
 

Convert a character to an enum value in the OptionNegotiations enum, if possible.

Parameters:
ch The character to be converted.
opt The character's value in the OptionNegotiations enum if conversion possible, no modification if not.
Returns:
true if conversion successful, false if not.

Definition at line 139 of file TelnetChars.h.


The documentation for this class was generated from the following file:
Generated on Wed Jan 29 00:32:56 2003 for libNet by doxygen1.3-rc1