Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.
Questions tagged [icmp]
583 questions
3
votes
1 answer
How to ping muliple hosts at the same time
I'm trying to ping various hosts at the same time using github.com/sparrc/go-ping and goroutines. The issue is that it seems "stats" is shared between all the goroutines. That means "stats" has approximately the same value in all goroutines. For me…

ArnaudG
- 31
- 2
3
votes
1 answer
How to send ICMP message through a specific network interface in Go?
I am new to Go. I am trying to write a program that pings 8.8.8.8 but via a specific network interface (e.g. eth0). With the ping command on Linux, you can specify the -I flag to have the ICMP message sent through a specific network interface.
ping…

dayuloli
- 16,205
- 16
- 71
- 126
3
votes
0 answers
How to create an ICMP source quench message packet using RAW socket in C?
I want to send an ICMP Source Quench packet(type-4, code-0) using SOCK_RAW in C. According to this link, they said
This packet contains no extra header except the data portion, which contains the internet header plus 64 bits of the original data…

IAmBlake
- 457
- 6
- 21
3
votes
0 answers
Node.js: is there a way to catch ICMP Destination Unreachable when sending UDP packet?
Basically the subj. To check whether an app is running on a LAN node that is listening to a specific UDP port when up I'm sending UDP packets to that port. If the port is closed ICMP Destination Unreachable gets sent to me but the question is…

intellion
- 1,397
- 12
- 27
3
votes
1 answer
ICMP Host-Unreachable
How do I know if I got an ICMP Host Unreachable after trying to send some data to a UDP port ? I want to check for opened UDP ports on a machine.

Marian
- 85
- 1
- 3
3
votes
1 answer
why is ICMP checksum shifted 16 bits
I'm struggling to understand why the ICMP checksum total (before being complemented) is the total + shifted right 16 bits total in this line of code:
checksum bs = let bs' = (if (BL.length bs) `mod` 2 == 0 then bs else BL.snoc bs 0)
…

Nick Brady
- 6,084
- 1
- 46
- 71
3
votes
1 answer
cannot receive time exceeded message
I'm doing some tests based on the idea of pwnat, it introduced a method for NAT traversal without 3rd party: the server sends ICMP echo request packets to the fixed address(for example, 3.3.3.3) where no echo replies won't be returned from, the…

user123
- 55
- 5
3
votes
2 answers
"Connected" UDP socket receives ICMP Port Unreachable
Based on the premise that UDP is a connectionless protocol I had presumed that whether a host is up or down would be irrelevant.
However, now that I'm doing testing I've discovered that when I have "connected" my UDP client socket, a write to that…

robert
- 4,612
- 2
- 29
- 39
3
votes
0 answers
No-go methods for determining internet connection on a specific interface - any left? (dotnet)
Has been discussed before:
check whether Internet connection is available with C#
How to determine if network interface is connected to the Internet (i. e. the computer is online)
What is the best way to check for Internet connectivity using…

Stormwind
- 814
- 5
- 9
3
votes
1 answer
A semi-concurrent ICMP ping using Boost.Asio on Windows
I have modified the example http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/icmp/ping.cpp
on how to ping a host periodically to ping several hosts concurrently.
At first, requests for all hosts are created and send to a socket.…

drzn
- 31
- 2
3
votes
2 answers
raw socket didn't receive icmp response
I'm trying to send an icmp message whose TTL is just 1, and expect to receive a time exceeded message. that message does come(I see it from wireshark), but my program blocks on syscall.Recvfrom. Anyone knows why?
icmp.go
package main
import (
…

jfly
- 7,715
- 3
- 35
- 65
3
votes
1 answer
How to send a multicast ping using .NET?
How can I send a multicast ping in .NET ?
So that all computers on the network respond ?

Stefan Steiger
- 78,642
- 66
- 377
- 442
3
votes
0 answers
IcmpCreateFile hangs
I have a C++ program that needs to ping a device before it proceeds. I've been using IcmpSendEcho for a few months now. During this time I have seen my program hang on the IcmpCreateFile call more than once. I haven't pinpointed the cause and all of…

LightLabyrinth
- 362
- 3
- 14
3
votes
2 answers
What handles ping in linux?
I want to override/change how linux handles ping icmp echo request packets.
Meaning I want to run my own server to reply to incoming icmp (echo request or other) packets.
But for this to work properly, I guess I need to disable the default ping icmp…

Ayman Khamouma
- 976
- 10
- 24
3
votes
3 answers
Can you run a true ping in Java?
I have done a fair amount of research these last few weeks trying to create a connection diagnostic tool, I don't so much want to just check to see if the connection is available but to diagnose if there is jitter, packet loss, etc..
So far it seems…

lael
- 31
- 1
- 3