rice.pastry.socket.nat
Interface NATHandler

All Known Implementing Classes:
SBBINatHandler, StubNATHandler

public interface NATHandler

This is supposed to open a hole in the Firewall, usually using UPnP.

Author:
Jeff Hoye

Method Summary
 int findAvailableFireWallPort(int internal, int external, int tries, String appName)
          Search for an available port forwarding, starting with the external address specified.
 InetAddress findFireWall(InetAddress bindAddress)
          Search for the firewall on the NIC specified by the bindAddress
 InetAddress getFireWallExternalAddress()
          The neame of the firewall's external address.
 void openFireWallPort(int local, int external, String appName)
           
 

Method Detail

findFireWall

InetAddress findFireWall(InetAddress bindAddress)
                         throws IOException
Search for the firewall on the NIC specified by the bindAddress

Parameters:
bindAddress - the network to find the firewall on
Returns:
Throws:
IOException

getFireWallExternalAddress

InetAddress getFireWallExternalAddress()
The neame of the firewall's external address. null if there is no firewall.

Returns:

findAvailableFireWallPort

int findAvailableFireWallPort(int internal,
                              int external,
                              int tries,
                              String appName)
                              throws IOException
Search for an available port forwarding, starting with the external address specified. The internal one is given so you can detect that the rule was already in place.

Parameters:
internal -
external -
Returns:
Throws:
IOException

openFireWallPort

void openFireWallPort(int local,
                      int external,
                      String appName)
                      throws IOException
Throws:
IOException


Copyright © 2010. All Rights Reserved.