473,394 Members | 1,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Send ICMP message to my router via. Raw socket

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

Oct 15 '07 #1
1 3524
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.
Oct 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: T.C.McQueen | last post by:
Does anyone know how to receive an ICMP-Router Advertisement Message using Raw/ICMP - Sockets in Multicast -Mode with .NET I tried it several times differently but it does not work I think it's...
2
by: SWJust | last post by:
Hi... is it possible to send data from a socket to at physical address (MAC) on f.x another PC or Router ??? I have a IP header with information about another client, and this cannot be altered,...
1
by: Fotis | last post by:
hi there i have two questions 1)Is there a library class for ICMP packet creation ,management etc to use with C# 2)I have created a socket of icmp type and after sending a packet i call the...
6
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
4
by: seets375 | last post by:
Hi, I have two ethernet interfaces on my system, with IPs assigned to the interfaces from different subnets (e.g. eth1 - 10.10.10.10 and eth2 - 20.20.20.20 ). I'm connecting these interfaces to...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: Buddy Home | last post by:
There is two examples of code. Example 1. Send and Receive within the same process. Put this code in a console app called SendAndReceive and run the code. using System; using...
0
by: NeoIndigo | last post by:
Hi guys, It's my first time trying to create a packet in C++. So, what i have done so far are: 1. I have opened a packet level raw socket. Using this command: sd =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.