Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.
Questions tagged [icmp]
583 questions
5
votes
0 answers
Disable ICMP Host unreachable
I'm using a single raw socket to read UDP packets from local test network with 1024 ports. Each UDP src and dest port is unique and I need access to IP and UDP header fields. I can stream and process data (in and out) at 100 mbps in linux-rt kernel…

user1606596
- 51
- 2
4
votes
1 answer
Maximum legal size of ICMP echo packet
Can someone please explain why maximum legal size of ICMP echo packet is calculated as follows:
65535 - 20 - 8 = 65507
Thanks.

Jake
- 16,329
- 50
- 126
- 202
4
votes
2 answers
Ping ICMP echo request
Are there any methods to ping icmp (echo request) instead of using isReachable? isReachable establish a TCP connection on port 7 and when I used wireshark I did not see any ICMP packets on Window and ICMP type 3 on Linux (not type 8 and 0). So if…

bkstudent
- 83
- 2
- 5
4
votes
3 answers
How can I extract mac address from a icmp reply in c on linux
I am trying to find out mac address of a machine in a switched environment after sending it a raw packet. I am trying to implement traceroute command . I want to know when i receive a ICMP time exceeded message how can I extract the mac address of…

j10
- 2,009
- 3
- 27
- 44
4
votes
1 answer
Detect unreachable ports for UDP in Erlang
I am looking for a way to detect "port unreachable" errors for outgoing UDP packets in Erlang, so I can eagerly report transport layer errors to the application. I.e, I want to capture ICMP type 3 packets to report to the higher layers that packet…

Ivan Dubrov
- 4,778
- 2
- 29
- 41
4
votes
0 answers
Python3 x Socket - ICMP Echo request - Why my socket is hang up on recv?
I want to send echo request with ICMP and python's socket. I was sending packet. But my program is hang up on recv from socket. Why my socket is hang up?
OS is Windows10.
Launch terminal is admin mode.
# -*- coding: utf-8 -*-
import socket
import…

arai
- 1,251
- 2
- 12
- 17
4
votes
1 answer
Send an UDP packet and receive an ICMP response from router in C
I'm trying write a C program that sends an UDP packet to a given IP adress and waits for an ICMP response of a router telling that the time to live expired. It's kept very simple because I just want to understand the mechanism at first. What I need…

d.hill
- 669
- 3
- 9
- 16
4
votes
0 answers
different behaviour of ICMP in IPv4 and IPv6
I'm using boost asio icmp sockets to send and receive ICMP packets. My code is based on the boost example:
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/icmp/ping.cpp
I tried to do the same in IPv6. I can send ICMP messages…

Christi258
- 51
- 2
4
votes
1 answer
Traceroute: Is the path same for all the probe packets sent?
Traceroute is an application to trace the path from A to B. (A is your location and B is the server you want to trace).
The basic algorithm is as follows:
send UDP with TTL = 1
Server A1 received, and return ICMP packet to A because TTL is…

Pratik Kapoor
- 107
- 5
4
votes
0 answers
Getting a copy of any received ICMP packet with boost asio
My goal is to write a little program in c++ with boost asio that notifies me whenever an ICMP packet is received on any network interface.
The program doesn't print any errors and there are no exceptions.
But it also doesn't receive any ICMP packets…

MaxGockel
- 41
- 1
4
votes
1 answer
Flaw in ICMP holepunching?
How is ICMP NAT traversal supposed to work if the NAT device in question rewrites outbound ICMP packets?
Diagram
=========================================================================================
| CLIENT | <---> | NAT-C | <---> { internet…

mxxk
- 9,514
- 5
- 38
- 46
4
votes
1 answer
How can I send multiple pings at once using Java on Windows without using ping.exe?
My application needs to ping many IP addresses at once for speed of execution of the code. For example, pinging 300 ip addresses that time out after one second would take 5 minutes, whereas if 20 are run at a time, it only will take about 15…

Jdban101
- 367
- 1
- 3
- 21
4
votes
1 answer
Setting ICMP match with POX controller
I'm trying to add a flow entry to a switch using POX controller, my code is:
fm = of.ofp_flow_mod()
fm.match.in_port = 1
fm.priority = 33001
fm.match.dl_type = 0x800
fm.match.nw_src = IPAddr("10.0.0.1")
fm.match.nw_dst =…

Daniel
- 440
- 4
- 13
4
votes
0 answers
Invoking Soap service fails in java, works in soapui
I'm trying to consume a soap service in java.
If I import the wsdl url in SOAPUI, I get the :java.net.ConnectException connection timed out exception.
I saved the WSDL to a file and successfully inported it into SOAPUI.
In SOAPUI, I'm able to…

user1019880
- 41
- 3
4
votes
1 answer
IcmpSendEcho2 fails with fails with WSA_QOS_ADMISSION_FAILURE and ERROR_NOACCESS
I have an application that pings a bunch of servers. It runs great for days, but suddenly will have many failures of one of two types:
WSA_QOS_ADMISSION_FAILURE (11010) "A QoS error occurred due to lack of resources"
or
ERROR_NOACCESS (998)…

DougN
- 4,407
- 11
- 56
- 81