Packages that use RemoteHostId
Package
Description
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Uses of RemoteHostId in net.i2p.router.transport.udp
Subclasses with type arguments of type RemoteHostId in net.i2p.router.transport.udpModifier and TypeClassDescriptionprivate classFor inbound tokens only, to record eviction time in a stat, for use in setting expiration times.Classes in net.i2p.router.transport.udp that implement interfaces with type arguments of type RemoteHostIdModifier and TypeClassDescriptionprivate static classSoonest expiration first.Fields in net.i2p.router.transport.udp declared as RemoteHostIdModifier and TypeFieldDescriptionprivate final RemoteHostIdOutboundEstablishState._claimedAddressClaimed address.private final RemoteHostIdEstablishmentManager.HPCallback._fromThe host whose handshake failed.private final RemoteHostIdPeerTestManager.PTCallback._fromThe host the reply came from.private final RemoteHostIdUDPTransport.RemoveDropList._peerThe peer whose entry is being removed.private RemoteHostIdPeerState2._pendingRemoteHostIdNew host id pending confirmation during migration.private RemoteHostIdUDPPacket._remoteHostThe peer the packet goes to or came from.protected final RemoteHostIdInboundEstablishState._remoteHostIdRemote host identifier for uniqueness.protected RemoteHostIdOutboundEstablishState._remoteHostIdRemote host ID.protected RemoteHostIdPeerState._remoteHostIdCached RemoteHostId, used to find the peerState by remote info.private final RemoteHostIdPeerStateDestroyed._remoteHostIdThe peer's host id.private final RemoteHostIdPeerTestManager.DelayTest.fromThe host the relay request came from.Fields in net.i2p.router.transport.udp with type parameters of type RemoteHostIdModifier and TypeFieldDescriptionprivate final Set<RemoteHostId> UDPTransport._dropListList of RemoteHostId for peers whose packets we want to drop outright This is only for old network IDs (pre-0.6.1.10), so it isn't really used now.private final Map<RemoteHostId, Long> EstablishmentManager._inboundBansTemporary inbound bans after previous IB failure, to prevent excessive DH.private final ConcurrentHashMap<RemoteHostId, InboundEstablishState> EstablishmentManager._inboundStatesMap of RemoteHostId to InboundEstablishState.private final Map<RemoteHostId, EstablishmentManager.Token> EstablishmentManager._inboundTokensTokens issued to hosts that contacted us.private final ConcurrentHashMap<RemoteHostId, OutboundEstablishState> EstablishmentManager._outboundByClaimedAddressMap of claimed IP/port to OutboundEstablishState.private final ConcurrentHashMap<RemoteHostId, OutboundEstablishState> EstablishmentManager._outboundStatesMap of RemoteHostId to OutboundEstablishState.private final Map<RemoteHostId, EstablishmentManager.Token> EstablishmentManager._outboundTokensTokens we hold for hosts we contact.private final Map<RemoteHostId, PeerState> UDPTransport._peersByRemoteHostMap of known peers, keyed by their remote host and port.private final ConcurrentHashMap<RemoteHostId, LinkedBlockingQueue<OutNetMessage>> EstablishmentManager._queuedOutboundMap of RemoteHostId to a bounded, thread-safe queue of OutNetMessage instances for peers whose outbound establishment is pending due to concurrency limits.private final ObjectCounter<RemoteHostId> EstablishmentManager._terminationCounterCounts termination messages per host.Methods in net.i2p.router.transport.udp that return RemoteHostIdModifier and TypeMethodDescription(package private) RemoteHostIdOutboundEstablishState.getClaimedAddress()This will never be a hash-based address.(package private) RemoteHostIdUDPPacket.getRemoteHost()Lazily obtains theRemoteHostIdrepresenting the sender's address and port.(package private) RemoteHostIdInboundEstablishState.getRemoteHostId()The RemoteHostId that uniquely identifies this establishment attempt.(package private) RemoteHostIdOutboundEstablishState.getRemoteHostId()This should be what the state is currently indexed by in the _outboundStates table.PeerState.getRemoteHostId()Remote host ID.PeerStateDestroyed.getRemoteHostId()The remote host ID.SSU2Sender.getRemoteHostId()Remote host ID.Methods in net.i2p.router.transport.udp with parameters of type RemoteHostIdModifier and TypeMethodDescriptionvoidEstablishmentManager.addOutboundToken(RemoteHostId peer, long token, long expires) Remember a token that can be used later to connect to the peer.PacketBuilder2.buildRetryPacket(RemoteHostId to, SocketAddress toAddr, long destID, long srcID, int version, int terminationCode) Build a new Retry packet with a termination code, for a rejection direct from the EstablishmentManager.(package private) voidPeerState2.changeAddress(RemoteHostId id) Caller should sync; UDPTransport must remove and add to peersByRemoteHost map.(package private) voidUDPTransport.changePeerAddress(PeerState2 peer, RemoteHostId newAddress) Remove and add to peersByRemoteHost map.private voidPacketHandler.countBadPacket(RemoteHostId from) Count a malformed/unrecognized SSU2 packet from a source that has no established or pending session (e.g.private OutboundEstablishStateEstablishmentManager.createOutboundState(OutNetMessage msg, RemoteHostId to, RemoteHostId maybeTo, RouterIdentity toIdentity, boolean isIndirect, UDPAddress addr, RouterAddress ra, Hash toHash, String truncHash, String ipAddress, int maybePort, long now, boolean isBanned) Create a new outbound establish state for the peer, after verifying that its introducers, MTU, and introduction key are usable.private OutboundEstablishStateEstablishmentManager.findHolePunchState(RemoteHostId id, long nonce) Find the outbound establish state this HolePunch belongs to.(package private) InboundEstablishStateEstablishmentManager.getInboundState(RemoteHostId from) Grab the active establishing state.EstablishmentManager.getInboundToken(RemoteHostId peer) Token that can be used later for the peer to connect to us.EstablishmentManager.getInboundToken(RemoteHostId peer, long expiration) Token that can be used later for the peer to connect to us.(package private) OutboundEstablishStateEstablishmentManager.getOutboundState(RemoteHostId from) Grab the active establishing state.longEstablishmentManager.getOutboundToken(RemoteHostId peer) Token to connect to the peer.(package private) PeerStateUDPTransport.getPeerState(RemoteHostId hostInfo) Retrieves the current connection state for a peer identified by their remote host and port.voidEstablishmentManager.HPCallback.gotPathChallenge(RemoteHostId from, byte[] data) Got a PathChallenge block.voidInboundEstablishState2.gotPathChallenge(RemoteHostId from, byte[] data) Got a PathChallenge block.voidOutboundEstablishState2.gotPathChallenge(RemoteHostId from, byte[] data) voidPeerState2.gotPathChallenge(RemoteHostId from, byte[] data) Process a received PathChallenge block, replying with a PathResponse.voidPeerStateDestroyed.gotPathChallenge(RemoteHostId from, byte[] data) Process a received PathChallenge block; no-op after destruction.voidPeerTestManager.PTCallback.gotPathChallenge(RemoteHostId from, byte[] data) voidSSU2Payload.PayloadCallback.gotPathChallenge(RemoteHostId from, byte[] data) Receive a path challenge block.voidEstablishmentManager.HPCallback.gotPathResponse(RemoteHostId from, byte[] data) Got a PathResponse block.voidInboundEstablishState2.gotPathResponse(RemoteHostId from, byte[] data) Got a PathResponse block.voidOutboundEstablishState2.gotPathResponse(RemoteHostId from, byte[] data) voidPeerState2.gotPathResponse(RemoteHostId from, byte[] data) Process a received PathResponse block.voidPeerStateDestroyed.gotPathResponse(RemoteHostId from, byte[] data) Process a received PathResponse block; no-op after destruction.voidPeerTestManager.PTCallback.gotPathResponse(RemoteHostId from, byte[] data) voidSSU2Payload.PayloadCallback.gotPathResponse(RemoteHostId from, byte[] data) Receive a path response block.private booleanPeerState2.handleMigrationNone(RemoteHostId from, long n, UDPPacket packet) Connection migration attempt while in MIGRATION_STATE_NONE.private booleanPeerState2.handleMigrationPending(RemoteHostId from, UDPPacket packet) Connection migration attempt while in MIGRATION_STATE_PENDING.booleanEstablishmentManager.isInboundTokenValid(RemoteHostId peer, long token) Is the token from this peer valid?(package private) booleanUDPTransport.isInDropList(RemoteHostId peer) Is in drop list.private booleanEstablishmentManager.isPeerBanned(RemoteHostId hostId) Is the peer on the blocklist or banlist?private booleanEstablishmentManager.isPeerBanned(RemoteHostId hostId, String context) Is the peer on the blocklist or banlist?private booleanEstablishmentManager.isValidHolePunchResponse(EstablishmentManager.HPCallback cb, long rcvConnID, long now, RemoteHostId id) Validate the decrypted HolePunch payload: response code, clock skew, the nonce echoing the receiving connection ID, the response time, and the version.private OutboundEstablishStateEstablishmentManager.lookupOutboundState(RemoteHostId to, Hash toHash) Look up an existing outbound establish state for the peer, first by address, then by hash (for indirect connections).(package private) static voidSSU2Payload.parsePathChallenge(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake, RemoteHostId from) Parse a PATHCHALLENGE block (data blocks only), passing the challenge array up with the originating address.(package private) static voidSSU2Payload.parsePathResponse(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake, RemoteHostId from) Parse a PATHRESP block (data blocks only), passing the response array up with the originating address.(package private) PeerStateUDPTransport.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 intSSU2Payload.processPayload(I2PAppContext ctx, SSU2Payload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake, RemoteHostId from) Incoming payload.(package private) voidEstablishmentManager.receiveHolePunch(RemoteHostId id, UDPPacket packet) Called from PacketHandler.(package private) voidIntroductionManager.receiveHolePunch(RemoteHostId charlie, byte[] data) We are Alice and we got this from Charlie.(package private) voidPeerState2.receivePacket(RemoteHostId from, UDPPacket packet) From different than expected source IP/port.(package private) voidPeerStateDestroyed.receivePacket(RemoteHostId from, UDPPacket packet) Handle one packet received from the given source address.(package private) voidEstablishmentManager.receiveSessionDestroy(RemoteHostId from) Got a SessionDestroy - maybe during an inbound establish?(package private) voidEstablishmentManager.receiveSessionDestroy(RemoteHostId from, OutboundEstablishState state) Got a SessionDestroy during outbound establish(package private) voidEstablishmentManager.receiveSessionDestroy(RemoteHostId from, PeerState state) Got a SessionDestroy on an established conn(package private) voidEstablishmentManager.receiveSessionOrTokenRequest(RemoteHostId from, InboundEstablishState2 state, UDPPacket packet) Got a SessionRequest OR a TokenRequest (initiates an inbound establishment)private booleanPacketHandler.receiveSSU2Packet(RemoteHostId from, UDPPacket packet, InboundEstablishState2 state) Decrypt the header and hand off to the state for processing.voidPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data) Entry point for all in-session incoming packets.private voidPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data, byte[] addrBlockIP, int addrBlockPort) Called from above for in-session 1-4 or the PTCallback via processPayload() for out-of-session 5-7private booleanPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, Hash h, byte[] data, int retryCount) Status 0 only, Msg 2 and 4 only, SSU 2 only.voidPeerTestManager.receiveTest(RemoteHostId from, UDPPacket packet) Entry point for all out-of-session packets, messages 5-7 only.private voidEstablishmentManager.sendTerminationPacket(RemoteHostId to, UDPPacket fromPacket, int terminationCode) Send a Retry packet with a termination code, for a rejection of a session/token request.private intEstablishmentManager.validateHolePunchAddress(OutboundEstablishState state, RemoteHostId id, byte[] data) Validate the IP and port Charlie claims in the signed data.Method parameters in net.i2p.router.transport.udp with type arguments of type RemoteHostIdModifier and TypeMethodDescriptionintEstablishmentManager.TokenComparator.compare(Map.Entry<RemoteHostId, EstablishmentManager.Token> l, Map.Entry<RemoteHostId, EstablishmentManager.Token> r) Compare the two entries by expiration, soonest first.protected booleanEstablishmentManager.InboundTokens.removeEldestEntry(Map.Entry<RemoteHostId, EstablishmentManager.Token> eldest) Remove the eldest entry, recording its eviction time.Constructors in net.i2p.router.transport.udp with parameters of type RemoteHostIdModifierConstructorDescriptionDelayTest(RemoteHostId f, PeerState2 fp, int m, Hash h, byte[] d) Schedules itself.HPCallback(RemoteHostId from, Log log) Creates the hole punch callback.protectedOutboundEstablishState(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, int version) 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.PTCallback(RemoteHostId from) Prepares to collect one peer test reply.RemoveDropList(RemoteHostId peer) Create a drop-list entry for the given peer.