java.lang.Object
org.freenetproject.ForwardPort
- Direct Known Subclasses:
UPnP.IPv6ForwardPort
A public Internet Protocol port on the node which needs to be forwarded if the node is NATed.
Field Summary
Modifier and TypeFieldDescriptionprivate final intPrecomputed hash of the forwarding rule.final booleanIPv4 vs IPv6?final StringName of the interface e.g.final intPort number to forwardfinal intProtocol number.static final intPROTOCOL_TCP_IPV4.static final intPROTOCOL_UDP_IPV4.Constructor Summary
ConstructorsConstructorDescriptionForwardPort(String name, boolean isIP6, int protocol, int portNumber) Records one interface, protocol and port to forward, and its hash.Method Summary
All Methods
Field Details
name
Name of the interface e.g. "opennet"isIP6
public final boolean isIP6IPv4 vs IPv6?protocol
public final int protocolProtocol number. See constants.PROTOCOL_UDP_IPV4
PROTOCOL_TCP_IPV4
portNumber
public final int portNumberPort number to forwardhashCode
private final int hashCodePrecomputed hash of the forwarding rule. The rule names no internal interface - binding to one would be complicated, as different interfaces may be on different LANs and an IGD is normally on only one LAN.
Constructor Details
ForwardPort
Records one interface, protocol and port to forward, and its hash.- Parameters:
name- name of the interface the port belongs to, e.g. "opennet"isIP6- true for an IPv6 port, false for IPv4protocol- IP protocol number, PROTOCOL_UDP_IPV4 or PROTOCOL_TCP_IPV4portNumber- port to forward, on the named interface
Method Details
hashCode
equals