org.freenetproject
Class DetectedIP

java.lang.Object
  extended by org.freenetproject.DetectedIP

public class DetectedIP
extends java.lang.Object

Class returned by a FredPluginIPDetector. Indicates: - Whether there is no UDP connectivity at all. - Whether there is full inbound IP connectivity. - A list of detected public IPs.


Field Summary
static short FULL_CONE_NAT
          Full cone NAT.
static short FULL_INTERNET
          Full internet access!
 int mtu
          The MTU as advertized by the JVM
 short natType
           
static short NO_UDP
          No UDP connectivity at all
static short NOT_SUPPORTED
          The plugin does not support detecting the NAT type.
static short PORT_RESTRICTED_NAT
          Port restricted cone NAT.
 java.net.InetAddress publicAddress
           
static short RESTRICTED_CONE_NAT
          Restricted cone NAT.
static short SYMMETRIC_NAT
          Symmetric NAT.
static short SYMMETRIC_UDP_FIREWALL
          Symmetric UDP firewall.
 
Constructor Summary
DetectedIP(java.net.InetAddress addr, short type)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

publicAddress

public final java.net.InetAddress publicAddress

natType

public final short natType

mtu

public int mtu
The MTU as advertized by the JVM


NOT_SUPPORTED

public static final short NOT_SUPPORTED
The plugin does not support detecting the NAT type.

See Also:
Constant Field Values

FULL_INTERNET

public static final short FULL_INTERNET
Full internet access!

See Also:
Constant Field Values

FULL_CONE_NAT

public static final short FULL_CONE_NAT
Full cone NAT. Once we have sent a packet out on a port, any node anywhere can send us a packet on that port. The nicest option, but very rare unfortunately.

See Also:
Constant Field Values

RESTRICTED_CONE_NAT

public static final short RESTRICTED_CONE_NAT
Restricted cone NAT. Once we have sent a packet out to a specific IP, it can send us packets on the port we just used.

See Also:
Constant Field Values

PORT_RESTRICTED_NAT

public static final short PORT_RESTRICTED_NAT
Port restricted cone NAT. Once we have sent a packet to a specific IP+Port, that IP+Port can send us packets on the port we just used.

See Also:
Constant Field Values

SYMMETRIC_NAT

public static final short SYMMETRIC_NAT
Symmetric NAT. Uses a separate port number for each IP+port ! Not much hope for symmetric to symmetric...

See Also:
Constant Field Values

SYMMETRIC_UDP_FIREWALL

public static final short SYMMETRIC_UDP_FIREWALL
Symmetric UDP firewall. We are not NATed, but the firewall behaves as if we were.

See Also:
Constant Field Values

NO_UDP

public static final short NO_UDP
No UDP connectivity at all

See Also:
Constant Field Values
Constructor Detail

DetectedIP

public DetectedIP(java.net.InetAddress addr,
                  short type)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object