Savarese.Org

example
Class Ping

java.lang.Object
  extended by example.Ping

public class Ping
extends java.lang.Object

The Ping class is a simple demo showing how you can send ICMP echo requests and receive echo replies using raw sockets. It has been updated to work with both IPv4 and IPv6.

Note, this is not a model of good programming. The point of the example is to show how the RawSocket API calls work. There is much kluginess surrounding the actual packet and protocol handling, all of which is outside of the scope of what RockSaw does.

Author:
Daniel F. Savarese

Nested Class Summary
static interface Ping.EchoReplyListener
           
static class Ping.Pinger
           
static class Ping.PingerIPv6
           
 
Constructor Summary
Ping()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ping

public Ping()
Method Detail

main

public static final void main(java.lang.String[] args)
                       throws java.lang.Exception
Throws:
java.lang.Exception

Savarese.Org

Copyright © 2004-2007 Daniel F. Savarese. All Rights Reserved.