Solved

Problem Trying to unicast packets to available networks.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Allow space in this pattern 2 48
LINQ - C# to VB convertion 12 46
How would you add MULTITHREADING to the attached C# code? 4 51
Error in script 11 47
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!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

920 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

17 Experts available now in Live!

Get 1:1 Help Now