Questions tagged [icmp]

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

583 questions
11
votes
3 answers

Sending ICMP packets in a C program

I'm trying to create an ICMP ping test program in C but am having difficulties with successfully sending the packets. The sendto function returns the # of bytes and everything but no packets are actually sent. I've verified this with WireShark on…
Zac
  • 2,325
  • 3
  • 23
  • 33
11
votes
3 answers

Problem with isReachable in InetAddress class

As an assignment I have to find all the alive computers on a LAN. For which I am using isReachable function of InetAddress class. But problem is that nothing is shown reachable to me. So I tried to have isReachable with Google's IP but still this…
codeomnitrix
  • 4,179
  • 19
  • 66
  • 102
9
votes
1 answer

What is the proper process for ICMP echo request/reply on unreachable destinations?

Goal: I need to be able to ping a network switch to determine whether or not it is available. This is meant to tell the user that either the network cabling is unplugged, the network switch is unavailable, or some other problem lies within the…
user1298780
  • 109
  • 1
  • 2
  • 4
9
votes
2 answers

How do I implement ICMP ping in Ruby using only the standard the socket library?

It should be possible send and receive ICMP packets using the Ruby socket library but I do not see any good documentation on this. I do not want to use net-ping, icmp, ping, and all of these other libraries that either fail because of cross-platform…
Beaon
  • 347
  • 1
  • 4
  • 16
9
votes
3 answers

How is an ICMP packet constructed in python

For the sake of learning I am currently trying to create a simple python porgram to send a ICMP ping packet to some device. To get started I looked through the source code of the python module Pyping:…
SjoerdvdBelt
  • 190
  • 1
  • 3
  • 12
9
votes
2 answers

Trace Routing for a Certain port

Before saying anything let me tell you that i am not well educated int networks related subjects. I am a software developer and I have written and exposed a Service on HTTPS at port 8000. Now i want to know that if there is any kind of software…
Mubashar
  • 12,300
  • 11
  • 66
  • 95
8
votes
4 answers

How to enable Ping(ICMP) on Azure

In Windows Azure role, I cannot ping out D:\Users\foglight>ping www.google.com Pinging www.l.google.com [209.85.143.104] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for…
Xilang
  • 1,513
  • 3
  • 18
  • 36
8
votes
3 answers

what would cause ICMPsendEcho to fail when ping.exe succeeds

I have an interesting situation on my hands, and I'm not quite sure how to go about troubleshooting it. I did a few searches for something similar to my situation, but nothing quite matches it. If the answer already exists somewhere here, I would…
PoultrySlave
  • 193
  • 1
  • 7
8
votes
7 answers

Listen for ICMP packets in C#

I have a SIP application that needs to send UDP packets to set up the SIP calls. SIP has a timeout mechanism to cope with delivery failures. An additional thing I would like to be able to do is detect whether a UDP socket is closed in order having…
sipsorcery
  • 30,273
  • 24
  • 104
  • 155
8
votes
0 answers

Rust OSError 22, Invalid argument when writing valid data to socket

I'm struggling to understand why I'm getting this error from a part of my program which sends ICMP echo requests on the network. The starnge thing about this is that I can get it to work by letting the socket handle the IP header, but when I set the…
8
votes
2 answers

How to ping using C sockets

Compiler: Code::Blocks(GNU GCC) Platform: Windows(x86) Includes: winsock.h winsock2.h (ws2_32 is linked as well) I am currently trying to write a program that will read a text file containing a list of IP-Addresses and ping each IP-Addresses…
John Vulconshinz
  • 1,088
  • 4
  • 12
  • 29
8
votes
2 answers

Traceroute: Can it trace a path from A to B correctly?

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). In Windows, you can type tracert. The main algorithm is: send UDP with TTL = 1 Server A1 received, and return ICMP packet to A…
hqt
  • 29,632
  • 51
  • 171
  • 250
7
votes
4 answers

Ping with java to multiplatform

I need to perform ping to some ip/machine. The code may be executed on any kind of platform (windows, linux, mac) and i need to get the information about loss and the round trip time. so java's exec of ping is not good enough because then i need to…
Sophie
  • 1,580
  • 3
  • 16
  • 20
7
votes
1 answer

Request timeout for icmp_seq on MacOS

It all started when I was trying to connect to a VM setup on GCP for SFTP only. Everytime I try to check SSH or setup an SFTP on this machine, it becomes unreachable (and its reachable and well connected on my friend's laptop at the same time). Ping…
Harman
  • 145
  • 1
  • 2
  • 10
7
votes
2 answers

How to ICMPs and traceroutes in Java

Java does not have primitives for ICMPs and traceroute. How to overcome this? Basically I'm building code that should run in *nix and Windows, and need a piece of code that will run in both platforms.
Ricardo
  • 1,391
  • 4
  • 15
  • 24
1
2
3
38 39