Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-343

Telnet client: Support Client-initiated Subnegotiation Messages

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 3.0
    • Telnet
    • None

    Description

      I am in the process of trying to implement a Java client for RFC 2217, which is the protocol for accessing serial ports over TCP. Unfortunately, the commons-net telnet client is insufficient for this relatively simple task.

      There are two missing features in the commons-net telnet client code, one of which is a show stopper and the other of which would be a "real nice to have". This issue documents the first problem:

      RFC 2217 specifies that serial port events (such as server notifiying about a change in carrier detect, or the client instructing the server to change the baud rate) are delivered to the peer by subnegotiations. For example, to notify the client about carrier detect, the server sends IAC SB COM-PORT-OPTION NOTIFY-MODEMSTATE <value> IAC SE to the client; to set the serial port baud rate, the client sends IAC SB COM-PORT-OPTION SET-BAUD <value(4)> IAC SE to the server. These messages can happen at any time and are not associated with any WILL/WONT/DO/DONT negotiation (according to my understanding).

      The problem is that while one can receive such messages via TelnetOptionHandler.answerSubnegotiation(), the TelnetClient class doesn't provide any way to send (i.e., intiate) these messages.

      What's needed here is simply to expose Telnet._sendSubnegotiation() (properly renamed, etc.) as a public method.

      I'm going to attempt to come up with a patch and will attach it here if successful.

      Attachments

        1. patch1.txt
          1 kB
          Archie Cobbs
        2. combined_NET-343_NET-344_NET-345_patch.txt
          12 kB
          Archie Cobbs

        Activity

          People

            Unassigned Unassigned
            archie172 Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: