ICMP Ping

leo lencioni <>
Mon Feb 7 16:25:52 CET 2005


Thanks to all, for your responses. 

I found another alternative to doing and ICMP ECHO PING. 

In the new Java 1.5 SDK,  the InetAddress Object has a new method call
isReachable (see
http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html), 
that tries to execute a n ICMP ping. Sun documentation is not very
clear if it will always execute an ICMP ECHO REQUEST in all cases. It
appears that it is an implementation dependant thing

So for my first try to this I will write a small java program that
will execute a isReachable method . Communications between erlang and
Java program will be based on standard tcp sockets.


On Sat, 05 Feb 2005 11:54:56 -0800 (PST), Luke Gorrie <> wrote:
> Matthias Lang <> writes:
> 
> > leo lencioni writes:
> >
> >  > > > 1) Can erlang generate and send an ICMP Echo request?
> >
> > klacke writes:
> >  > > An alternative could
> >  > > be to use the tun/tap driver found in jungerl, that could
> >  > > sureley be used to introduce raw IP packets on the network.
> >  > > To read the packet, you'd have to setup your routes i  such
> >  > > a way so that return packets find their way up to userspace.
> >
> > A further alternative which may be of use is:
> >
> >   http://www.snookles.com/erlang/edtk/edtk-1.0/examples/libnet/
> >
> > it appears to have an example which sends ping packets.
> 
> An even further alternative is the lib/psocket program in jungerl.
> That's a port program that opens a PF_PACKET socket to read/write
> ethernet frames on existing interfaces. Could perhaps be easily
> changed to use some IP-level raw socket interface, I dunno.
> 
> -Luke
> 
>



More information about the erlang-questions mailing list