PC Review


Reply
Thread Tools Rate Thread

Send ICMP message to my router via. Raw socket

 
 
Piotrekk
Guest
Posts: n/a
 
      15th Oct 2007
Hi

I have written piece of code to send message to my router.

static void Main(string[] args)
{
Socket mySock = new Socket(AddressFamily.InterNetwork,
SocketType.Raw, ProtocolType.Icmp);

IPEndPoint ep = new
IPEndPoint(IPAddress.Parse("192.168.1.1"), 7);

byte[] asd = new byte[2];
asd[0] = 33;
asd[1] = 44;

mySock.SendTo(asd, ep);
mySock.Close();
}

Problem is that my port sniffer does not detect any traffic when i
compile and run the code.
Do you know why?

PK

 
Reply With Quote
 
 
 
 
Chris Shepherd
Guest
Posts: n/a
 
      15th Oct 2007
Piotrekk wrote:
> Hi
>
> I have written piece of code to send message to my router.
>

[...]
> Problem is that my port sniffer does not detect any traffic when i
> compile and run the code.
> Do you know why?


What sniffer are you using?

Chris.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ICMP using raw socket not working on Vista =?Utf-8?B?R2F2aW4=?= Microsoft Dot NET Framework 2 8th Sep 2007 12:18 AM
Socket.BeginSendTo and Socket.BeginSendFrom on a single Socket instancefrom multiple threads Jonas Hei Microsoft Dot NET Framework 9 5th Jul 2005 03:27 AM
Socket.BeginSendTo and Socket.BeginSendFrom on a single Socket instancefrom multiple threads Jonas Hei Microsoft C# .NET 2 22nd Jun 2005 12:10 PM
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" Daniel Microsoft Dot NET 1 15th Mar 2005 12:37 PM
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" Daniel Microsoft Dot NET Framework 3 12th Feb 2005 03:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:07 PM.