Package zombie.core.znet
Class PortMapper
java.lang.Object
zombie.core.znet.PortMapper
public class PortMapper
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description PortMapper()
-
Method Summary
Modifier and Type Method Description static boolean
addMapping(int wanPort, int lanPort, java.lang.String description, java.lang.String proto, int leaseTime)
static boolean
addMapping(int wanPort, int lanPort, java.lang.String description, java.lang.String proto, int leaseTime, boolean force)
static boolean
discover()
static void
fetchMappings()
static java.lang.String
getExternalAddress()
static java.lang.String
getExternalAddress(boolean forceUpdate)
static java.lang.String
getGatewayInfo()
static PortMappingEntry
getMapping(int index)
static boolean
igdFound()
static int
numMappings()
static boolean
removeMapping(int wanPort, java.lang.String proto)
static void
shutdown()
static void
startup()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PortMapper
public PortMapper()
-
-
Method Details
-
startup
public static void startup() -
shutdown
public static void shutdown() -
discover
public static boolean discover() -
igdFound
public static boolean igdFound() -
addMapping
public static boolean addMapping(int wanPort, int lanPort, java.lang.String description, java.lang.String proto, int leaseTime) -
addMapping
public static boolean addMapping(int wanPort, int lanPort, java.lang.String description, java.lang.String proto, int leaseTime, boolean force) -
removeMapping
public static boolean removeMapping(int wanPort, java.lang.String proto) -
fetchMappings
public static void fetchMappings() -
numMappings
public static int numMappings() -
getMapping
-
getGatewayInfo
public static java.lang.String getGatewayInfo() -
getExternalAddress
public static java.lang.String getExternalAddress(boolean forceUpdate) -
getExternalAddress
public static java.lang.String getExternalAddress()
-