    public static void main(String args[]) throws InterruptedException {
        if (args.length != 1) {
            System.err.println("Usage: java TestPingers hostname");
            System.exit(2);
        }
        ClientInfo this_client = new ClientInfo(ClientInfo.m_cookie_name+"={user=bobafett;uuid=fatalapouet};path=/;expires=eventually");
        if (this_client.getNickname() == null)
            this_client.setNickname("bobafett");
        InetAddress my_local_addr = this_client.getAddress();
        InetAddress my_global_addr = null;
        try {
            my_global_addr = this_client.getExternalAddress();
        }
        catch (RuntimeException e) {
            System.err.println("Warning: could not get external address.");
        }
        InetAddress target = null;
        try {
            target = InetAddress.getByName(args[0]);
        }
        catch (UnknownHostException e) {
            System.err.println("Error: could not get address for host '" + args[0] + "'.");
            System.exit(1);
        }
        if (target != null) {
            System.out.println("\nStarting pings...");
            TcpPinger this_tcp_pinger = new TcpPinger(this_client);
            IcmpPinger this_pinger = new IcmpPinger(this_client);
            TraceRouter this_router = new TraceRouter(this_client);
            String text_local_addr = my_local_addr.toString().split("/")[1];
            String text_global_addr;
            if (my_global_addr != null)
                text_global_addr = my_global_addr.toString().split("/")[1];
            else
                text_global_addr = "<unknown>";
            this_pinger.ping(target);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_pinger.getLastPings());
            this_router.trace(target);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_router.getLastTrace());
            this_tcp_pinger.ping(target,50);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_tcp_pinger.getLastPings());
        }
        System.out.println(this_client.getPreferences());
    }

    public static void main(String args[]) throws InterruptedException {
        if (args.length != 1) {
            System.err.println("Usage: java TestPingers hostname");
            System.exit(2);
        }
        ClientInfo this_client = new ClientInfo(ClientInfo.m_cookie_name+"={user=bobafett;uuid=fatalapouet};path=/;expires=eventually");
        if (this_client.getNickname() == null)
            this_client.setNickname("bobafett");
        InetAddress my_local_addr = this_client.getAddress();
        InetAddress my_global_addr = null;
        try {
            my_global_addr = this_client.getExternalAddress();
        }
        catch (RuntimeException e) {
            System.err.println("Warning: could not get external address.");
        }
        InetAddress target = null;
        try {
            target = InetAddress.getByName(args[0]);
        }
        catch (UnknownHostException e) {
            System.err.println("Error: could not get address for host '" + args[0] + "'.");
            System.exit(1);
        }
        if (target != null) {
            System.out.println("\nStarting pings...");
            TcpPinger this_tcp_pinger = new TcpPinger(this_client);
            IcmpPinger this_pinger = new IcmpPinger(this_client);
            TraceRouter this_router = new TraceRouter(this_client);
            String text_local_addr = my_local_addr.toString().split("/")[1];
            String text_global_addr;
            if (my_global_addr != null)
                text_global_addr = my_global_addr.toString().split("/")[1];
            else
                text_global_addr = "<unknown>";
            this_pinger.probe(target);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_pinger.getLastProbe());
            this_router.probe(target);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_router.getLastProbe());
            this_tcp_pinger.probe(target,50);
            System.out.println(text_local_addr + " " +
                               text_global_addr + " " +
                               this_tcp_pinger.getLastProbe());
        }
        System.out.println(this_client.getPreferences());
    }
