LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author]
  From: Mark Newton <newton@atdot.dotat.org>
  To  : Airlink IT <it@airlink.com.pg>
  Date: Fri, 26 Mar 1999 16:41:08 +1030 (CST)

Re: Linux Telnet and Win 98

Airlink IT wrote:

 > Now my problem is this. I want to be able to launch apps on the Linux or =
 > SCO boxes from the windows environment. To achieve this I would like to =
 > have my Win app create a Telnet session on the server and then issue the =
 > required commands to initiate reports etc. I have tried to use the =
 > Winsock control that comes with Visual Basic but when I connect to port =
 > 23 on the server, it responds with hieroglyphics. Of course if I knew =
 > what to expect and what Linux expected in return, I could solve the =
 > problem.

The crud you're seeing is telnet's IAC protocol.  It's telnet's way
of working out client and server capabilities, then negotiating a 
set of options which both ends are happy with.

/usr/include/telnet.h defines the IAC opcodes.  They all being 
with 0xff followed by a character which describes whether the 
cabability being metioned is supported or not (and how it's supported)
then another identifier which describes the capability itself.

In the simplest case you can probably hardcode a set of capabilities
needed for your application and send IAC_WILL codes for them, and
IAC_WONT messages for the others.  

Look at the first 500 bytes or so of a telnet session with tcpdump
to see what's going on.  You'll also find it useful to type
"set debug", "set prettydump" and "set options" at the telnet> prompt
before doing a manual login from another UNIX box to get an idea
of the conversation that's being carried out.

Cheers,

    - mark

--------------------------------------------------------------------
I tried an internal modem,                    newton@atdot.dotat.org
     but it hurt when I walked.                          Mark Newton
----- Voice: +61-4-1958-3414 ------------- Fax: +61-8-83034403 -----

-- 
Check out the LinuxSA web pages at http://www.linuxsa.org.au/
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author]
Return to the LinuxSA Mailing List Information Page