java.lang.Object
org.freenetproject.ForwardPort
net.i2p.router.transport.UPnP.IPv6ForwardPort
Enclosing class:
UPnP

static class UPnP.IPv6ForwardPortextends ForwardPort
IPv6-specific port forwarding configuration. Extended to store the requested IP to be forwarded.
  • Field Details

    • _ip

      private final String _ip
      The external IP address we mapped.
    • _uid

      private int _uid
      Device id of the mapping, -1 if unknown.
    • _expires

      private long _expires
      When the mapping lease expires.
  • Constructor Details

    • IPv6ForwardPort

      public IPv6ForwardPort(String name, int protocol, int port, String ip)
      Port forwarding entry for the given IPv6 address.
      Parameters:
      name - the tunnel description to show in the UPnP device's port mapping
      protocol - the IP protocol number to forward
      port - the port number to forward
      ip - the IPv6 address being forwarded, non-null
  • Method Details

    • getIP

      public String getIP()
      The forwarded IPv6 address.
      Returns:
      the IP address
    • getUID

      public int getUID()
      Unique ID of the pinhole.
      Returns:
      0-65535 or -1 if unset
    • setUID

      public void setUID(int uid)
      Unique ID of the pinhole.
      Parameters:
      uid - 0-65535
    • getExpiration

      public long getExpiration()
      Expiration time of the pinhole.
      Returns:
      absolute time or 0 if unset
    • setExpiration

      public void setExpiration(long expires)
      Expiration time of the pinhole.
      Parameters:
      expires - the expiry as an absolute time, or 0 for no expiry
    • hashCode

      public int hashCode()
      The hash code for this forward port.
      Overrides:
      hashCode in class ForwardPort
      Returns:
      the hash code
    • equals

      public boolean equals(Object o)
      Ignores UID.
      Overrides:
      equals in class ForwardPort
    • toString

      public String toString()
      String representation of this forward port.
      Overrides:
      toString in class Object