Rice Pastry API

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, java.lang.String appName)
          Search for an available port forwarding, starting with the external address specified.
 java.net.InetAddress findFireWall(java.net.InetAddress bindAddress)
          Search for the firewall on the NIC specified by the bindAddress
 java.net.InetAddress getFireWallExternalAddress()
          The neame of the firewall's external address.
 void openFireWallPort(int local, int external, java.lang.String appName)
           
 

Method Detail

findFireWall

java.net.InetAddress findFireWall(java.net.InetAddress bindAddress)
                                  throws java.io.IOException
Search for the firewall on the NIC specified by the bindAddress

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

getFireWallExternalAddress

java.net.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,
                              java.lang.String appName)
                              throws java.io.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:
java.io.IOException

openFireWallPort

void openFireWallPort(int local,
                      int external,
                      java.lang.String appName)
                      throws java.io.IOException
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection