-
June 11th, 2011, 02:39 PM
#1
Decoding data from a TCP/IP Packet
Hello,
There is a server application which keeps on writing some data into a tcp/ip port (514). I am trying to write a windows application which captures this data, do some manipulations and saves into a database. My idea was to write a simple socket listener (socket server) which listens to this port, but that is not capturing any data from this port. Any ideas on what kind of application I should write here? And please share if you have any samples....
Thanks
Sree
-
June 12th, 2011, 04:06 PM
#2
Re: Decoding data from a TCP/IP Packet
A listening socket will wait for incoming connections and accept them, not monitor the datastream on a particular socket. For that you'll need to use a tool like Wireshark (or others).
This article may or not be useful for doing some custom processing: http://www.codeproject.com/KB/IP/custom_dissector.aspx
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
-
June 13th, 2011, 03:46 AM
#3
Re: Decoding data from a TCP/IP Packet
If you need to do the capture in code, you should look at the WinPCAP library and its C# wrapper, PCAP.NET.
(p.s. HighCommander4 is sad because he liked his post count being 1337 ).
Last edited by HighCommander4; June 22nd, 2011 at 01:24 AM.
Old Unix programmers never die, they just mv to /dev/null
-
June 14th, 2011, 01:15 AM
#4
Re: Decoding data from a TCP/IP Packet
Good call, Commander. I didn't know about the .NET wrapper around WinPCap; that's useful.
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|