分享
 
 
 

RFC1571 - Telnet Environment Option Interoperability Issues

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

Network Working Group D. Borman

Request for Comments: 1571 Cray Research, Inc.

Updates: 1408 January 1994

Category: Informational

Telnet Environment Option Interoperability Issues

Status of this Memo

This memo provides information for the Internet community. This memo

does not specify an Internet standard of any kind. Distribution of

this memo is unlimited.

1. Overview

RFC1408 [1], the specification for the Telnet Environment Option,

specifies definitions for VAR and VALUE that are reversed from the

BSD implementation of the Telnet Environment option. Since the BSD

implementation was the reference implementation that the RFCwas

supposed to document, and is the base for many existing

implementations, there exists an interoperability problem between

implementations with conflicting definitions for VAR and VALUE.

This document describes a method for allowing implementors to ensure

that their implementation of the Environment option will be

interoperable with as many other implementations as possible, by

providing a set of heuristics that can be used to help identify which

definitions for VAR and VALUE are being used by the other side of the

connection.

2. Client Telnet: Parsing a SEND

The SEND suboption should only contain VAR and USERVAR commands. It

should never contain a VALUE. If while parsing a SEND suboption, a

VALUE is encountered, the client should assume that the server has

reversed values for VAR and VALUE, and from that point on the client

should reverse those values, both in parsing the rest of the SEND

suboption, and when generating an IS or INFO suboption. If both

VALUE and VAR commands are encountered, the SEND command is not well

formed, and it is implementation dependent as to what will happen.

If there are not VAR or VALUE commands in the SEND suboption, then

the client cannot know what values the server is eXPecting for VAR

and VALUE. In this case, it should just assume that the server has

the correct definitions, and use the correct values for VAR and

VALUE.

3. Server Telnet: Parsing an IS or INFO

The IS or INFO in a suboption can only be legally followed by either

a VAR or a USERVAR. If an IS or INFO is immediately followed by a

VAR, then it can be assumed that the client has the correct

definitions for VAR and VALUE. If the IS or INFO is immediately

followed by a VALUE, then it can be assumed that the client has

reversed definitions for VAR and VALUE, and from that point on the

server should assume that the VALUE and VAR definitions are reversed.

If the IS or INFO is immediately followed by a USERVAR, further

hueristics must be applied to determine what are the client

definitions for VAR and VALUE. This is because it is legal for a

USERVAR to be followed by either a VAR or a VALUE. A VALUE after a

USERVAR gives the value for the USERVER. A VAR after a USERVAR

implies that the USERVAR is undefined.

The next thing to do is to scan the entire suboption, looking for two

consecutive instances of VAR or VALUE, or for a VAR or VALUE that is

empty. It is not legal for a suboption to contain two VALUEs without

an intervening VAR or USERVAR, and it is also not legal for a

suboption to contain an empty VAR. Thus, if two consecutive VARs or

an empty VALUE can be found, it can be assumed that the client that

generated the suboption uses the correct definitions for VAR and

VALUE. If two consecutive VALUEs or an empty VAR can be found, then

it can be assumed that the client that generated the suboption has

reversed definitions for VAR and VALUE, and from that point on the

server should assume that the VAR and VALUE definitions are reversed.

If things are still in douBT, the next test that can be applied is to

count up how many VARs, USERVARs and VALUEs were received.

(Consecutive USERVARs without an intervening VALUE or VAR should only

be counted as one.) Because a VALUE can only follow a VAR or a

USERVAR, there can never be more VALUEs than the sum of VARs and

USERVARs, and if all VARs and USERVARs have values, then there will

be exactly as many VALUEs as there are VARs and USERVARs. If the

number of VARs and USERVARs is the same as the total number of

VALUEs, then the client has correct definitions for VAR and VALUE.

If the number of VALUEs and USERVARs is the same as the total number

of VARs, then the client has reversed definitions for VAR and VALUE.

If the number of VALUEs is more than the sum of VARs and USERVARs, it

can be assumed that the client has reversed definitions of VAR and

VALUE, and if there are more VARs than USERVARs and VALUEs, then it

can be assumed that the client has the correct definitions for VAR

and VALUE. However, in order to get to this step, it has already

been determined that there are no consecutive VARs and VALUEs. A

little math will show that this means that the number of VALUEs will

never exceed the sum of VARs and USERVARs, and the number of VARs

will never exceed the sum of VALUEs and USERVARs. Hence, this check

is redundant and can be skipped.

If things are still in doubt, the values of the VAR commands can be

checked to see if they do indeed specify well known variables. If

any of them do, then the client is probably using the correct

definitions for VAR and VALUE. Otherwise, if any of the VALUEs

contain well know variable names, then the client probably has

reversed definitions for VAR and VALUE.

If all the above heuristics fail, then the server has done all it can

to determine what type of client it is, and it should just be assumed

that the client is using the correct definitions for VAR and VALUe.

4. Client Summary

The SEND suboption contains only VAR and USERVAR commands.

The server is ok.

The SEND suboption contains VALUE commands.

The server is reversed.

No VAR or VALUE commands are found.

Assume the server is ok.

5. Server Summary

IS/INFO is followed by VAR.

The client is ok.

IS/INFO is followed by VALUE.

The client is reversed.

There are two consecutive VARs.

The client is ok.

There are consecutive VALUEs.

The client is reversed.

There is an empty VALUE.

The client is ok.

There is an empty VAR.

The client is reversed.

The number of USERVARs and VARs is equal to the number of VALUEs.

Assume the client is ok.

The number of USERVARs and VALUEs is equal to the number of VARs.

Assume the client is reversed.

There are VARs with names that are well known.

Assume the client is ok.

There are VALUEs with names that are well known.

Assume the client is reversed.

Anything else.

Assume the client is ok.

References

[1] Borman, D., Editor, "Telnet Environment Option", RFC1408, Cray

Research, Inc., January 1993.

Security Considerations

Security issues are not discussed in this memeo.

Author's Address

David A. Borman

Cray Research, Inc.

655F Lone Oak Drive

Eagan, MN 55123

Phone: (612) 452-6650

EMail: dab@CRAY.COM

Telnet Working Group Mailing List: telnet-ietf@CRAY.COM

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有