## Uses of Class
net.i2p.router.transport.udp.RemoteHostId

- Packages that use RemoteHostId
  Package | Description
  --- | ---
  net.i2p.router.transport.udp | The UDP transport (also known as 'SSU' or Secure Semi-reliable UDP transport) for I2P, allowing I2P messages to be passed over UDP connections.

- - ### Uses of RemoteHostId in net.i2p.router.transport.udp

    Fields in net.i2p.router.transport.udp declared as RemoteHostId
    Modifier and Type | Field and Description
    --- | ---
    `protected RemoteHostId` | InboundEstablishState.`_remoteHostId`
    `protected RemoteHostId` | OutboundEstablishState.`_remoteHostId`
    `protected RemoteHostId` | PeerState.`_remoteHostId` cached RemoteHostId, used to find the peerState by remote info

    Methods in net.i2p.router.transport.udp that return RemoteHostId
    Modifier and Type | Method and Description
    --- | ---
    `(package private) RemoteHostId` | OutboundEstablishState.`getClaimedAddress()` This will never be a hash-based address.
    `(package private) RemoteHostId` | UDPPacket.`getRemoteHost()` Lazily obtains the `RemoteHostId` representing the sender's address and port.
    `(package private) RemoteHostId` | InboundEstablishState.`getRemoteHostId()` RemoteHostId, uniquely identifies an attempt
    `RemoteHostId` | SSU2Sender.`getRemoteHostId()`
    `(package private) RemoteHostId` | OutboundEstablishState.`getRemoteHostId()` This should be what the state is currently indexed by in the _outboundStates table.
    `RemoteHostId` | PeerStateDestroyed.`getRemoteHostId()`
    `RemoteHostId` | PeerState.`getRemoteHostId()`

    Methods in net.i2p.router.transport.udp with parameters of type RemoteHostId
    Modifier and Type | Method and Description
    --- | ---
    `void` | EstablishmentManager.`addOutboundToken(RemoteHostId peer, long token, long expires)` Remember a token that can be used later to connect to the peer
    `UDPPacket` | PacketBuilder2.`buildRetryPacket(RemoteHostId to, SocketAddress toAddr, long destID, long srcID, int terminationCode)` Build a new Retry packet with a termination code, for a rejection direct from the EstablishmentManager.
    `(package private) void` | PeerState2.`changeAddress(RemoteHostId id)` Caller should sync; UDPTransport must remove and add to peersByRemoteHost map
    `(package private) void` | UDPTransport.`changePeerAddress(PeerState2 peer, RemoteHostId newAddress)` Remove and add to peersByRemoteHost map
    `(package private) InboundEstablishState` | EstablishmentManager.`getInboundState(RemoteHostId from)` Grab the active establishing state
    `EstablishmentManager.Token` | EstablishmentManager.`getInboundToken(RemoteHostId peer)` Get a token that can be used later for the peer to connect to us
    `EstablishmentManager.Token` | EstablishmentManager.`getInboundToken(RemoteHostId peer, long expiration)` Get a token that can be used later for the peer to connect to us.
    `(package private) OutboundEstablishState` | EstablishmentManager.`getOutboundState(RemoteHostId from)` Grab the active establishing state
    `long` | EstablishmentManager.`getOutboundToken(RemoteHostId peer)` Get a token to connect to the peer
    `(package private) PeerState` | UDPTransport.`getPeerState(RemoteHostId hostInfo)` Retrieves the current connection state for a peer identified by their remote host and port.
    `(package private) List<PeerState>` | UDPTransport.`getPeerStatesByIP(RemoteHostId hostInfo)` Get the states for all peers at the given remote host, ignoring port.
    `void` | SSU2Payload.PayloadCallback.`gotPathChallenge(RemoteHostId from, byte[] data)`
    `void` | OutboundEstablishState2.`gotPathChallenge(RemoteHostId from, byte[] data)`
    `void` | InboundEstablishState2.`gotPathChallenge(RemoteHostId from, byte[] data)`
    `void` | PeerStateDestroyed.`gotPathChallenge(RemoteHostId from, byte[] data)`
    `void` | PeerState2.`gotPathChallenge(RemoteHostId from, byte[] data)`
    `void` | SSU2Payload.PayloadCallback.`gotPathResponse(RemoteHostId from, byte[] data)`
    `void` | OutboundEstablishState2.`gotPathResponse(RemoteHostId from, byte[] data)`
    `void` | InboundEstablishState2.`gotPathResponse(RemoteHostId from, byte[] data)`
    `void` | PeerStateDestroyed.`gotPathResponse(RemoteHostId from, byte[] data)`
    `void` | PeerState2.`gotPathResponse(RemoteHostId from, byte[] data)`
    `boolean` | EstablishmentManager.`isInboundTokenValid(RemoteHostId peer, long token)` Is the token from this peer valid?
    `(package private) boolean` | UDPTransport.`isInDropList(RemoteHostId peer)`
    `(package private) PeerState` | UDPTransport.`pickTestPeer(PeerTestState.Role peerRole, int version, boolean isIPv6, RemoteHostId dontInclude)` Pick a Bob (if we are Alice) or a Charlie (if we are Bob).
    `static int` | SSU2Payload.`processPayload(I2PAppContext ctx, SSU2Payload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake, RemoteHostId from)` Incoming payload.
    `(package private) void` | IntroductionManager.`receiveHolePunch(RemoteHostId charlie, byte[] data)` We are Alice and we got this from Charlie.
    `(package private) void` | EstablishmentManager.`receiveHolePunch(RemoteHostId id, UDPPacket packet)` Called from PacketHandler.
    `(package private) void` | PeerStateDestroyed.`receivePacket(RemoteHostId from, UDPPacket packet)`
    `(package private) void` | PeerState2.`receivePacket(RemoteHostId from, UDPPacket packet)` From different than expected source IP/port
    `(package private) void` | EstablishmentManager.`receiveSessionDestroy(RemoteHostId from)` Got a SessionDestroy - maybe during an inbound establish? TODO - PacketHandler won't look up inbound establishes As this packet was essentially unauthenticated (i.e.
    `(package private) void` | EstablishmentManager.`receiveSessionDestroy(RemoteHostId from, OutboundEstablishState state)` Got a SessionDestroy during outbound establish SSU 2
    `(package private) void` | EstablishmentManager.`receiveSessionDestroy(RemoteHostId from, PeerState state)` Got a SessionDestroy on an established conn SSU 2
    `(package private) void` | EstablishmentManager.`receiveSessionOrTokenRequest(RemoteHostId from, InboundEstablishState2 state, UDPPacket packet)` Got a SessionRequest OR a TokenRequest (initiates an inbound establishment) SSU 2 only.
    `void` | PeerTestManager.`receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data)` Entry point for all in-session incoming packets.
    `void` | PeerTestManager.`receiveTest(RemoteHostId from, UDPPacket packet)` Entry point for all out-of-session packets, messages 5-7 only.

    Constructors in net.i2p.router.transport.udp with parameters of type RemoteHostId
    Constructor and Description
    `OutboundEstablishState(RouterContext ctx, RemoteHostId claimedAddress, RemoteHostId remoteHostId, RouterIdentity remotePeer, boolean needIntroduction, SessionKey introKey, UDPAddress addr)` For SSU2
    `OutboundEstablishState2(RouterContext ctx, UDPTransport transport, RemoteHostId claimedAddress, RemoteHostId remoteHostId, RouterIdentity remotePeer, boolean needIntroduction, SessionKey introKey, RouterAddress ra, UDPAddress addr)` Prepare to start a new handshake with the given peer.
    `PeerStateDestroyed(RouterContext ctx, UDPTransport transport, RemoteHostId id, long sendID, long rcvID, CipherState sendCha, CipherState rcvCha, byte[] sendKey1, byte[] sendKey2, byte[] rcvKey2, int reason)` Direct from IES2, there was never a PS2.