[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: sockets doubt - urgent



hi ramesh,

 you got to send your data using the telnet protocol. Since you are
connecting to the telnet server on the host, you will have to send your
data in a format which it understands. Since when ever a telnet client
connects to a telnet server a lot of data gets transferred between the
two ( which is invisible to you ) which is essential for establishing a
session, you got to pass the session info too.


Saju
--
the unbeliever ( ya, it's chronic and it's terminal )

http://saju.8k.com ->
mirrored on the happy_monkey server
http://incq218r.idc.oracle.com/~saju




>
> --- Ramesh <ramesh_tnj@xxxxxxxxx> wrote:
> > hi all,
> >
> > when i telnet to a machine and give the iusername
> > and
> > passwd.. and type a command "ls -l" means it will
> > show
> > the lsit of files in the current directory.
> >
> > istead of going for telnet i want to go for my
> > socket
> > program. what i am doing is.. i create a socket
> > first
> > and i fill the sockaddr structure with the
> > destination
> > machine IP address and the telent port(23).
> >
> > now i send the username of the machine first using
> > send(sockfd,loginname,strlen(loginname),0) and
> > checking for errno set. it works( means no errno set
> > and the data is sent). simillarly the passwd also
> > sent
> > and finally i send the command in the above same
> > way.
> >
> > now ai m reading the port for any reply on the port
> > using recv function. i dont find any reply and the
> > errno is also not set.
> >  iam not sure whether this logic is correct. can
> > anybody guide me from here where i am missing the
> > thing...
> >
> > thanx in advacne...
> >
> > ramesh