Re: Tying UDP socket to stdin, stdout



In article <1192464353.360706.282120@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
jdthebigj@xxxxxxxxx wrote:

On Oct 15, 7:32 am, Spoon <root@localhost> wrote:
jdthebigj wrote:
I am research student working in a network security lab. I have to
build a pseudo-telnet based on UDP for obtaining my results. So
unfortunately, I cannot take help of TCP. Can you give me some tips
for this to work with UDP?

Netcat might prove helpful.

http://sectools.org/#netcathttp://netcat.sourceforge.net/

Netcat seems to be cool but It won't be useful to me. My algorithm is
based on the inter packet delays and buffering of packets and I need
to have control over the packet sending and receiving part of the
code. With netcat, the utility handles everything so I don't thnk I
willl be able to use it. I need socket programming code for tis to
work.

This seems to be getting more and more confusing. You started by asking
how to connect the UDP socket to stdin and stdout. This suggests that
you'll be running generic applications that read and write the standard
streams. But now you say that the application will be doing things that
are dependent on the packet details. Why does this application, which
must be specially designed as part of this project, require that the
socket be connected to stdin/stdout?

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • Re: UDP sockets bound to ANY send answers with wrong src ip address
    ... >> I observe that UDP sockets listening on ANY ... >> instead of using dst ip address of client's packet. ... I can bind a temporary socket to needed src address, ... for (cmsgptr = CMSG_FIRSTHDR(&msg); ...
    (Linux-Kernel)
  • Raw socket not receiving data when matching UDP socket is present
    ... I am writing an application where IP TOS value in incoming UDP packet ... get the value of TOS byte and a UDP socket along with Traffic Control ... the raw socket itself to send the reply? ...
    (microsoft.public.win32.programmer.networks)
  • Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
    ... Set a shutdown flag and then create the event the thread is waiting ... That is, if the thread is waiting for a UDP packet on port 402, ... Set the socket non-blocking. ...
    (comp.unix.programmer)
  • Re: Strange UDP Socket problem
    ... UDP packet to an IP that doesn't have anything at the other end that my ... > I suspect you would get the same response if you used one thread to send ... > thread on same socket. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Tying UDP socket to stdin, stdout
    ... build a pseudo-telnet based on UDP for obtaining my results. ... Netcat seems to be cool but It won't be useful to me. ... based on the inter packet delays and buffering of packets and I need ... I need socket programming code for tis to ...
    (comp.unix.programmer)