[DGD] Sending telnet KEEPALIVE packets

Erwin Harte harte at is-here.com
Sat Jul 21 19:43:09 CEST 2007


Kurt Nordstrom wrote:
>>> - Assuming I can send it with the driver, how would I specify this
>>> sequence in LPC?  Is there an escape code for it?
>> DGD cannot send it.  Of course, you're free to modify comm.c to send
>> periodical IAC NOPs; hopefully, not too many clients will crash as a
>> result.
>>
> 
> Ok, so by this do you mean that, even if I open the comm.c to allow the
> IAC NOP to be sent, there's no LPC string that I can send from within DGD
> to represent this?

You have two options, that I can see:

1. Modify comm.c to allow the appropriate character codes through.  This
    potentially opens you up to some mischief by misbehaving coders.

2. Modify comm.c to occasionally loop over the connections and send the IAC
    NOP sequence, while leaving the other restrictions in place.

If you opt for #1, you need to know that IAC is represented by a 255 (the same 
way a space is 32, 'A' is 65, etc) and NOP by 241.  That means that in LPC you 
will send a string like this to the outside connection:

     "\xff\xf1"

Hope that helps,

Erwin.
P.S: See also http://www.ietf.org/rfc/rfc854.txt



More information about the DGD mailing list