Questions tagged [icmp]

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

583 questions
6
votes
4 answers

Use ping through SOCKS server?

I'd like to periodicity check if my SOCKS server is working fine. In order to do that, I thought of pinging 8.8.8.8 (google DNS server) through the SOCKS server. Is there other recommended way? If it's optimal, how can I ping through SOCKS with…
iTayb
  • 12,373
  • 24
  • 81
  • 135
6
votes
3 answers

Writing a basic traceroute script in C

I have to write a trceroute script but I'm not sure if my attempts are correct. Right now I'm doing it like that (please correct me if I'm doing wrong or clumsy): Got an struct for ip- and udpheader A checksum function Opening 2 sockets: One for…
d.hill
  • 669
  • 3
  • 9
  • 16
6
votes
3 answers

How to ping an IP address in Delphi 10.1 without using Indy components?

How to ping an IP address (or by server name) in Delphi 10.1 without using Indy components? TIdICMPClient works with elevated privileges but I want to do it as a normal user.
ssh
  • 943
  • 1
  • 14
  • 23
6
votes
1 answer

set socket option is why so important for a socket (IP_HDRINCL) In ICMP request?

I am new to socket programming I saw a ICMP request program , in that they used setsockopt to a socket int on = 1; setsockopt(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) but even if I do not use this statement, the program runs correctly. Why is…
Siva Kannan
  • 2,237
  • 4
  • 27
  • 39
6
votes
2 answers

Cannot ping/communicate with Android devices on the same network

I have a nexus 7 running CM10.1 . For some reason i cannot reach it from my laptop on the same wifi network. I cannot ping in either direction. In the past i have been only able to ping one way. Just tried out on my stock htc sensation and havent…
Luke De Feo
  • 2,025
  • 3
  • 22
  • 40
6
votes
1 answer

Implementing traceroute using icmp in C

I am trying to implement traceroute using icmp raw sockets by constructing the appropriate ip header and icmp header.The port number i am using is 7 and i have calculated the checksums.The hop limit is incremented each time and a packet is sent till…
Sr1n4th
  • 251
  • 2
  • 8
6
votes
1 answer

python with unprivileged ping in linux IPPROTO_ICMP

according to http://kernelnewbies.org/Linux_3.0#head-c5bcc118ee946645132a834a716ef0d7d05b282e we can now ping as an unprivileged user, and I can sort of get it to work. using https://github.com/jedie/python-ping I modified line 210 to look…
chesty
  • 83
  • 6
6
votes
3 answers

size of ICMP type 11 packet payload

What's the size of the ICMP packet payload when the type is 11, i.e. time exceeded? Since it contains an IP header and the first 8 Bytes of the IP packet payload generating the ICMP message, I thought its size was 20 + 8 = 28. I'm replaying some…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
6
votes
1 answer

not getting all ICMP time-exceeded messages: why?

I'm using Scapy to replay some dumped packets in which I change the TTL value. I've been getting very odd results even with TTL=1. When I run my test hours apart from each other, I can get from roughly 40% to 95% of packets replied to with an…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
5
votes
1 answer

Why aren't ARP or ICMPv6 packets processed by a Linux TAP device

I am opening a TAP device using p->fd = open("/dev/net/tun", O_RDWR); // skipping error handling code ifr.ifr_flags = IFF_TAP | IFF_ONE_QUEUE | IFF_NO_PI; strncpy(ifr.ifr_name, p->name, IFNAMSIZ-1); result = ioctl(p->fd, TUNSETIFF, &ifr); //…
aufather
  • 651
  • 2
  • 7
  • 9
5
votes
3 answers

How do I validate the ICMPv6 checksum? (Why am do I keep getting a checksum of 0x3fff?)

I'm working on a Linux userspace program that receives IPv6 router advertisement packets. As part of RFC4861 I need to verify the ICMPv6 checksum. Based on my research, most of which refers to the refers to the IP checksum in general if you compute…
dlundquist
  • 829
  • 9
  • 13
5
votes
2 answers

Path MTU discovery - where are ICMP responses?

I'm doing some experiments with path MTU discovery in Linux. As far as I understood from RFC 1191, if a router receives a packet with non-zero DF bit and the packet can't be sent to the next host without fragmentation, then the router should drop…
Rom098
  • 2,445
  • 4
  • 35
  • 52
5
votes
2 answers

Problem with pinging broadcast address

When I try to ping the broadcast address on my LAN, it shows ICMP replies from only 3 hosts, everytime, even though there many hosts connected to the LAN. For the broadcast address, I did $ifconfig eth0 eth0 Link encap:Ethernet HWaddr…
pflz
  • 1,891
  • 4
  • 26
  • 32
5
votes
1 answer

How to listen for ICMP packets?

I'm working on a two part application where one side sends ICMP packets and the other side listens for the ICMP packets and takes action when it receives them. The problem is, I'm not sure how to keep the listener alive indefinitely (just want it…
kkirsche
  • 1,217
  • 2
  • 15
  • 38
5
votes
1 answer

udp client sending ICMP "port unreachable" when receiveing messages from the server

Moved: https://superuser.com/questions/782549/udp-client-sending-icmp-port-unreachable-when-receiveing-messages-from-the-ser I have a udp client using luasocket, basically doing this (with a few layers of abstraction, but this is what's going on…
nonchip
  • 1,084
  • 1
  • 18
  • 36
1 2
3
38 39