Ethereal-dev: [Ethereal-dev] Adding COM Port Control Telnet Option (RFC-2217)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: David Yon <yon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Apr 2003 14:47:09 -0400

I've developed a modified packet_telnet.c that does two things:

	- Parses Telnet Option 44 (COM Port Control, RFC-2217)
	- Fixes a bug in Sub-Option parsing

The first is self-evident---we have need for easily decoding packet traces which use RFC-2217, and it didn't take me too long to add the appropriate dissector given I have implemented 2217 parsers for production equipment.

The 2nd is a bit of a corner-case. The section of code that determines the end of a Sub-Option block was not accounting for the fact that a sub-option block may contain an escaped IAC (0xFF) byte within it. Instead, telnet_sub_option() was chopping the sub-option block at the first IAC it finds. This has been corrected to skip over escaped IAC's (0xFF 0xFF) when searching for the end of the block.

Attached is the "diff -u" output of packet_telnet.c from a fresh CVS pull. If there are any questions or problems, please don't hestitate to email.

Enjoy!

  

Attachment: packet_telnet.diff
Description: Binary data