org.freenetproject

## Class ForwardPort

- java.lang.Object
- - org.freenetproject.ForwardPort

- Direct Known Subclasses:
    UPnP.IPv6ForwardPort

      public class ForwardPort
      extends Object

  A public Internet Protocol port on the node which needs to be forwarded if the node is NATed.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `isIP6` IPv4 vs IPv6?
    `String` | `name` Name of the interface e.g.
    `int` | `portNumber` Port number to forward
    `int` | `protocol` Protocol number.
    `static int` | `PROTOCOL_TCP_IPV4`
    `static int` | `PROTOCOL_UDP_IPV4`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForwardPort(String name, boolean isIP6, int protocol, int portNumber)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `hashCode()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### isIP6

          public final boolean isIP6

      IPv4 vs IPv6?

    - #### name

          public final String name

      Name of the interface e.g. "opennet"

    - #### portNumber

          public final int portNumber

      Port number to forward

    - #### protocol

          public final int protocol

      Protocol number. See constants.

    - #### PROTOCOL_TCP_IPV4

          public static final int PROTOCOL_TCP_IPV4

      See Also:
        Constant Field Values

    - #### PROTOCOL_UDP_IPV4

          public static final int PROTOCOL_UDP_IPV4

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ForwardPort

          public ForwardPort(String name,
                             boolean isIP6,
                             int protocol,
                             int portNumber)

  - ### Method Detail

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`