0

我正在尝试开发一个应用程序,例如 IBM iSeries AS/400 的终端仿真。我正在使用 AsyncSocket 连接到服务器。连接很好,但是在建立连接后,我应该如何使用用户名和密码在 telnet 服务器上登录。是否有任何格式或命令或方式我应该将用户名和密码发送到服务器以登录。

4

1 回答 1

0

听起来您需要非常仔细地研究RFC 4777 - RFC 4777 - IBM 的 iSeries Telnet 增强功能。

请特别注意“标准 Telnet 选项协商”部分:

Telnet server option negotiation [RFC855] typically begins with the
issuance, by the server, of an invitation to engage in terminal type
negotiation with the Telnet client (DO TERMINAL-TYPE) [RFC1091].  The
client and server then enter into a series of sub-negotiations to
determine the level of terminal support that will be used.  After the
terminal type is agreed upon, the client and server will normally
negotiate a required set of additional options (EOR [RFC885], BINARY
[RFC856], SGA [RFC858]) that are required to support "transparent
mode" or full screen 5250/3270 block mode support.  As soon as the
required options have been negotiated, the server will suspend
further negotiations and begin with initializing the actual virtual
device on the iSeries.  A typical exchange might start as follows:

iSeries Telnet server             Enhanced Telnet client
--------------------------        -------------------------
IAC DO TERMINAL-TYPE        -->
                            <--   IAC WILL TERMINAL-TYPE
IAC SB TERMINAL-TYPE SEND
IAC SE                      -->
                                  IAC SB TERMINAL-TYPE IS
                            <--   IBM-5555-C01 IAC SE
IAC DO EOR                  -->
                            <--   IAC WILL EOR
                            <--   IAC DO EOR
IAC WILL EOR                -->


Actual bytes transmitted in the above example are shown in hex below.

iSeries Telnet server             Enhanced Telnet client
--------------------------        -------------------------
FF FD 18                    -->
                            <--   FF FB 18
FF FA 18 01 FF F0           -->
                                  FF FA 18 00 49 42 4D 2D
                                  35 35 35 35 2D 43 30 31
                            <--   FF F0
FF FD 19                    -->
                            <--   FF FB 19
                            <--   FF FD 19
FF FB 19                    -->

因此,您实际上会想要查找那些字节码并发送适当的响应。

于 2013-04-11T08:58:21.890 回答