Questions tagged [icmp]

Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.

583 questions
2
votes
2 answers

How To Ping using a specific Network Interface (or a specific source IP Address)?

According to this link: using System.Net.NetworkInformation, is there a way to bind a ping to a specific interface? the ICMP cannot be bound to a Network Interface (unlike socket based stuff): ICMP is not socket based. The ping will be sent to the…
Perret
  • 179
  • 1
  • 1
  • 17
2
votes
1 answer

c ping request using raw sockets fails

My program sends an icmp request to the specified host. #include #include #include #include #include #include #include #include #include…
2
votes
3 answers

Linux - ping all devices in a file to check accessibility

I have a file with about 500 devices which I need to ping to check if they're currently accessible or not from various subnets around my network. It's essentially a basic test to check for routing/accessibility issue. Not sure where to start really.…
captain yossarian
  • 447
  • 3
  • 10
  • 22
2
votes
1 answer

checksum icmp python with wireshark

Over the last few days, I am passionate about the ICMP protocol and I found a python function that calculates its checksum: def carry_around_add(a, b): c = a + b return (c & 0xffff) + (c >> 16) def checksum(msg): s = 0 for i in…
newuser
  • 67
  • 3
  • 8
2
votes
1 answer

Can't ping AWS RDS instance after allowing ICMP

I'm trying to ping my newly set up AWS RDS instance, but I am unable to do so (four "Request timed out" errors). I added a rule in my EC2 security group for the instance, allowing all ICMP but it still does not work. I am new to this, so apologies…
hunterm726
  • 73
  • 1
  • 5
2
votes
2 answers

Set 'next header' byte in v6 python socket after instantiation for icmp ipv6

So I've got a socket like the following: sock = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.getprotobyname("icmp")) and when i send out a properly constructed ICMP6 ECHO REQUEST per RFC4443 with type 128 and code 0 (also validated…
jeffery
  • 109
  • 1
  • 6
2
votes
1 answer

Is there any way to do genuine pings in PHP? (without exec)

I'm trying to do actual, genuine ping using ICMP packets, natively in PHP. Right now I'm using exec to run the ping command, but you never quite know what it's going to output, which makes it very hard to format the results for web. Different…
l008com
  • 1,699
  • 2
  • 11
  • 20
2
votes
2 answers

C++ - Access violation when constructing ICMP packet

I am working on a ping tool and I am consistently getting an access violation around my sending buffer while calculating the ICMP checksum when using a packet size of 45041 or greater (including ICMP header). Any packet with size 45040 or below…
mibogo
  • 173
  • 1
  • 8
2
votes
1 answer

What does given filed mean in netstat -s on Linux

I am analyzing the the output of netstat -s and wanted to know what "input ICMP message failed" is meant for. Below is output of netstat -s, Icmp: 643 ICMP messages received 0 input ICMP message failed. ICMP input histogram: …
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
2
votes
1 answer

Linux kernel network device driver and skb pointers

I am writing a network device driver. Kernel 2.6.35.12 The device is supposed to be working when it is connected to a bridge port. I am trying to intercept ICMPv6 RA and NS messages (Router/ Neighbor solicitation) forwarded to the interface from…
Kimel
  • 199
  • 1
  • 7
2
votes
1 answer

On Windows the ICMPv6 echo reply is missing the IP header

I experience strange issue on Windows 7 when receiving ICMPv6 echo replies using ASIO-BOOST library. The received data is missing the IP header, it only has the ICMP header and the payload. Some more details…
Marcus Frenkel
  • 691
  • 10
  • 19
2
votes
1 answer

Check for internet connection gives error in windows 8

I Have a vb6 code which is used to test whether internet connection is there or not for a PC.I make use of checking google DNS for it.It works fine in Windows XP.But in Windows 8 if internet is connected or not it always returns success(Internet is…
IT researcher
  • 3,274
  • 17
  • 79
  • 143
2
votes
0 answers

Calculate checksum of ICMPv6 packet

I'm trying to calculate the checksum of an ICMPv6 packet in C#. I followed the suggestions posted here but there still seems to be a slight difference. This is how I'm calculating the checksum: //Note: Initial checksum in payload is set to…
Orestis P.
  • 805
  • 7
  • 27
2
votes
0 answers

windows socket(ipv6) cannot receive Neighbor Advertisement(NA) packet

I used a Raw Socket(IPv6) to send/receive ICMP packets. It works fine to send ping request(type 128) and receive ping receive(type 129) packets. And it also works well to send Neighbor Solicitation(type 135). But the same socket always cannot…
J2.NETe
  • 71
  • 1
  • 5
2
votes
1 answer

ICMP vs TCP Protocols on iOS

I'm trying to implement traceroute for ios in c. (For example:in order to find which router is not working). Unfortunately I can't use ICMP protocol which send me response each time router kills my packet. Is it any way to implement it with TCP or…
Mike.R
  • 2,824
  • 2
  • 26
  • 34