21 size_t lastPositionOffset;
24 bool isDataField(uint8_t* pos)
const;
26 bool isCommandField(uint8_t* pos)
const;
28 size_t distanceToNextIAC(uint8_t* startPos,
size_t maxLength);
30 size_t getFieldLen(uint8_t* startPos,
size_t maxLength);
32 uint8_t* getNextDataField(uint8_t* pos,
size_t len);
34 uint8_t* getNextCommandField(uint8_t* pos,
size_t len);
36 int16_t getSubCommand(uint8_t* pos,
size_t len);
38 uint8_t* getCommandData(uint8_t* pos,
size_t& slen);
232 lastPositionOffset = SIZE_MAX;
328 return data && dataSize;
Definition: TelnetLayer.h:18
void computeCalculateFields() override
Does nothing for this layer.
Definition: TelnetLayer.h:346
TelnetOption getOption(TelnetCommand command)
static std::string getTelnetOptionAsString(TelnetOption val)
static bool isDataValid(const uint8_t *data, size_t dataSize)
Definition: TelnetLayer.h:326
uint8_t * getOptionData(size_t &length)
TelnetCommand getNextCommand()
static std::string getTelnetCommandAsString(TelnetCommand val)
std::string toString() const override
OsiModelLayer getOsiModelLayer() const override
Definition: TelnetLayer.h:352
static bool isTelnetPort(uint16_t port)
Definition: TelnetLayer.h:315
size_t getTotalNumberOfCommands()
TelnetLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: TelnetLayer.h:229
TelnetCommand
Definition: TelnetLayer.h:45
@ TelnetCommandEndOfPacket
Indicator to parser reached end of packet.
@ NoOperation
Null command; does nothing.
@ InterruptProcess
Tells the recipient to interrupt, abort, suspend or terminate the process currently in use.
@ DataMark
Used to mark the end of a sequence of data that the recipient should scan for urgent Telnet commands.
@ GoAhead
Used in Telnet half-duplex mode to signal the other device that it may transmit.
@ EndOfRecordCommand
End of Record.
@ Suspend
Suspend current process.
@ Break
Represents the pressing of the “break” or “attention” key on the terminal.
uint8_t * getOptionData(TelnetCommand command, size_t &length)
TelnetOption
Definition: TelnetLayer.h:106
@ Telnet3270Regime
Telnet 3270 Regime RFC1041 https://www.iana.org/go/rfc1041.
@ ExtendedOptions
Extended option list.
@ SuppressGoAhead
Suppress Go Ahead RFC858 https://www.iana.org/go/rfc858.
@ Logout
Logout RFC727 https://www.iana.org/go/rfc727.
@ NewEnvironmentOption
New Environment Option RFC1572 https://www.iana.org/go/rfc1572.
@ ExtendedASCII
Extended ASCII RFC698 https://www.iana.org/go/rfc698.
@ OutputHorizontalTabDisposition
NAOHTD, Negotiate About Output Horizontal Tab Disposition RFC654 https://www.iana....
@ XDisplayLocation
X Display Location RFC1096 https://www.iana.org/go/rfc1096.
@ OutputMarking
OUTMRK, Output Marking RFC933 https://www.iana.org/go/rfc933.
@ RemoteFlowControl
Remote Flow Control RFC1372 https://www.iana.org/go/rfc1372.
@ TelOptPragmaHeartbeat
Telnet Option Pragma Heartbeat.
@ ByteMacro
BM, Byte Macro RFC735 https://www.iana.org/go/rfc735.
@ ForwardX
Forward X Server.
@ Linemode
Line Mode RFC1184 https://www.iana.org/go/rfc1184.
@ TelnetStartTLS
Telnet Start TLS.
@ OutputVerticalTabStops
NAOVTS, Negotiate About Vertical Tabstops RFC656 https://www.iana.org/go/rfc656.
@ TACACSUserIdentification
TUID, TACACS User Identification RFC927 https://www.iana.org/go/rfc927.
@ EncryptionOption
Encryption Option RFC2946 https://www.iana.org/go/rfc2946.
@ EnvironmentOption
Environment Option RFC1408 https://www.iana.org/go/rfc1408.
@ OutputPageSize
Output Page Size.
@ RemoteControlledTransAndEcho
RCTE, Remote Controlled Transmission and Echo RFC726 https://www.iana.org/go/rfc726.
@ TerminalType
Terminal Type RFC1091 https://www.iana.org/go/rfc1091.
@ TelOptSSPILogon
Telnet Option SSPI Logon.
@ OutputVerticalTabDisposition
NAOVTD, Negotiate About Output Vertcial Tab Disposition RFC657 https://www.iana.org/go/rfc657.
@ TerminalLocationNumber
TTYLOC, Terminal Location Number RFC946 https://www.iana.org/go/rfc946.
@ EndOfRecordOption
End of record RFC885 https://www.iana.org/go/rfc885.
@ X3Pad
X.3 PAD RFC1053 https://www.iana.org/go/rfc1053.
@ Kermit
Kermit RFC2840 https://www.iana.org/go/rfc2840.
@ AuthenticationOption
Authentication Option RFC2941 https://www.iana.org/go/rfc2941.
@ TelOptPragmaLogon
Telnet Option Pragma Logon.
@ OutputHorizontalTabStops
NAOHTS, Negotiate About Output Horizontal Tabstops RFC653 https://www.iana.org/go/rfc653.
@ TN3270E
TN3270E RFC2355 https://www.iana.org/go/rfc2355.
@ TelnetRemoteSerialPort
RSP, Telnet Remote Serial Port.
@ TelnetOptionNoOption
Internal return for no option detected.
@ OutputLineWidth
Output Line Width.
@ DataEntryTerminal
Data Entry Terminal RFC1043 - RFC732 https://www.iana.org/go/rfc1043 https://www.iana....
@ SUPDUP
SUPDUP RFC736 - RFC734 https://www.iana.org/go/rfc736 https://www.iana.org/go/rfc734.
@ OutputCarriageReturnDisposition
NAOCRD, Negotiate About Output Carriage-Return Disposition RFC652 https://www.iana....
@ TransmitBinary
Binary Transmission RFC856 https://www.iana.org/go/rfc856.
@ SUPDUPOutput
SUPDUP Output RFC749 https://www.iana.org/go/rfc749.
@ TelnetSuppressLocalEcho
Telnet Suppress Local Echo.
@ Echo
Echo RFC857 https://www.iana.org/go/rfc857.
@ XAuth
X Server Authentication.
@ SendLocation
Send Location RFC779 https://www.iana.org/go/rfc779.
@ Reconnection
Reconnection.
@ OutputFormfeedDisposition
NAOFFD, Negotiate About Output Formfeed Disposition RFC655 https://www.iana.org/go/rfc655.
@ TerminalSpeed
Terminal Speed RFC1079 https://www.iana.org/go/rfc1079.
@ ComPortControlOption
Com Port Control Option RFC2217 https://www.iana.org/go/rfc2217.
@ Status
Status RFC859 https://www.iana.org/go/rfc859.
@ ApproxMsgSizeNegotiation
Negotiate approximate message size.
@ NegotiateAboutWindowSize
NAWS, Negotiate About Window Size RFC1073 https://www.iana.org/go/rfc1073.
@ OutputLinefeedDisposition
NAOLFD, Negotiate About Output Linefeed Disposition RFC658 https://www.iana.org/go/rfc658.
@ Charset
Charset RFC2066 https://www.iana.org/go/rfc2066.
@ TimingMark
Timing Mark RFC860 https://www.iana.org/go/rfc860.
void parseNextLayer() override
Parses the next layer. Telnet is the always last so does nothing for this layer.
Definition: TelnetLayer.h:334
TelnetCommand getFirstCommand()
size_t getNumberOfCommands(TelnetCommand command)
std::string getDataAsString(bool removeEscapeCharacters=true)
size_t getHeaderLen() const override
Definition: TelnetLayer.h:340
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:364
@ OsiModelApplicationLayer
Definition: ProtocolType.h:378
const ProtocolType Telnet
Definition: ProtocolType.h:268