Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
415 views
in Technique[技术] by (71.8m points)

char - What format type are these actual numbers for Telnet negotiation in that other stackoverflow question ? (for IAC DO WONT etc.)

In this other question, of which the principle of the given solution was useful for me applied to a Python program, I don't understand the actual numbers shown there for the negotiation IDs.

It says 377 for IAC; IAC is 0xff (or 255 decimal); where from comes 377 ?
Likewise, 42 is given for LINEMODE; LINEMODE is 0x22 (or 34 decimal); where from comes 042 ?
And so on, except for 001 which is 0x01 i.e. ECHO.

Most likely it is obvious for a trained eye, something which I am missing here (probably because I am used to think hex when it comes to bytes, a habit coming from assembly language).

question from:https://stackoverflow.com/questions/65861136/what-format-type-are-these-actual-numbers-for-telnet-negotiation-in-that-other-s

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...