From f9fdf4f3de6202b0a2b265828756097d1984683b Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 21 Aug 2013 00:25:51 -0400 Subject: [PATCH] add TELOPT_TSPEED negotiation --- darlene.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/darlene.c b/darlene.c index 59b66c2..0c8c499 100644 --- a/darlene.c +++ b/darlene.c @@ -217,7 +217,18 @@ static int cnt; TCPIPWriteTCP(ipid, msg, sizeof(msg), true, false); } - + else if (buffer[0] == TELOPT_TSPEED + && buffer[1] == TELQUAL_SEND) + { + static char msg[] = + { + IAC, SB, TELOPT_TSPEED, + '9', '6', '0', '0', ',', '9', '6', '0', '0', + IAC, SE + }; + TCPIPWriteTCP(ipid, msg, + sizeof(msg), true, false); + } cnt = 0; return 0; default: @@ -230,7 +241,8 @@ static int cnt; buffer[2] = c; if (c == TELOPT_TTYPE || c == TELOPT_SGA - || c == TELOPT_NAWS) + || c == TELOPT_NAWS + || c == TELOPT_TSPEED) { buffer[1] = WILL; }