|
-
February 7th, 2012, 02:41 PM
#1
sending and receiving ip packets
I've been working on my first network program and the goal is send an ip packet, receive it, strip the payload and than do something with that payload. I do not know if I have taken the right approach to this problem, but I decided to create a tcp client/server program. For now, I have both programs on the same pc, so they are both using local ip and same port to connect. I am using SharpPcap (since im programming in C#) to create a random packet. This packet is being created in my client program and is actually sending it to my server program. So I know the communication is fine. My problem is, the server is listening to my local ip, so its receiving all these packets along with the one im sending. I've tried using filters on the port I am using so that I only receivce ip and tcp packets but I havent had much luck. Is there any way I can listen for my client's packet only? any suggestions?
-
March 2nd, 2012, 01:26 AM
#2
Re: sending and receiving ip packets
IMPORTANT: don't download anything that resets your network settings, ip address, or anything that might help you out, because it might screw everything up and you may never get your problem fixed. Also if you download lots of stuff try to avoid using limewire, bit torrent, uTorrent, etc. your firewall will allow stuff from those sites and programs to come into your computer and makes it easier for you to get viruses...
-
March 10th, 2012, 01:27 AM
#3
Re: sending and receiving ip packets
When I try to run both programs on my computer at the same time (starting my program last) I get a SocketException saying that only a single use of each port is normally allowed. Which leads me to believe there must be some way to share the port (although it makes sense that only a single program can use port on a computer at any one time, I have no trouble running multiple internet browsers at the same time (and I suppose they use port 80 for http)).
---------------
STC Technologies|Reputation Management
Last edited by paddysmith; March 10th, 2012 at 03:55 AM.
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
|