Solved

Problem Trying to unicast packets to available networks.

Posted on 2009-07-08
1
525 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
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
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…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now