rice.pastry.socket.nat.sbbi
Class SBBINatHandler
java.lang.Object
rice.pastry.socket.nat.sbbi.SBBINatHandler
- All Implemented Interfaces:
- NATHandler
public class SBBINatHandler
- extends java.lang.Object
- implements NATHandler
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_PORT
public static final int MAX_PORT
- See Also:
- Constant Field Values
SBBINatHandler
public SBBINatHandler(Environment env,
java.net.InetAddress localAddress)
findFireWall
public java.net.InetAddress findFireWall(java.net.InetAddress bindAddress)
throws java.io.IOException
- Description copied from interface:
NATHandler
- Search for the firewall on the NIC specified by the bindAddress
- Specified by:
findFireWall
in interface NATHandler
- Parameters:
bindAddress
- the network to find the firewall on
- Returns:
-
- Throws:
java.io.IOException
findAvailableFireWallPort
public int findAvailableFireWallPort(int internal,
int external,
int tries,
java.lang.String appName)
throws java.io.IOException
- Description copied from interface:
NATHandler
- 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.
- Specified by:
findAvailableFireWallPort
in interface NATHandler
- Returns:
-
- Throws:
java.io.IOException
openFireWallPort
public void openFireWallPort(int local,
int external,
java.lang.String appName)
throws java.io.IOException
- Specified by:
openFireWallPort
in interface NATHandler
- Throws:
java.io.IOException
getFireWallExternalAddress
public java.net.InetAddress getFireWallExternalAddress()
- Description copied from interface:
NATHandler
- The neame of the firewall's external address. null if there is no firewall.
- Specified by:
getFireWallExternalAddress
in interface NATHandler
- Returns:
Copyright © 2001-2005 - Rice Pastry.