问题描述
我写上的Arduino一点Telnet客户端。如何重新启动Telnet客户端后,行方式我下面code停用?
I am writing a little Telnet client on Arduino. How do I reactivate the Telnet client linemode after I deactivate it with the following code?
client.write(255); // IAC
client.write(251); // WILL
client.write(1); // ECHO
client.write(255); // IAC
client.write(251); // WILL
client.write(3); // suppress go ahead
client.write(255); // IAC
client.write(252); // WONT
client.write(34); // LINEMODE
密码输入。
我试图反向命令,但他们没有工作。
I tried the reverse commands, but they don't work.
推荐答案
使用BSD telnet客户端,请使用以下命令:
Using the BSD telnet client, use the following commands:
set debug
set prettydump
set options
set netdata
然后,字符在一次一模式和线在一次一模式可切换,使用命令,
then, character-at-a-time mode and line-at-a-time mode can be switched, using commands,
mode line
mode character
随后可以检查和重复谈判。
The negotiation that follows can be inspected and duplicated.
然而,这应该足以只发送IAC DONT ECHO,密码,CR NUL,那么IAC DO ECHO。使用回音必会SGA,在一个时间字符模式进入被称为杂牌模式 - 重新启用ECHO应该默认为标准NVT行为(行方式)
However, it should be sufficient to send only IAC DONT ECHO, the password, CR NUL, then IAC DO ECHO. Entering "character at a time" mode using "WILL ECHO, WILL SGA" is called "kludge mode" -- re-enabling ECHO should default to standard NVT behavior (linemode).
BSD客户端,但是,与全面扩展行方式支持。这是不平凡的,近50%的codeBase类(forwardmask,SLC,回调等)的。
bsd client, however, with full extended linemode support. It is not trivial, nearly 50% of the codebase (forwardmask, slc, callbacks, etc.).
如果服务器回复WONT LINEMODE,那么它实际上仍然在默认NVT行方式 - 它只是没有在增强行方式,或者不关心它进行谈判。这就是为什么发送DO LINEMODE实际上是一个可怕的想法,因为你需要期待承认子协商协议从后来的RFC行方式。
If the server replies WONT LINEMODE, then it is still actually in the default NVT linemode -- it just is not in the enhanced linemode or does not care to negotiate about it. Which is why sending DO LINEMODE is actually a terrible idea, as you will need to expect to acknowledge the sub-negotiation protocols for linemode from later rfc's.
这回复DO LINEMODE可能会继续要求行方式分协商,如IAC SB LINEMODE模式474上的服务器; 1个字节掩码>和IAC SB LINEMODE FORWARDMASK。拒绝与WONT FORWARDMASK此响应。该模式必须有ACK位设置,并进行类似回答。
A server that replies DO LINEMODE will likely continue to request linemode sub-negotiation, such as IAC SB LINEMODE MODE <1 byte bitmask>, and IAC SB LINEMODE FORWARDMASK . Decline this response with a WONT FORWARDMASK. The MODE must have ACK bit set and be replied similarly.
这篇关于Telnet服务器启用客户端行方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!