Solved

Problem Trying to unicast packets to available networks.

Posted on 2009-07-08
1
527 Views
Last Modified: 2013-11-29
Trying to unicast packets to available networks. There are totally 3 networks. Managed to get packets in only one network.But i am not able to receive the packets in different networks.

using this code..
foreach (var i in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
            {
                foreach (var ua in i.GetIPProperties().UnicastAddresses)
                {
                    System.Windows.Forms.MessageBox.Show(ua.Address.ToString());
                    IPAddress Tip = IPAddress.Parse(ua.Address.ToString());
                    IPEndPoint targetEndPoint = new IPEndPoint(Tip, iTargetPort);
                    MyUdpClient sendUdpClient = new MyUdpClient();
                    int numBytesSent = sendUdpClient.Send(CombineHeaderBody, CombineHeaderBody.Length, targetEndPoint);
                }
            }

Open in new window

0
Comment
Question by:srk1982
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
topdog770 earned 500 total points
ID: 24808776
srk:
Take a look at this sniffer code: http://www.codeproject.com/KB/IP/CSNetworkSniffer.aspx
I have tried this in a long time, but rumor ( ie something I haven't personally tested ) has it that security settings have changed, that you may not see the raw packets under some conditions.
I believe the link above also refers to this security change and has some solution/work around as well.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question