Re: howto receive and *understand* via UDP



The following are very easy and generic
making a socket,(UDP,TCP)
connecting to a port
receving data

but the size and meaning of data is very specific.

The tool named ethereal would be very useful in understanding the flow
of data, if your application is running
The source code of ethereal is worth seeing, may be u can reuse some
of its code,

RUV



On Nov 22, 8:14 am, Jack Klein <jackkl...@xxxxxxxxxxx> wrote:
On Wed, 21 Nov 2007 20:41:21 -0600, Ender <nore...@xxxxxxxxxxxx> wrote
in comp.lang.c:

Hi,

I've been asked to write an app that connects to a program that I know
nothing about. The only information I have is that it's sending data to
a specific IP via UDP. The data is likely to be small, just some
numbers. I've seen how to connect() via UDP but ...

How you connect via UDP, or any other protocol, is off-topic here,
since the C standard does not define any networking functions. If you
have issues with that, you need to ask in a group that supports your
compiler/OS combination, since it's platform specific.

My questions is, how do I go about writing for something like this if I
know nothing about the data sizes and how the other app is sending
them, other than the above info? How do you parse such data?

I don't see how it is possible at all, unless the values are in text
format and delimited in some manner. If it is in binary, I can't
think of any method at all to extract coherent data from a stream of
raw binary octets if you have no idea what they are supposed to
represent.

Any help, suggestions, tips, etc... much appreciated.

Suggestion? Find out about the program that you know nothing about.
If you can't, tell them you can't write the application.

If whoever asked you to write this application can't provide the
necessary information, tell them that you can try, at their expense,
and with no guarantee of success, to read lots of this data and try to
work out what it represents.

--
Jack Klein
Home:http://JK-Technology.Com
FAQs for
comp.lang.chttp://c-faq.com/
comp.lang.c++http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

.



Relevant Pages

  • Re: howto receive and *understand* via UDP
    ... I've been asked to write an app that connects to a program that I know ... The only information I have is that it's sending data to ... I've seen how to connectvia UDP but ... ... raw binary octets if you have no idea what they are supposed to ...
    (comp.lang.c)
  • Re: howto receive and *understand* via UDP
    ... I've been asked to write an app that connects to a program that I know ... The only information I have is that it's sending data to a ... I've seen how to connectvia UDP but ... ... be able to see how the packet exchange is working. ...
    (comp.lang.c)
  • Re: howto receive and *understand* via UDP
    ... Ender said: ... I've been asked to write an app that connects to a program that I know ... The only information I have is that it's sending data to ... I've seen how to connectvia UDP but ... ...
    (comp.lang.c)
  • Re: Raw Sockets
    ... You can't do it on TCP as Michael and me wrote already. ... but with UDP only. ... to sender and receiver since we are sending data only on data link ...
    (microsoft.public.win32.programmer.networks)
  • Re: how to get data accurately from UDP
    ... I've been asked to write an app that connects to a program that I know ... The only information I have is that it's sending data to ... I've seen how to connectvia UDP but ... ... Get a sniffer or other network monitor, ...
    (comp.programming)

Loading