Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.
Questions tagged [icmp]
583 questions
0
votes
1 answer
Get exact size of IPv6 header including the extenstion headers
If IPv4 is in question and I want to extract IP and ICMP header out of std::istream, first I get the initial 20 bytes, then check if the header lenght provided in the IPv4 header is larger than 20 bytes in order to extract any options. The next…

Marcus Frenkel
- 691
- 10
- 19
0
votes
1 answer
Spoofing an echo reply
Given that I'm on a local network, if I can capture a ICMP echo request packet, and considering that I want to spoof a echo reply, what part of the original packet would I need to change supposing I make a copy of the original before i send it back?…

Jake
- 2,877
- 8
- 43
- 62
0
votes
2 answers
What is the actual use of mac address on internet?
I was learning about spoofing attacks and now confused on IP and MAC addreses. I learned that every packets(TCP, ICMP, etc..) send from a computer have an Ethernet header which contain mac address of source and destination (Hope I'm right). Is mac…

Rahul K
- 665
- 10
- 25
0
votes
1 answer
NDP (icmpV6) Implementation: Duplicate packets send by Kernel
I have tried to develop and implement NDP(Neighbor Discovery Protocol) in Linux based PC's referring RFC 4861.
I have created a socket socket (AF_INET6, SOCK_RAW, IPPROTO_IPV6). NS/NA packet (ipv6 header + icmpv6 header+options) are filled and send…
0
votes
1 answer
Perl ping with tcp protocol
I am using the perl module Net::Ping to ping a set of remote hosts. I am using the default protocol, i.e. the tcp one. I am unable to ping 1 particular remote machine using this protocol.
Unix ping works fine, and so does the icmp protocol.
What…

user1534235
- 161
- 3
- 16
0
votes
1 answer
Pinging a website through a proxy server( with authentication) using Python
I'm new and just learning the ropes with python programming and this was something I'm trying to do.
My internet is through a proxy server which requires authentication. How do I ping a website, for example 'www.google.com' using Python and check if…

user1637744
- 13
- 2
- 5
0
votes
1 answer
matching data packets and ICMP packets in case of TCP duplicates
I'm trying to match data packets with the ICMP time-exceeded packets they triggered. Therefore, I'm comparing 28-byte-long strings of each data packet (IP header + 8B of payload) with all (28-byte-long) ICMP payloads.
I'm having problems when I'm…

Ricky Robinson
- 21,798
- 42
- 129
- 185
0
votes
1 answer
Does Scapy bypass Dummynet?
Does Scapy bypass Dummynet (IPFW in general)?
It really looks like it does. I'm adding a large extra delay to each outgoing and incoming packet, and everything slows down apart from packets sent with Scapy.
$ ipfw add pipe 1 from any to any
$ ipfw…

Ricky Robinson
- 21,798
- 42
- 129
- 185
0
votes
1 answer
How to set a source address for ICMP messages in Python?
I'm trying to change this implementation of ping so I can set a different source address for the messages.
What I want to do is exactly the same thing that the -S option of the original ping can do:
ifconfig em0 10.0.1.1 netmask 255.255.255.0…

gcomte
- 51
- 1
- 7
0
votes
1 answer
TcpClient timeout ICMP port unreachable
I got the following code:
TcpClient client = new TcpClient("server", 5555);
The server immediately sends back a ICMP port-unreachable but the program is taking about 30 seconds until it times out with a 10054 Error.
I turned the firewall off and…

Zulakis
- 7,859
- 10
- 42
- 67
0
votes
1 answer
Windows socket error 10013
Here is the code of program, which should send a simple 'ping'. I know that i could use IcmpSendEcho2() function, but i decide to do this this way:
struct ICMPh
{
unsigned char typ;
unsigned char kod;
unsigned short suma_spr;
unsigned short…

Ufo
- 225
- 5
- 17
0
votes
1 answer
How to use IcmpSendEcho2 with PIO_APC_ROUTINE?
I'm a c++ newbie and I'm trying to make a "ping tool" with IcmpSendEcho2 but I can't make it to work with APCs.
I'm running into this compiling error:
>error C2220: warning treated as error - no 'object' file generated
>warning C4191: 'type cast' :…

Rui
- 494
- 1
- 6
- 20
0
votes
1 answer
How Traceroute can know domain name of Hops?
I'm studying the ICMP protocol and the tool traceroute. I don't understand how can traceroute look up the domain names of Hops if in the ICMP datagram only the IPs can be found. How does it work?
Thank you!

synack
- 1,699
- 3
- 24
- 50
0
votes
2 answers
Comparison of ICMP and SNMP ping in terms of traffic?
I have 100 devices that I want to know the status of every 10 seconds. Can you tell me whether it would be better to use ICMP or SNMP in terms of traffic load, or are they all the same in clogging up the network?

Bashir Beikzadeh
- 761
- 8
- 15
0
votes
1 answer
ICMP traceroute in Python
I am trying to implement an ICMP based Traceroute in Python.
I found a very helpful guide ( https://blogs.oracle.com/ksplice/entry/learning_by_doing_writing_your ) that has allowed me to create a UDP based Traceroute (code below) so just needs…

Jamesla
- 1,378
- 7
- 31
- 62