Uses of Class
net.i2p.data.Hash
Package
Description
Interfaces and factories for
the base I2P SDK used to develop applications that communicate
through I2P.
Provides a standard way for reading and writing messages transferred over I2P
so that the recipient has an authenticated mechanism to reply to it.
Implements the base I2P SDK for developing applications that communicate
through I2P.
Provides a standard way for querying the local naming service to resolve a
name into a
Destination
(without the complexity of JNDI).Implementation of a TCP-like (reliable, authenticated, in order) set of sockets for
communicating over the IP-like (unreliable, unauthenticated, unordered) I2P
messages.
These classes provide a number of low-level cryptographic routines.
These classes define the common data structures used by the various
I2P protocols.
The Invisible Internet Client Protocol (I2CP) allows applications simplified access to
the I2P network without requiring them to deal with the issues involved with the
Invisible Internet Network Protocol (I2NP).
This package defines the low-level messages sent between routers,
called the Invisible Internet Network Protocol (I2NP).
Classes formerly in net.i2p.data but moved here as they are only used by the router.
Implementation of preconfigured tunnels, both for clients and servers,
and a UI for adding more and editing the configuration.
These classes are the implementation of a definition-based
incoming connection filter.
The I2P router application handles the I2P network communication.
Implements the router side of the I2CP interface,
which is the API for applications to send and receive data through the router.
Classes formerly in net.i2p.crypto but moved here as they are only used by the router.
Dummy versions of things for testing.
Creates and parses garlic messages.
A couple of classes, but most things are in kademlia.
The network database, including implementation of floodfills.
The peer manager logs information about the history and quality of network peers.
Classes to run offline Sybil analysis, and to
store and load the results.
The transport system allows the usage of communication layers that are below I2P in the stack, on which I2P messages are sent.
The NTCP transport allows passing I2P messages on top of TCP.
The UDP transport (also known as 'SSU transport') allows passing I2P messages on top of UDP.
All the work of managing locally created and participating tunnels,
creating and handling tunnel messages, and their encryption.
Tunnel creation, tunnel build message handling.
These classes define the several useful utilities used
throughout the router.
Helpers and handlers for the router console user interface,
with these classes supporting the webapp in routerconsole.war.
These classes define the several useful utilities used
throughout the router and applications.
I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced
to add a web UI, DHT support, and other features.
-
Uses of Hash in net.i2p.client
Modifier and TypeMethodDescriptionI2PSession.lookupDest
(Hash h) Lookup a Destination by Hash.I2PSession.lookupDest
(Hash h, long maxWait) Lookup a Destination by Hash. -
Uses of Hash in net.i2p.client.datagram
Modifier and TypeMethodDescriptionI2PDatagramDissector.extractHash()
Extract the hash of the payload of an I2P repliable datagram (previously loaded with the loadI2PDatagram() method), without verifying the datagram signature.I2PDatagramDissector.getHash()
Extract the hash of the payload of an I2P repliable datagram (previously loaded with the loadI2PDatagram() method), verifying the datagram signature. -
Uses of Hash in net.i2p.client.impl
Modifier and TypeMethodDescription(package private) void
I2PSessionImpl.destLookupFailed
(Hash h) Called by the message handler on reception of DestReplyMessage(package private) void
SubSession.destLookupFailed
(Hash h) Called by the message handler on reception of DestReplyMessage This will never happen, as the dest reply message does not contain a session ID.I2PSessionImpl.lookupDest
(Hash h) Blocking.I2PSessionImpl.lookupDest
(Hash h, long maxWait) Blocking.SubSession.lookupDest
(Hash h) Blocking.SubSession.lookupDest
(Hash h, long maxWait) Blocking. -
Uses of Hash in net.i2p.client.naming
Modifier and TypeMethodDescriptionSame as lookupBase32() but with the SHA256 Hash precalculated This implementation returns null.NamingService.reverseLookup
(Hash h) Reverse lookup a hash.NamingService.reverseLookupAll
(Hash h) Reverse lookup a hash. -
Uses of Hash in net.i2p.client.streaming.impl
Modifier and TypeMethodDescriptionConnectionOptions.getAccessList()
ConnectionOptions.getBlacklist()
Modifier and TypeMethodDescription(package private) boolean
Checks if individual count is over the limit by this much.(package private) boolean
ConnThrottler.isThrottled
(Hash h) Checks individual count only.(package private) boolean
ConnThrottler.shouldThrottle
(Hash h) Checks both individual and total. -
Uses of Hash in net.i2p.crypto
Modifier and TypeMethodDescriptionfinal Hash
SHA256Generator.calculateHash
(byte[] source) Calculate the SHA-256 hash of the source and cache the result.final Hash
SHA256Generator.calculateHash
(byte[] source, int start, int len) Calculate the hash and cache the result.Modifier and TypeMethodDescriptionDSAEngine.sign
(Hash hash, SigningPrivateKey signingKey) Nonstandard.boolean
DSAEngine.verifySignature
(Signature signature, Hash hash, SigningPublicKey verifyingKey) Nonstandard. -
Uses of Hash in net.i2p.data
Modifier and TypeMethodDescriptionDataStructure.calculateHash()
Calculate the SHA256 value of this object (useful for a few scenarios)DataStructureImpl.calculateHash()
KeysAndCert.calculateHash()
Throws IllegalStateException if keys and cert are not initialized, as of 0.9.12.SimpleDataStructure.calculateHash()
static Hash
Hash.create
(byte[] data) Pull from cache or return new WARNING - If the SDS is found in the cache, the passed-in byte array will be returned to the SimpleByteCache for reuse.static Hash
Hash.create
(byte[] data, int off) Pull from cache or return newstatic Hash
Hash.create
(InputStream in) Pull from cache or return newBlindData.getBlindedHash()
LeaseSet2.getBlindedHash()
The orignal blinded hash, where this came from.BlindData.getDestHash()
Lease.getGateway()
Retrieve the router at which the destination can be contactedDatabaseEntry.getHash()
A common interface to the Hash of the two subclasses.EncryptedLeaseSet.getHash()
This must be used instead of getDestination().getHash().KeysAndCert.getHash()
Throws IllegalStateException if keys and cert are not initialized, as of 0.9.12.LeaseSet.getReceivedBy()
The Hash of the local client that received this LS, null if the router or unknown.DatabaseEntry.getRoutingKey()
Get the routing key for the structure using the current modifier in the RoutingKeyGenerator.abstract Hash
RoutingKeyGenerator.getRoutingKey
(Hash origKey) Get the routing key for a key.Modifier and TypeMethodDescriptionabstract Hash
RoutingKeyGenerator.getRoutingKey
(Hash origKey) Get the routing key for a key.void
LeaseSet2.setBlindedHash
(Hash bh) Set this on creation if knownvoid
Lease.setGateway
(Hash ident) Configure the router at which the destination can be contactedvoid
LeaseSet.setReceivedBy
(Hash localClient) Also sets receivedAsReply to true -
Uses of Hash in net.i2p.data.i2cp
Modifier and TypeMethodDescriptionBlindingInfoMessage.getHash()
DestLookupMessage.getHash()
DestReplyMessage.getHash()
HostLookupMessage.getHash()
RequestLeaseSetMessage.getRouter
(int endpoint) Modifier and TypeMethodDescriptionvoid
RequestLeaseSetMessage.addEndpoint
(Hash router, TunnelId tunnel) ModifierConstructorDescriptionBlindingInfoMessage
(Hash h, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Deprecated.unimplemented on router sideHostLookupMessage
(SessionId id, Hash h, long reqID, long timeout) -
Uses of Hash in net.i2p.data.i2np
Modifier and TypeMethodDescriptionDeliveryInstructions.getDestination()
default nullDatabaseLookupMessage.getFrom()
Contains the router who requested this lookupDatabaseSearchReplyMessage.getFromHash()
DatabaseStoreMessage.getKey()
Defines the key in the network database being storedDatabaseSearchReplyMessage.getReply
(int index) DatabaseStoreMessage.getReplyGateway()
DeliveryInstructions.getRouter()
default nullDatabaseLookupMessage.getSearchKey()
Defines the key being searched forDatabaseSearchReplyMessage.getSearchKey()
Defines the key being searched forBuildRequestRecord.readNextIdentity()
Read the next hop from the record.Modifier and TypeMethodDescriptionDatabaseLookupMessage.getDontIncludePeers()
Set of peers that a lookup reply should NOT include.Modifier and TypeMethodDescriptionvoid
DatabaseLookupMessage.addDontIncludePeer
(Hash peer) Add to the set.void
BuildRequestRecord.encryptECIESRecord
(RouterContext ctx, PublicKey toKey, Hash toPeer) Encrypt the record to the specified peer.BuildRequestRecord.encryptRecord
(I2PAppContext ctx, PublicKey toKey, Hash toPeer) Encrypt the record to the specified peer.void
DeliveryInstructions.setDestination
(Hash dest) required for DESTINATIONvoid
void
DatabaseSearchReplyMessage.setFromHash
(Hash from) void
DatabaseStoreMessage.setReplyGateway
(Hash peer) void
required for ROUTER or TUNNELvoid
DatabaseLookupMessage.setSearchKey
(Hash key) void
DatabaseSearchReplyMessage.setSearchKey
(Hash key) Modifier and TypeMethodDescriptionvoid
DatabaseLookupMessage.addDontIncludePeers
(Collection<Hash> peers) Add to the set.void
DatabaseLookupMessage.setDontIncludePeers
(Collection<Hash> peers) Replace the dontInclude set with this set.ModifierConstructorDescriptionBuildRequestRecord
(I2PAppContext ctx, long receiveTunnelId, long nextTunnelId, Hash nextHop, long nextMsgId, boolean isInGateway, boolean isOutEndpoint, Properties options) Populate this instance with data.BuildRequestRecord
(I2PAppContext ctx, long receiveTunnelId, long nextTunnelId, Hash nextHop, long nextMsgId, SessionKey layerKey, SessionKey ivKey, SessionKey replyKey, byte[] iv, boolean isInGateway, boolean isOutEndpoint, Properties options) Populate this instance with data.BuildRequestRecord
(I2PAppContext ctx, long receiveTunnelId, Hash peer, long nextTunnelId, Hash nextHop, long nextMsgId, SessionKey layerKey, SessionKey ivKey, SessionKey replyKey, byte[] iv, boolean isInGateway, boolean isOutEndpoint) Populate this instance with data. -
Uses of Hash in net.i2p.data.router
Modifier and TypeMethodDescriptionRouterKeyGenerator.getNextRoutingKey
(Hash origKey) Get the routing key using tomorrow's modData, not today'sRouterKeyGenerator.getRoutingKey
(Hash origKey) Generate a modified (yet consistent) hash from the origKey by generating the SHA256 of the targetKey with the current modData appended to it This makes Sybil's job a lot harder, as she needs to essentially take over the whole keyspace.RouterKeyGenerator.getRoutingKey
(Hash origKey, long time) Get the routing key for the specified date, not today'sModifier and TypeMethodDescriptionRouterInfo.getPeers()
Deprecated.Implemented here but unused elsewhereModifier and TypeMethodDescriptionRouterKeyGenerator.getNextRoutingKey
(Hash origKey) Get the routing key using tomorrow's modData, not today'sRouterKeyGenerator.getRoutingKey
(Hash origKey) Generate a modified (yet consistent) hash from the origKey by generating the SHA256 of the targetKey with the current modData appended to it This makes Sybil's job a lot harder, as she needs to essentially take over the whole keyspace.RouterKeyGenerator.getRoutingKey
(Hash origKey, long time) Get the routing key for the specified date, not today's -
Uses of Hash in net.i2p.i2ptunnel
Modifier and TypeMethodDescriptionprotected Socket
Get a regular or SSL socket depending on config and the incoming port.protected Socket
I2PTunnelServer.getSocket
(Hash from, InetAddress remoteHost, int remotePort) Get a regular or SSL socket depending on config.boolean
ConnThrottler.shouldThrottle
(Hash h) Checks both individual and total. -
Uses of Hash in net.i2p.i2ptunnel.access
Modifier and TypeMethodDescriptionprotected static Hash
FilterDefinitionElement.fromBase32
(String b32) Utility method to create a Hash object from a .b32 string(package private) Hash
DestTracker.getHash()
Modifier and TypeMethodDescriptionvoid
ExplicitFilterDefinitionElement.update
(Map<Hash, DestTracker> map) void
FileFilterDefinitionElement.update
(Map<Hash, DestTracker> map) (package private) abstract void
FilterDefinitionElement.update
(Map<Hash, DestTracker> map) Updates the provided map with the hash(es) of remote destinations mentioned in this element -
Uses of Hash in net.i2p.router
Modifier and TypeMethodDescriptionTunnelPoolSettings.getAliasOf()
Other destination that this is an alias of (or null).TunnelInfo.getDestination()
if this is a client tunnel, what destination is it for?TunnelPoolSettings.getDestination()
what destination is this a client tunnel for (or null if exploratory)ClientMessage.getDestinationHash()
Retrieve the destination to which this message is directed.TunnelInfo.getEndpoint()
For convenienceTunnelInfo.getFarEnd()
For convenienceTunnelInfo.getGateway()
For convenienceTunnelInfo.getPeer
(int hop) retrieve the peer at the given hop.RouterContext.routerHash()
Convenience method for getting the router hash.PeerManagerFacade.selectRandomByCapability
(char capability) Modifier and TypeMethodDescriptionNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Return the RouterInfo structures for the routers closest to the given key.TunnelPoolSettings.getAliases()
Other destinations that use the same tunnel (or null if exploratory) Modifiable, concurrent, not a copyNetworkDatabaseFacade.getAllRouters()
Banlist.getEntries()
For BanlistRenderer in router console.CommSystemFacade.getEstablished()
Get all the peers we are connected to.TunnelManagerFacade.getInboundClientPools()
for TunnelRenderer in router consoleTunnelManagerFacade.getOutboundClientPools()
for TunnelRenderer in router consolePeerManagerFacade.getPeersByCapability
(char capability) TunnelManagerFacade.selectPeersInTooManyTunnels()
Modifier and TypeMethodDescriptionboolean
RouterDoSThrottle.acceptNetDbLookupRequest
(Hash key) Deprecated.boolean
RouterThrottle.acceptNetDbLookupRequest
(Hash key) Should we accept the netDb lookup message, replying either with the value or some closer peers, or should we simply drop it due to overload?boolean
RouterThrottleImpl.acceptNetDbLookupRequest
(Hash key) Deprecated.unused, function moved to netdbint
InNetMessagePool.add
(I2NPMessage messageBody, RouterIdentity fromRouter, Hash fromRouterHash) Add a new message to the pool.void
We banlisted the peerboolean
Banlist.banlistRouter
(String reasonCode, Hash peer, String reason) ick have to put the reasonCode in the front to avoid ambiguityboolean
Banlist.banlistRouter
(Hash peer) boolean
Banlist.banlistRouter
(Hash peer, String reason) boolean
Banlist.banlistRouter
(Hash peer, String reason, String transport) boolean
Banlist.banlistRouter
(Hash peer, String reason, String transport, boolean forever) boolean
Banlist.banlistRouter
(Hash peer, String reason, String reasonCode, String transport, long expireOn) So that we may specify an expirationboolean
Banlist.banlistRouterForever
(Hash peer, String reason) boolean
Banlist.banlistRouterForever
(Hash peer, String reason, String reasonCode) void
ProfileManager.commErrorOccurred
(Hash peer) Note that there was some sort of communication error talking with the peerHandlerJobBuilder.createJob
(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash) Create a new job to handle the received message.void
ProfileManager.dbLookupFailed
(Hash peer) Note that the peer was unable to reply to a db lookup - either with data or with a lookupReply redirecting the user elsewherevoid
ProfileManager.dbLookupReceived
(Hash peer) Note that the local router received a db lookup from the given peervoid
ProfileManager.dbLookupReply
(Hash peer, int newPeers, int oldPeers, int invalid, int duplicate, long responseTimeMs) Note that the peer replied to a db lookup with a redirect to other routers, where the list of redirected users included newPeers routers that the local router didn't know about, oldPeers routers that the local router already knew about, the given invalid routers that were invalid in some way, and the duplicate number of routers that we explicitly asked them not to send us, but they did anywayvoid
ProfileManager.dbLookupSuccessful
(Hash peer, long responseTimeMs) Note that the peer was able to return the valid data for a db lookupvoid
ProfileManager.dbStoreFailed
(Hash peer) Note that we were unable to confirm a successful send of db data to the peer, at least not within our timeout periodvoid
ProfileManager.dbStoreReceived
(Hash peer, boolean wasNewKey) Note that the local router received an unprompted db store from the given peervoid
ProfileManager.dbStoreSent
(Hash peer, long responseTimeMs) Note that we've confirmed a successful send of db data to the peer (though we haven't necessarily requested it again from them, so they /might/ be lying)void
ProfileManager.dbStoreSuccessful
(Hash peer) Note that we confirmed a successful send of db data to the peer.void
MessageHistory.droppedInboundMessage
(long messageId, Hash from, String info) void
MessageHistory.droppedOtherMessage
(I2NPMessage message, Hash from) We received another message we weren't waiting for and don't know how to handlevoid
MessageHistory.droppedTunnelMessage
(TunnelId id, long msgId, Date expiration, Hash from) We don't know about the given tunnel, so we are dropping a message sent to us by the given routerabstract void
void
NetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Return the RouterInfo structures for the routers closest to the given key.void
CommSystemFacade.forceDisconnect
(Hash peer) Tell the comm system to disconnect from this peer.abstract SessionKeyManager
ClientManagerFacade.getClientSessionKeyManager
(Hash dest) CommSystemFacade.getCountry
(Hash peer) TunnelManagerFacade.getInboundPool
(Hash client) TunnelManagerFacade.getInboundSettings
(Hash client) byte[]
clientint
TunnelManagerFacade.getOutboundClientTunnelCount
(Hash destination) how many outbound client tunnels in this pool?TunnelManagerFacade.getOutboundPool
(Hash client) TunnelManagerFacade.getOutboundSettings
(Hash client) void
ProfileManager.heardAbout
(Hash peer) Note that the local router received a reference to the given peer, either through an explicit dbStore or in a dbLookupReplyvoid
ProfileManager.heardAbout
(Hash peer, long when) boolean
CommSystemFacade.isBacklogged
(Hash peer) boolean
Banlist.isBanlisted
(Hash peer) boolean
Banlist.isBanlisted
(Hash peer, String transport) boolean
Banlist.isBanlistedForever
(Hash peer) boolean
Blocklist.isBlocklisted
(Hash peer) Does the peer's IP address appear in the blocklist? If so, and it isn't banlisted, banlist it forever...abstract boolean
CommSystemFacade.isEstablished
(Hash peer) boolean
CommSystemFacade.isInStrictCountry
(Hash peer) abstract boolean
Determine if the destination hash specified is managed locally.boolean
NetworkDatabaseFacade.isNegativeCachedForever
(Hash key) Is it permanently negative cached?boolean
TunnelManagerFacade.isValidTunnel
(Hash client, TunnelInfo tunnel) Is a tunnel a valid member of the pool?abstract void
NetworkDatabaseFacade.lookupDestination
(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest) Lookup using the client's tunnels Succeeds even if LS validation fails due to unsupported sig typeabstract Destination
NetworkDatabaseFacade.lookupDestinationLocally
(Hash key) Lookup locally in netDB and in badDest cache Succeeds even if LS validation failed due to unsupported sig typeabstract void
NetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) abstract void
NetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) Lookup using the client's tunnelsabstract LeaseSet
NetworkDatabaseFacade.lookupLeaseSetLocally
(Hash key) abstract void
NetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Hash fromLocalDest) Unconditionally lookup using the client's tunnels.abstract void
NetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) Unconditionally lookup using the client's tunnels.abstract DatabaseEntry
NetworkDatabaseFacade.lookupLocally
(Hash key) abstract DatabaseEntry
NetworkDatabaseFacade.lookupLocallyWithoutValidation
(Hash key) Not for use without validationabstract void
NetworkDatabaseFacade.lookupRouterInfo
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) abstract RouterInfo
NetworkDatabaseFacade.lookupRouterInfoLocally
(Hash key) void
CommSystemFacade.mayDisconnect
(Hash peer) Tell the comm system that we may disconnect from this peer.void
ProfileManager.messageFailed
(Hash peer) Note that the router failed to send a message to the peer over any transportvoid
ProfileManager.messageFailed
(Hash peer, String transport) Note that the router failed to send a message to the peer over the transport specifiedvoid
ProfileManager.messageReceived
(Hash peer, String style, long msToReceive, int bytesRead) Note that the router received a message from the given peer on the specified transport.void
ProfileManager.messageSent
(Hash peer, String transport, long msToSend, long bytesSent) Note that it took msToSend to send a message of size bytesSent to the peer over the transport.StatisticsManager.publishStatistics
(Hash h) Retrieve a snapshot of the statistics that should be published.PersistentKeyRing.put
(Hash h, SessionKey sk) void
MessageHistory.receiveMessage
(String messageType, long messageId, long expiration, Hash from, boolean isValid) We just received a message from the peervoid
PeerManagerFacade.removeCapabilities
(Hash peer) CommSystemFacade.renderPeerHTML
(Hash peer) abstract void
ClientManagerFacade.requestLeaseSet
(Hash dest, LeaseSet set) TunnelManagerFacade.selectInboundExploratoryTunnel
(Hash closestTo) Pick the inbound exploratory tunnel with the gateway closest to the given hash.TunnelManagerFacade.selectInboundTunnel
(Hash destination) Pick a random inbound tunnel from the given destination's poolTunnelManagerFacade.selectInboundTunnel
(Hash destination, Hash closestTo) Pick the inbound tunnel with the gateway closest to the given hash from the given destination's pool.TunnelManagerFacade.selectOutboundExploratoryTunnel
(Hash closestTo) Pick the outbound exploratory tunnel with the endpoint closest to the given hash.TunnelManagerFacade.selectOutboundTunnel
(Hash destination) Pick a random outbound tunnel from the given destination's poolTunnelManagerFacade.selectOutboundTunnel
(Hash destination, Hash closestTo) Pick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool.void
MessageHistory.sendMessage
(String messageType, long messageId, long expiration, Hash peer, boolean sentOk, String info) We just sent a message to the peervoid
TunnelPoolSettings.setAliasOf
(Hash h) Set other destination that this is an alias of (or null).void
PeerManagerFacade.setCapabilities
(Hash peer, String caps) void
TunnelManagerFacade.setInboundSettings
(Hash client, TunnelPoolSettings settings) void
TunnelManagerFacade.setOutboundSettings
(Hash client, TunnelPoolSettings settings) boolean
ClientManagerFacade.shouldPublishLeaseSet
(Hash destinationHash) Does the client specified want their leaseSet published?NetworkDatabaseFacade.store
(Hash key, DatabaseEntry entry) abstract LeaseSet
abstract RouterInfo
NetworkDatabaseFacade.store
(Hash key, RouterInfo routerInfo) void
ProfileManager.tunnelDataPushed
(Hash peer, long rtt, int size) Note that we were able to push some data through a tunnel that the peer is participating in (detected after rtt).void
ProfileManager.tunnelDataPushed1m
(Hash peer, int size) Note that the peer is participating in a tunnel that pushed the given amount of data over the last minute.void
MessageHistory.tunnelDispatched
(long messageId, long tunnelId, long toTunnel, Hash toPeer, String type) void
ProfileManager.tunnelFailed
(Hash peer, int pct) Note that the peer participated in a tunnel that failed.void
ProfileManager.tunnelJoined
(Hash peer, long responseTimeMs) Note that the router agreed to participate in a tunnelvoid
ProfileManager.tunnelLifetimePushed
(Hash peer, long lifetime, long size) Note that we were able to push the given amount of data through a tunnel that the peer is participating invoid
MessageHistory.tunnelParticipantRejected
(Hash peer, String msg) void
MessageHistory.tunnelRejected
(Hash peer, TunnelId tunnel, Hash replyThrough, String reason) The peer did not accept the tunnel join for the given reasonvoid
ProfileManager.tunnelRejected
(Hash peer, long responseTimeMs, int severity) Note that a router explicitly rejected joining a tunnelvoid
MessageHistory.tunnelRequestTimedOut
(Hash peer, TunnelId tunnel) The peer did not accept the tunnel join for the given reason (this may be because of a timeout or an explicit refusal).void
ProfileManager.tunnelTestSucceeded
(Hash peer, long responseTimeMs) Note that a tunnel that the router is participating in was successfully tested with the given round trip latencyvoid
ProfileManager.tunnelTimedOut
(Hash peer) Note that a router timed out joining a tunnelvoid
We unbanlisted the peervoid
Banlist.unbanlistRouter
(Hash peer) void
Banlist.unbanlistRouter
(Hash peer, String transport) boolean
CommSystemFacade.wasUnreachable
(Hash peer) Modifier and TypeMethodDescriptionNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Return the RouterInfo structures for the routers closest to the given key.ModifierConstructorDescriptionClientMessage
(Hash toDestHash, Payload payload) For inbound (from remote dest)ClientTunnelSettings
(Hash dest) TunnelPoolSettings
(Hash dest, boolean isInbound) Client tunnel unless dest == null -
Uses of Hash in net.i2p.router.client
Modifier and TypeMethodDescriptionClientConnectionRunner.getDestHash()
Equivalent to getConfig().getDestination().calculateHash(); will be null before session is established Not subsession aware.ClientConnectionRunner.getDestHash
(SessionId id) Return the hash for the given IDModifier and TypeMethodDescriptionClientManager.getClientSessionKeyManager
(Hash dest) Return the client's SessionKeyManager Use this instead of the RouterContext.sessionKeyManager() to prevent correlation attacks across destinationsClientManagerFacadeImpl.getClientSessionKeyManager
(Hash dest) Return the client's current manager or null if not connectedCurrent client's config, will be null if session not found IS subsession aware.(package private) LeaseRequestState
ClientConnectionRunner.getLeaseRequest
(Hash h) Data for the current leaseRequest, or null if there is no active leaseSet request.ClientConnectionRunner.getLeaseSet
(Hash h) Currently allocated leaseSet.(package private) SessionId
ClientConnectionRunner.getSessionId
(Hash h) Subsession aware.boolean
Unsynchronized.boolean
Determine if the destination specified is managed locally.(package private) boolean
ClientConnectionRunner.receiveMessage
(Hash toHash, Destination fromDest, Payload payload) Synchronously deliver the message to the current runner Failure indication is available as of 0.9.29.boolean
ClientManager.registerEncryptedDestination
(ClientConnectionRunner runner, Hash hash) Call after destinationEstablished(), when an encrypted leaseset is created, so we know it's local.boolean
ClientConnectionRunner.registerEncryptedLS
(Hash hash) Call after destinationEstablished(), when an encrypted leaseset is created, so we know it's local.(package private) void
ClientConnectionRunner.requestLeaseSet
(Hash h, LeaseSet set, long expirationTime, Job onCreateJob, Job onFailedJob) Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.void
ClientManager.requestLeaseSet
(Hash dest, LeaseSet ls) Request that a particular client authorize the Leases contained in the LeaseSet.void
ClientManagerFacadeImpl.requestLeaseSet
(Hash dest, LeaseSet set) Request that a particular client authorize the Leases contained in the LeaseSet.(package private) void
ClientConnectionRunner.setSessionId
(Hash hash, SessionId id) To be called only by ClientManager.boolean
ClientManager.shouldPublishLeaseSet
(Hash destHash) boolean
ClientManagerFacadeImpl.shouldPublishLeaseSet
(Hash destinationHash) void
ClientManager.unregisterEncryptedDestination
(ClientConnectionRunner runner, Hash hash) Remove the hash for the encrypted LS.ModifierConstructorDescriptionLookupDestJob
(RouterContext context, ClientConnectionRunner runner, long reqID, long timeout, SessionId sessID, Hash h, String name, Hash fromLocalDest) One of h or name non-null.LookupDestJob
(RouterContext context, ClientConnectionRunner runner, Hash h, Hash fromLocalDest) -
Uses of Hash in net.i2p.router.crypto
Modifier and TypeMethodDescriptionFamilyKeyCrypto.getOurFamily()
Get verified members of our family. -
Uses of Hash in net.i2p.router.dummy
Modifier and TypeMethodDescriptionDummyPeerManagerFacade.selectRandomByCapability
(char capability) Modifier and TypeMethodDescriptionDummyNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) DummyNetworkDatabaseFacade.getAllRouters()
VMCommSystem.getEstablished()
DummyTunnelManagerFacade.getInboundClientPools()
DummyTunnelManagerFacade.getOutboundClientPools()
DummyPeerManagerFacade.getPeersByCapability
(char capability) DummyTunnelManagerFacade.selectPeersInTooManyTunnels()
Modifier and TypeMethodDescriptionvoid
void
DummyNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) DummyClientManagerFacade.getClientSessionKeyManager
(Hash _dest) DummyTunnelManagerFacade.getInboundPool
(Hash client) DummyTunnelManagerFacade.getInboundSettings
(Hash client) int
DummyTunnelManagerFacade.getOutboundClientTunnelCount
(Hash destination) DummyTunnelManagerFacade.getOutboundPool
(Hash client) DummyTunnelManagerFacade.getOutboundSettings
(Hash client) boolean
VMCommSystem.isEstablished
(Hash peer) boolean
boolean
DummyTunnelManagerFacade.isValidTunnel
(Hash client, TunnelInfo tunnel) void
DummyNetworkDatabaseFacade.lookupDestination
(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest) DummyNetworkDatabaseFacade.lookupDestinationLocally
(Hash key) void
DummyNetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) void
DummyNetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) DummyNetworkDatabaseFacade.lookupLeaseSetLocally
(Hash key) void
DummyNetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Hash fromLocalDest) void
DummyNetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) DummyNetworkDatabaseFacade.lookupLocally
(Hash key) DummyNetworkDatabaseFacade.lookupLocallyWithoutValidation
(Hash key) void
DummyNetworkDatabaseFacade.lookupRouterInfo
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) DummyNetworkDatabaseFacade.lookupRouterInfoLocally
(Hash key) void
We send messages between comms as bytes so that we strip any router-local info.void
DummyPeerManagerFacade.removeCapabilities
(Hash peer) void
DummyClientManagerFacade.requestLeaseSet
(Hash dest, LeaseSet set) DummyTunnelManagerFacade.selectInboundExploratoryTunnel
(Hash closestTo) DummyTunnelManagerFacade.selectInboundTunnel
(Hash destination) DummyTunnelManagerFacade.selectInboundTunnel
(Hash destination, Hash closestTo) DummyTunnelManagerFacade.selectOutboundExploratoryTunnel
(Hash closestTo) DummyTunnelManagerFacade.selectOutboundTunnel
(Hash destination) DummyTunnelManagerFacade.selectOutboundTunnel
(Hash destination, Hash closestTo) void
DummyPeerManagerFacade.setCapabilities
(Hash peer, String caps) void
DummyTunnelManagerFacade.setInboundSettings
(Hash client, TunnelPoolSettings settings) void
DummyTunnelManagerFacade.setOutboundSettings
(Hash client, TunnelPoolSettings settings) DummyNetworkDatabaseFacade.store
(Hash key, RouterInfo routerInfo) -
Uses of Hash in net.i2p.router.message
Modifier and TypeMethodDescription(package private) static GarlicMessage
GarlicMessageBuilder.buildECIESMessage
(RouterContext ctx, GarlicConfig config, Hash from, Destination to, SessionKeyManager skm, ReplyCallback callback) ECIES_X25519 only.(package private) static GarlicMessage
OutboundClientMessageJobHelper.createGarlicMessage
(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, int tagsToSendOverride, int lowTagsOverride, SessionKey wrappedKey, Set<SessionTag> wrappedTags, boolean requireAck, LeaseSet bundledReplyLeaseSet, ReplyCallback callback) Allow the app to specify the data clove directly, which enables OutboundClientMessage to resend the same payload (including expiration and unique id) in different garlics (down different tunnels) This is called from OCMOSJGarlicMessageHandler.createJob
(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash) (package private) static boolean
GarlicMessageBuilder.needsTags
(RouterContext ctx, PublicKey key, Hash local, int minTagOverride) ELGAMAL_2048 only.ModifierConstructorDescriptionGarlicMessageReceiver
(RouterContext context, GarlicMessageReceiver.CloveReceiver receiver, Hash clientDestination) HandleGarlicMessageJob
(RouterContext context, GarlicMessage msg, RouterIdentity from, Hash fromHash) SendMessageDirectJob
(RouterContext ctx, I2NPMessage message, Hash toPeer, int timeoutMs, int priority) SendMessageDirectJob
(RouterContext ctx, I2NPMessage message, Hash toPeer, Job onSend, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority) SendMessageDirectJob
(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority) -
Uses of Hash in net.i2p.router.naming
Modifier and TypeMethodDescriptionBlockfileNamingService.reverseLookup
(Hash h) BlockfileNamingService.reverseLookupAll
(Hash h) -
Uses of Hash in net.i2p.router.networkdb
Modifier and TypeMethodDescriptionprotected void
HandleDatabaseLookupMessageJob.sendClosest
(Hash key, Set<Hash> routerHashes, Hash toPeer, TunnelId replyTunnel) protected void
HandleDatabaseLookupMessageJob.sendMessage
(I2NPMessage message, Hash toPeer, TunnelId replyTunnel) Modifier and TypeMethodDescriptionprotected void
HandleDatabaseLookupMessageJob.sendClosest
(Hash key, Set<Hash> routerHashes, Hash toPeer, TunnelId replyTunnel) ModifierConstructorDescriptionHandleDatabaseLookupMessageJob
(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash) -
Uses of Hash in net.i2p.router.networkdb.kademlia
Modifier and TypeClassDescription(package private) class
Pull the caching used only by KBucketImpl out of Hash and put it here.Modifier and TypeMethodDescriptionBlindCache.getBlindedHash
(Destination dest) The hash to lookup for a dest.BlindCache.getBlindedHash
(SigningPublicKey spk) The hash to lookup for a SPK known to be blinded.IterativeSearchJob.getFromHash()
Hash of the dest this query is fromBlindCache.getHash
(Destination dest) The hash to lookup for a dest.The hash to lookup for a dest hash.FloodSearchJob.getKey()
(package private) static Hash
PersistentDataStore.getRouterInfoHash
(String filename) Package private for installer BundleRouterInfosStoreState.getSuccessful()
Return a successful peer (a random one if more than one was successful) or null.SearchState.getTarget()
StoreState.getTarget()
Modifier and TypeMethodDescriptionKademliaNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Get the routers closest to that key in response to a remote lookup Only used by ../HDLMJ Set MAY INCLUDE our own router - add to peersToIgnore if you don't wantKademliaNetworkDatabaseFacade.getAllRouters()
get the hashes for all known routersSearchState.getAttempted()
StoreState.getAttempted()
The peers attempted OR skipped.SearchState.getClosestAttempted
(int max) KademliaNetworkDatabaseFacade.getExploreKeys()
SearchState.getFailed()
FloodfillNetworkDatabaseFacade.getFloodfillPeers()
list of the Hashes of currently known floodfill peers; Returned list will not include our own hash.(package private) KBucketSet<Hash>
KademliaNetworkDatabaseFacade.getKBuckets()
DataStore.getKeys()
TransientDataStore.getKeys()
DataStore.getMapEntries()
TransientDataStore.getMapEntries()
SearchState.getPending()
SearchState.getRepliedPeers()
SearchState.getSuccessful()
FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int howMany, Set<Hash> toIgnore, KBucketSet<Hash> kbuckets) See above for description List will not include our own hash Returns new list, may be modified.FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int maxNumRouters, KBucketSet<Hash> kbuckets) Sort the floodfills.FloodfillPeerSelector.selectFloodfillParticipants
(KBucketSet<Hash> kbuckets) List will not include our own hash.FloodfillPeerSelector.selectMostReliablePeers
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectMostReliablePeers
(Hash key, int numClosest, Set<Hash> alreadyChecked, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Search through the kbucket set to find the most reliable peers close to the given key, skipping all of the ones already checked List will not include our own hash.FloodfillPeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Floodfill peers only.PeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Generic KBucket filtering to find the hashes close to a key, regardless of other considerations.PeerSelector.selectNearestExplicit
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Ignore KBucket ordering and do the XOR explicitly per key.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets, boolean preferConnected) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Ignore KBucket ordering and do the XOR explicitly per key.Modifier and TypeMethodDescription(package private) boolean
void
SearchState.addPending
(Hash peer) void
StoreState.addPending
(Hash peer) Increments attempted countvoid
StoreState.addPending
(Hash peer, MessageWrapper.WrappedMessage msg) void
StoreState.addSkipped
(Hash peer) we aren't even going to try to contact this peerprotected I2NPMessage
ExploreJob.buildMessage
(TunnelId replyTunnelId, Hash replyGateway, long expiration, RouterInfo peer) Build the database search message, but unlike the normal searches, we're more explicit in what we /dont/ want.protected I2NPMessage
SearchJob.buildMessage
(TunnelId replyTunnelId, Hash replyGateway, long expiration, RouterInfo peer) Build the database search messagevoid
Negative cache the hash until the next clean time.byte[]
Calculate the xor with the current object and the specified hash, caching values where possible.(package private) void
Must be called by the search job queued by search() on success or failurelong
FloodfillDatabaseLookupMessageHandler.createJob
(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash) FloodfillDatabaseStoreMessageHandler.createJob
(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash) long
how long did it take to get the reply, or -1 if we don't know(package private) int
FloodOnlySearchJob.decrementRemaining
(Hash peer) Note that we heard from the peer(package private) void
KademliaNetworkDatabaseFacade.dropAfterLookupFailed
(Hash peer) Final remove for a router info.void
Final remove for a leaseset.(package private) void
Note that the peer did not respond with a DSM (either a DSRM, timeout, or failure).KademliaNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Get the routers closest to that key in response to a remote lookup Only used by ../HDLMJ Set MAY INCLUDE our own router - add to peersToIgnore if you don't wantMessageWrapper.generateSession
(RouterContext ctx, Hash localDest, long expiration, boolean forceElG) Create a single key and tag, for receiving a single encrypted message, and register it with the client's session key manager, to expire in the time specified.Prepare for having only a partial set in memory and the rest on diskfor PersistentDataStore only - don't use hereNegativeLookupCache.getBadDest
(Hash h) Get an unsupported but cached DestinationThe hash to lookup for a dest hash.int
KademliaNetworkDatabaseFacade.getPeerTimeout
(Hash peer) todo: does this need more tuning?StoreState.getPendingMessage
(Hash peer) protected int
SearchJob.getPerPeerTimeoutMs
(Hash peer) static File
PersistentDataStore.getRouterInfoFile
(RouterContext ctx, Hash hash) The persistent RI file for a hash.boolean
boolean
boolean
(package private) boolean
KademliaNetworkDatabaseFacade.isNegativeCached
(Hash key) Is the key in the negative lookup cache?boolean
KademliaNetworkDatabaseFacade.isNegativeCachedForever
(Hash key) Is it permanently negative cached?(package private) boolean
FloodfillNetworkDatabaseFacade.isVerifyInProgress
(Hash h) protected void
FloodfillNetworkDatabaseFacade.lookupBeforeDropping
(Hash peer, RouterInfo info) Search for a newer router info, drop it from the db if the search fails, unless just started up or have bigger problems.protected void
KademliaNetworkDatabaseFacade.lookupBeforeDropping
(Hash peer, RouterInfo info) don't use directly - see F.N.D.F.void
KademliaNetworkDatabaseFacade.lookupDestination
(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest) Lookup using the client's tunnels Succeeds even if LS validation and store fails due to unsupported sig type, expired, etc.KademliaNetworkDatabaseFacade.lookupDestinationLocally
(Hash key) Lookup locally in netDB and in badDest cache Succeeds even if LS validation fails due to unsupported sig type, expired, etc.(package private) void
KademliaNetworkDatabaseFacade.lookupFailed
(Hash key) Increment in the negative lookup cachevoid
NegativeLookupCache.lookupFailed
(Hash h) void
KademliaNetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) Lookup using exploratory tunnels.void
KademliaNetworkDatabaseFacade.lookupLeaseSet
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) Lookup using the client's tunnels Use lookupDestination() if you don't need the LS or don't need it validated.KademliaNetworkDatabaseFacade.lookupLeaseSetLocally
(Hash key) Use lookupDestination() if you don't need the LS or don't need it validated.void
KademliaNetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Hash fromLocalDest) Unconditionally lookup using the client's tunnels.void
KademliaNetworkDatabaseFacade.lookupLeaseSetRemotely
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest) Unconditionally lookup using the client's tunnels.KademliaNetworkDatabaseFacade.lookupLocally
(Hash key) KademliaNetworkDatabaseFacade.lookupLocallyWithoutValidation
(Hash key) Not for use without validationvoid
KademliaNetworkDatabaseFacade.lookupRouterInfo
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs) KademliaNetworkDatabaseFacade.lookupRouterInfoLocally
(Hash key) This will return immediately with the result or null.(package private) void
IterativeSearchJob.newPeerToTry
(Hash peer) A new (floodfill) peer was discovered that may have the answer.boolean
DataStore.put
(Hash key, DatabaseEntry data) boolean
DataStore.put
(Hash key, DatabaseEntry data, boolean persist) boolean
PersistentDataStore.put
(Hash key, DatabaseEntry data) boolean
PersistentDataStore.put
(Hash key, DatabaseEntry data, boolean persist) boolean
TransientDataStore.put
(Hash key, DatabaseEntry data) boolean
TransientDataStore.put
(Hash key, DatabaseEntry data, boolean persist) for PersistentDataStore only - don't use herefor PersistentDataStore only - don't use herevoid
SearchState.removePending
(Hash peer) we didn't actually want to add this peer as part of the pending list...(package private) void
SearchJob.replyFound
(DatabaseSearchReplyMessage message, Hash peer) found a replylong
SearchState.replyFound
(Hash peer) how long did it take to get the reply, or -1 if we dont knowvoid
SearchState.replyTimeout
(Hash peer) void
StoreState.replyTimeout
(Hash peer) (package private) SearchJob
FloodfillNetworkDatabaseFacade.search
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease) Lookup using exploratory tunnels.(package private) SearchJob
FloodfillNetworkDatabaseFacade.search
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease, Hash fromLocalDest) Lookup using the client's tunnels.(package private) SearchJob
KademliaNetworkDatabaseFacade.search
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease) Begin a kademlia style search for the key specified, which can take up to timeoutMs and will fire the appropriate jobs on success or timeout (or if the kademlia search completes without any match) Unused - called only by FNDF.searchFull() from FloodSearchJob which is overridden - don't use this.(package private) SearchJob
KademliaNetworkDatabaseFacade.search
(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease, Hash fromLocalDest) Unused - see FNDF(package private) void
KademliaNetworkDatabaseFacade.searchComplete
(Hash key) The search for the given key is no longer activeFloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int howMany, Set<Hash> toIgnore, KBucketSet<Hash> kbuckets) See above for description List will not include our own hash Returns new list, may be modified.FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int maxNumRouters, KBucketSet<Hash> kbuckets) Sort the floodfills.FloodfillPeerSelector.selectMostReliablePeers
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectMostReliablePeers
(Hash key, int numClosest, Set<Hash> alreadyChecked, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Search through the kbucket set to find the most reliable peers close to the given key, skipping all of the ones already checked List will not include our own hash.FloodfillPeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Floodfill peers only.PeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Generic KBucket filtering to find the hashes close to a key, regardless of other considerations.PeerSelector.selectNearestExplicit
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Ignore KBucket ordering and do the XOR explicitly per key.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets, boolean preferConnected) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Ignore KBucket ordering and do the XOR explicitly per key.protected void
HandleFloodfillDatabaseLookupMessageJob.sendClosest
(Hash key, Set<Hash> routerInfoSet, Hash toPeer, TunnelId replyTunnel) We extend this here to send our routerInfo back as well, if we are not floodfill.(package private) void
FloodfillNetworkDatabaseFacade.sendStore
(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore) Send out a store.(package private) abstract void
KademliaNetworkDatabaseFacade.sendStore
(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore) See implementation in FNDF(package private) boolean
FloodThrottler.shouldThrottle
(Hash h) increments before checking(package private) boolean
LookupThrottler.shouldThrottle
(Hash key, TunnelId id) increments before checking(package private) boolean
FloodfillNetworkDatabaseFacade.shouldThrottleFlood
(Hash key) Increments and tests.(package private) boolean
FloodfillNetworkDatabaseFacade.shouldThrottleLookup
(Hash from, TunnelId id) Increments and tests.(package private) void
KademliaNetworkDatabaseFacade.stopPublishing
(Hash target) Store the leaseSet.KademliaNetworkDatabaseFacade.store
(Hash key, RouterInfo routerInfo) Store the routerInfo.(package private) RouterInfo
KademliaNetworkDatabaseFacade.store
(Hash key, RouterInfo routerInfo, boolean persist) Store the routerInfo.(package private) long
When did we send the query to the peer?(package private) void
FloodfillNetworkDatabaseFacade.verifyFinished
(Hash h) (package private) void
FloodfillNetworkDatabaseFacade.verifyStarted
(Hash h) (package private) boolean
SearchJob.wasAttempted
(Hash peer) boolean
SearchState.wasAttempted
(Hash peer) boolean
IterativeSearchJob.wasQueried
(Hash peer) Did we send a request to this peer?(package private) static MessageWrapper.WrappedMessage
MessageWrapper.wrap
(RouterContext ctx, I2NPMessage m, Hash from, RouterInfo to) Garlic wrap a message from a client or this router, destined for a router, to hide the contents from the OBEP.Modifier and TypeMethodDescriptionvoid
SearchState.addPending
(Collection<Hash> pending) KademliaNetworkDatabaseFacade.findNearestRouters
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) Get the routers closest to that key in response to a remote lookup Only used by ../HDLMJ Set MAY INCLUDE our own router - add to peersToIgnore if you don't wantvoid
KademliaNetworkDatabaseFacade.queueForExploration
(Collection<Hash> keys) void
KademliaNetworkDatabaseFacade.removeFromExploreKeys
(Collection<Hash> toRemove) FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int howMany, Set<Hash> toIgnore, KBucketSet<Hash> kbuckets) See above for description List will not include our own hash Returns new list, may be modified.FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int howMany, Set<Hash> toIgnore, KBucketSet<Hash> kbuckets) See above for description List will not include our own hash Returns new list, may be modified.FloodfillPeerSelector.selectFloodfillParticipants
(Hash key, int maxNumRouters, KBucketSet<Hash> kbuckets) Sort the floodfills.FloodfillPeerSelector.selectFloodfillParticipants
(KBucketSet<Hash> kbuckets) List will not include our own hash.FloodfillPeerSelector.selectMostReliablePeers
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectMostReliablePeers
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectMostReliablePeers
(Hash key, int numClosest, Set<Hash> alreadyChecked, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Search through the kbucket set to find the most reliable peers close to the given key, skipping all of the ones already checked List will not include our own hash.PeerSelector.selectMostReliablePeers
(Hash key, int numClosest, Set<Hash> alreadyChecked, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Search through the kbucket set to find the most reliable peers close to the given key, skipping all of the ones already checked List will not include our own hash.FloodfillPeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Floodfill peers only.FloodfillPeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Floodfill peers only.PeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Generic KBucket filtering to find the hashes close to a key, regardless of other considerations.PeerSelector.selectNearest
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Generic KBucket filtering to find the hashes close to a key, regardless of other considerations.PeerSelector.selectNearestExplicit
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Ignore KBucket ordering and do the XOR explicitly per key.PeerSelector.selectNearestExplicit
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Ignore KBucket ordering and do the XOR explicitly per key.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets, boolean preferConnected) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.FloodfillPeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets, boolean preferConnected) Pick out peers with the floodfill capacity set, returning them first, but then after they're complete, sort via kademlia.PeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Ignore KBucket ordering and do the XOR explicitly per key.PeerSelector.selectNearestExplicitThin
(Hash key, int maxNumRouters, Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets) UNUSED - See FloodfillPeerSelector override Ignore KBucket ordering and do the XOR explicitly per key.protected void
HandleFloodfillDatabaseLookupMessageJob.sendClosest
(Hash key, Set<Hash> routerInfoSet, Hash toPeer, TunnelId replyTunnel) We extend this here to send our routerInfo back as well, if we are not floodfill.(package private) void
FloodfillNetworkDatabaseFacade.sendStore
(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore) Send out a store.(package private) abstract void
KademliaNetworkDatabaseFacade.sendStore
(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore) See implementation in FNDFModifierConstructorDescriptionDirectLookupJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash peer, RouterInfo oldRI, Job onFind, Job onFail) ExploreJob
(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, boolean isRealExplore) Create a new search for the routingKey specifiedFloodfillStoreJob
(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs) Send a data structure to the floodfillsFloodfillStoreJob
(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) FloodfillVerifyStoreJob
(RouterContext ctx, Hash key, Hash client, long published, int type, Hash sentTo, Set<Hash> toSkip, FloodfillNetworkDatabaseFacade facade) Delay a few seconds, then start the verifyprotected
FloodOnlySearchJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs) For DirectLookupJob extension, RI only, different match jobFloodOnlySearchJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) FloodSearchJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) HandleFloodfillDatabaseLookupMessageJob
(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash) HandleFloodfillDatabaseStoreMessageJob
(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash, FloodfillNetworkDatabaseFacade facade) IterativeFollowupJob
(RouterContext ctx, Hash key, Hash to, IterativeSearchJob search) IterativeSearchJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) Lookup using exploratory tunnelsIterativeSearchJob
(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease, Hash fromLocalDest) Lookup using the client's tunnels.IterativeTimeoutJob
(RouterContext ctx, Hash peer, IterativeSearchJob job) RepublishLeaseSetJob
(RouterContext ctx, KademliaNetworkDatabaseFacade facade, Hash destHash) SearchJob
(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, Job onSuccess, Job onFailure, long timeoutMs, boolean keepStats, boolean isLease) Create a new search for the routingKey specifiedSearchReplyJob
(RouterContext enclosingContext, SearchJob job, DatabaseSearchReplyMessage message, Hash peer, long duration) SearchState
(RouterContext context, Hash key) SingleSearchJob
(RouterContext ctx, Hash key, Hash to) StoreJob
(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs) Send a data structure to the floodfillsStoreJob
(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) StoreState
(RouterContext ctx, Hash key, DatabaseEntry data) StoreState
(RouterContext ctx, Hash key, DatabaseEntry data, Set<Hash> toSkip) ModifierConstructorDescriptionFloodfillStoreJob
(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) FloodfillVerifyStoreJob
(RouterContext ctx, Hash key, Hash client, long published, int type, Hash sentTo, Set<Hash> toSkip, FloodfillNetworkDatabaseFacade facade) Delay a few seconds, then start the verifyStoreJob
(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) StoreState
(RouterContext ctx, Hash key, DatabaseEntry data, Set<Hash> toSkip) -
Uses of Hash in net.i2p.router.peermanager
Modifier and TypeMethodDescriptionPeerProfile.getPeer()
what peer is being profiled, non-nullProfileOrganizer.getUs()
PeerManagerFacadeImpl.selectRandomByCapability
(char capability) Deprecated.unusedModifier and TypeMethodDescriptionPeerManager.getPeersByCapability
(char capability) PeerManagerFacadeImpl.getPeersByCapability
(char capability) ProfileOrganizer.selectAllPeers()
Find the hashes for all peers we are actively profilingPeerManager.selectPeers()
PeerManager.selectPeers
(PeerSelectionCriteria criteria) Find some peers that meet the criteria and we have the netDb info for locally.ProfileOrganizer.selectPeersLocallyUnreachable()
Get the peers the transport layer thinks are unreachable, and peers requiring introducers.ProfileOrganizer.selectPeersRecentlyRejecting()
Get the peers that have recently rejected us for bandwidth recent == last 20sModifier and TypeMethodDescriptionvoid
ProfileManagerImpl.commErrorOccurred
(Hash peer) Note that there was some sort of communication error talking with the peervoid
ProfileManagerImpl.dbLookupFailed
(Hash peer) Note that the peer was unable to reply to a db lookup - either with data or with a lookupReply redirecting the user elsewhere This will force creation of DB stats Non-blocking.void
ProfileManagerImpl.dbLookupReceived
(Hash peer) Note that the local router received a db lookup from the given peer Non-blocking.void
ProfileManagerImpl.dbLookupReply
(Hash peer, int newPeers, int oldPeers, int invalid, int duplicate, long responseTimeMs) Note that the peer replied to a db lookup with a redirect to other routers, where the list of redirected users included newPeers routers that the local router didn't know about, oldPeers routers that the local router already knew about, the given invalid routers that were invalid in some way, and the duplicate number of routers that we explicitly asked them not to send us, but they did anyway Non-blocking.void
ProfileManagerImpl.dbLookupSuccessful
(Hash peer, long responseTimeMs) Note that the peer was able to return the valid data for a db lookup This will force creation of DB stats Non-blocking.void
ProfileManagerImpl.dbStoreFailed
(Hash peer) Note that we were unable to confirm a successful send of db data to the peer, at least not within our timeout period This will force creation of DB statsvoid
ProfileManagerImpl.dbStoreReceived
(Hash peer, boolean wasNewKey) Note that the local router received an unprompted db store from the given peer Non-blocking.void
ProfileManagerImpl.dbStoreSent
(Hash peer, long responseTimeMs) Note that we've confirmed a successful send of db data to the peer (though we haven't necessarily requested it again from them, so they /might/ be lying) As of 0.9.53 we update the DbResponseTime.void
ProfileManagerImpl.dbStoreSuccessful
(Hash peer) Note that we've verified a successful send of db data to the floodfill peer by querying another floodfill.boolean
ProfileOrganizer.exportProfile
(Hash profile, OutputStream out) (package private) PeerProfile
ProfileOrganizer.getOrCreateProfileNonblocking
(Hash peer) Retrieve the profile for the given peer, if one exists.ProfileOrganizer.getProfile
(Hash peer) Retrieve the profile for the given peer, if one exists (else null).ProfileOrganizer.getProfileNonblocking
(Hash peer) Retrieve the profile for the given peer, if one exists (else null).void
ProfileManagerImpl.heardAbout
(Hash peer) Note that the local router received a reference to the given peer, either through an explicit dbStore or in a dbLookupReply Non-blocking.void
ProfileManagerImpl.heardAbout
(Hash peer, long when) Note that the local router received a reference to the given peer at a certain time.boolean
Deprecated for now, always falseboolean
boolean
ProfileOrganizer.isHighCapacity
(Hash peer) boolean
ProfileOrganizer.isSelectable
(Hash peer) boolean
ProfileOrganizer.isWellIntegrated
(Hash peer) void
ProfileManagerImpl.messageFailed
(Hash peer) Note that the router failed to send a message to the peer over any transport.void
ProfileManagerImpl.messageFailed
(Hash peer, String transport) Note that the router failed to send a message to the peer over the transport specified.void
ProfileManagerImpl.messageReceived
(Hash peer, String style, long msToReceive, int bytesRead) Note that the router received a message from the given peer on the specified transport.void
ProfileManagerImpl.messageSent
(Hash peer, String transport, long msToSend, long bytesSent) Note that it took msToSend to send a message of size bytesSent to the peer over the transport.boolean
ProfileOrganizer.peerSendsBadReplies
(Hash peer) Does the given peer send us bad replies - either invalid store messages (expired, corrupt, etc) or unreachable replies (pointing towards routers that don't exist).void
PeerManager.removeCapabilities
(Hash peer) void
PeerManagerFacadeImpl.removeCapabilities
(Hash peer) void
PeerManager.setCapabilities
(Hash peer, String caps) void
PeerManagerFacadeImpl.setCapabilities
(Hash peer, String caps) void
void
(package private) void
PeerManager.storeProfile
(Hash peer) void
ProfileManagerImpl.tunnelDataPushed
(Hash peer, long rtt, int size) Non-blocking.void
ProfileManagerImpl.tunnelDataPushed1m
(Hash peer, int size) Non-blocking.void
ProfileManagerImpl.tunnelFailed
(Hash peer, int pct) Note that the peer participated in a tunnel that failed.void
ProfileManagerImpl.tunnelJoined
(Hash peer, long responseTimeMs) Note that the router agreed to participate in a tunnelvoid
ProfileManagerImpl.tunnelLifetimePushed
(Hash peer, long lifetime, long size) Non-blocking.void
ProfileManagerImpl.tunnelRejected
(Hash peer, long responseTimeMs, int severity) Note that a router explicitly rejected joining a tunnel.void
ProfileManagerImpl.tunnelTestSucceeded
(Hash peer, long responseTimeMs) Deprecated.disabledvoid
ProfileManagerImpl.tunnelTimedOut
(Hash peer) Note that a router did not respond to a tunnel join.Modifier and TypeMethodDescriptionvoid
ProfileOrganizer.selectActiveNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches) Return a set of Hashes for peers that are both not failing and we're actively talking with.void
ProfileOrganizer.selectActiveNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, int mask, MaskedIPSet ipSet) Return a set of Hashes for peers that are both not failing and we're actively talking with.void
ProfileOrganizer.selectAllNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, boolean onlyNotFailing) Return a set of Hashes for peers that are not failing.void
ProfileOrganizer.selectFastPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches) Return a set of Hashes for peers that are both fast and reliable.void
ProfileOrganizer.selectFastPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, int mask, MaskedIPSet ipSet) Return a set of Hashes for peers that are both fast and reliable.void
ProfileOrganizer.selectFastPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, SessionKey randomKey, ProfileOrganizer.Slice subTierMode, int mask, MaskedIPSet ipSet) Return a set of Hashes for peers that are both fast and reliable.void
ProfileOrganizer.selectHighCapacityPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches) Return a set of Hashes for peers that have a high capacityvoid
ProfileOrganizer.selectHighCapacityPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, int mask, MaskedIPSet ipSet) void
ProfileOrganizer.selectNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches) Return a set of Hashes for peers that are not failing, preferring ones that we are already talking withvoid
ProfileOrganizer.selectNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, boolean onlyNotFailing) void
ProfileOrganizer.selectNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, boolean onlyNotFailing, int mask, MaskedIPSet ipSet) Return a set of Hashes for peers that are not failing, preferring ones that we are already talking withvoid
ProfileOrganizer.selectNotFailingPeers
(int howMany, Set<Hash> exclude, Set<Hash> matches, int mask, MaskedIPSet ipSet) ModifierConstructorDescriptionPeerProfile
(RouterContext context, Hash peer) Caller should call setLastHeardAbout() and setFirstHeardAbout() -
Uses of Hash in net.i2p.router.sybil
Modifier and TypeMethodDescriptionAnalysis.backgroundAnalysis
(boolean includeAll) Analyze threats.PersistSybil.load
(long date) Load the analysis for a certain date.Modifier and TypeMethodDescriptionvoid
Analysis.calculateRouterInfo
(Hash us, String usName, List<RouterInfo> ris, Map<Hash, Points> points) Analysis.getAllRouters
(Hash us) All the routers, not including usAnalysis.getFloodfills
(Hash us) All the floodfills, not including usLoad all the analysis for a certain hash.Modifier and TypeMethodDescriptionvoid
Analysis.addProfilePoints
(List<RouterInfo> ris, Map<Hash, Points> points) void
Analysis.addVersionPoints
(List<RouterInfo> ris, Map<Hash, Points> points) Analysis.calculateIPGroups16
(List<RouterInfo> ris, Map<Hash, Points> points) Analysis.calculateIPGroups24
(List<RouterInfo> ris, Map<Hash, Points> points) Analysis.calculateIPGroups32
(List<RouterInfo> ris, Map<Hash, Points> points) Analysis.calculateIPGroupsFamily
(List<RouterInfo> ris, Map<Hash, Points> points) void
Analysis.calculateIPGroupsUs
(List<RouterInfo> ris, Map<Hash, Points> points, List<RouterInfo> ri32, List<RouterInfo> ri24, List<RouterInfo> ri16) double
Analysis.calculatePairDistance
(List<RouterInfo> ris, Map<Hash, Points> points, List<Pair> pairs) void
Analysis.calculateRouterInfo
(Hash us, String usName, List<RouterInfo> ris, Map<Hash, Points> points) void
Store each entry. -
Uses of Hash in net.i2p.router.transport
Modifier and TypeMethodDescriptionCommSystemFacadeImpl.getEstablished()
Transport.getEstablished()
TransportManager.getEstablished()
Modifier and TypeMethodDescriptionvoid
CommSystemFacadeImpl.forceDisconnect
(Hash peer) Tell the comm system to disconnect from this peer.void
Transport.forceDisconnect
(Hash peer) Tell the transport to disconnect from this peer.(package private) void
TransportManager.forceDisconnect
(Hash peer) Tell the transports to disconnect from this peer.CommSystemFacadeImpl.getCountry
(Hash peer) Uses the transport IP first because that lookup is fast, then the IP from the netDb.byte[]
static byte[]
IP of the peer from the last connection (in or out, any transport).(package private) byte[]
IP of the peer from the last connection (in or out, any transport).boolean
CommSystemFacadeImpl.isBacklogged
(Hash peer) boolean
Transport.isBacklogged
(Hash peer) boolean
TransportImpl.isBacklogged
(Hash peer) (package private) boolean
TransportManager.isBacklogged
(Hash peer) boolean
CommSystemFacadeImpl.isEstablished
(Hash peer) boolean
Transport.isEstablished
(Hash peer) boolean
TransportImpl.isEstablished
(Hash peer) (package private) boolean
TransportManager.isEstablished
(Hash peer) boolean
CommSystemFacadeImpl.isInStrictCountry
(Hash peer) Are they in a strict country.boolean
Transport.isUnreachable
(Hash peer) boolean
TransportImpl.isUnreachable
(Hash peer) void
TransportImpl.markReachable
(Hash peer, boolean isInbound) called when we establish a peer connection (outbound or inbound)void
TransportImpl.markUnreachable
(Hash peer) called when we can't reach a peervoid
CommSystemFacadeImpl.mayDisconnect
(Hash peer) Tell the comm system that we may disconnect from this peer.void
Transport.mayDisconnect
(Hash peer) Tell the transport that we may disconnect from this peer.void
TransportImpl.mayDisconnect
(Hash peer) Tell the transport that we may disconnect from this peer.(package private) void
TransportManager.mayDisconnect
(Hash peer) Tell the transports that we may disconnect from this peer.void
TransportEventListener.messageReceived
(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) Message receivedvoid
TransportImpl.messageReceived
(I2NPMessage inMsg, RouterIdentity remoteIdent, Hash remoteIdentHash, long msToReceive, int bytesReceived) Message received from the I2NPMessageReader - send it to the listenervoid
TransportManager.messageReceived
(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) Message receivedCommSystemFacadeImpl.renderPeerHTML
(Hash peer) Provide a consistent "look" for displaying router IDs in the consolevoid
IP of the peer from the last connection (in or out, any transport).boolean
CommSystemFacadeImpl.wasUnreachable
(Hash peer) boolean
Transport.wasUnreachable
(Hash peer) Was the peer UNreachable (outbound only) the last time we tried it? This is NOT reset if the peer contacts us and it is never expired.boolean
TransportImpl.wasUnreachable
(Hash peer) Was the peer UNreachable (outbound only) the last time we tried it? This is NOT reset if the peer contacts us.(package private) boolean
TransportManager.wasUnreachable
(Hash peer) Was the peer UNreachable (outbound only) on any transport, based on the last time we tried it for each transport? This is NOT reset if the peer contacts us. -
Uses of Hash in net.i2p.router.transport.ntcp
Modifier and TypeMethodDescriptionvoid
NTCPTransport.forceDisconnect
(Hash peer) Tell the transport to disconnect from this peer.boolean
NTCPTransport.isBacklogged
(Hash dest) boolean
NTCPTransport.isEstablished
(Hash dest) void
NTCPTransport.mayDisconnect
(Hash peer) Tell the transport that we may disconnect from this peer. -
Uses of Hash in net.i2p.router.transport.udp
Modifier and TypeFieldDescriptionprotected final Hash
PeerState._remotePeer
The peer are we talking to.Modifier and TypeMethodDescriptionInboundMessageState.getFrom()
(package private) Hash
UDPAddress.getIntroducerHash
(int i) RemoteHostId.getPeerHash()
PeerState.getRemotePeer()
The peer are we talking to.Modifier and TypeMethodDescriptionPacketBuilder2.buildPeerTestToAlice
(int code, Hash charlieHash, byte[] signedData, PeerState2 alice) Build a packet as Bob to Alice, with the response from Charlie, or a rejection by Bob.PacketBuilder2.buildPeerTestToCharlie
(Hash aliceHash, byte[] signedData, PeerState2 charlie) Build a packet as Bob to Charlie to help test Alice.void
void
void
static byte[]
SSU2Util.createPeerTestData
(I2PAppContext ctx, Hash h, Hash h2, PeerTestState.Role role, long nonce, byte[] ip, int port, SigningPrivateKey spk) Make the data for the peer test blockstatic byte[]
SSU2Util.createRelayRequestData
(I2PAppContext ctx, Hash h, Hash h2, long nonce, long tag, byte[] ip, int port, SigningPrivateKey spk) Make the data for the relay request blockstatic byte[]
SSU2Util.createRelayResponseData
(I2PAppContext ctx, Hash h, int code, long nonce, byte[] ip, int port, SigningPrivateKey spk, long token) Make the data for the relay response block(package private) void
This does not send a session destroy, caller must do that if desired.(package private) void
UDPTransport.externalAddressReceived
(Hash from, byte[] ourIP, int ourPort) Someone we tried to contact gave us what they think our IP address is.void
UDPTransport.forceDisconnect
(Hash peer) Tell the transport to disconnect from this peer.OutboundEstablishState2.getIntroState
(Hash h) (package private) PeerState
UDPTransport.getPeerState
(Hash remotePeer) get the state for the peer with the given ident, or null if no state existsvoid
InboundEstablishState2.gotPeerTest
(int msg, int status, Hash h, byte[] data) void
OutboundEstablishState2.gotPeerTest
(int msg, int status, Hash h, byte[] data) void
PeerState2.gotPeerTest
(int msg, int status, Hash h, byte[] data) void
SSU2Payload.PayloadCallback.gotPeerTest
(int msg, int status, Hash h, byte[] data) void
InboundEstablishState2.gotRelayIntro
(Hash aliceHash, byte[] data) void
OutboundEstablishState2.gotRelayIntro
(Hash aliceHash, byte[] data) void
PeerState2.gotRelayIntro
(Hash aliceHash, byte[] data) void
SSU2Payload.PayloadCallback.gotRelayIntro
(Hash aliceHash, byte[] data) void
A relay request was sent to the SSU2 introducer specifiedboolean
UDPTransport.isBacklogged
(Hash dest) boolean
boolean
boolean
boolean
UDPTransport.isEstablished
(Hash dest) void
UDPTransport.mayDisconnect
(Hash peer) Tell the transport that we may disconnect from this peer.void
UDPTransport.messageReceived
(I2NPMessage inMsg, RouterIdentity remoteIdent, Hash remoteIdentHash, long msToReceive, int bytesReceived) infinite loop public RouterAddress getCurrentAddress() { if (needsRebuild()) rebuildExternalAddress(false); return super.getCurrentAddress(); }(package private) void
IntroductionManager.receiveRelayIntro
(PeerState2 bob, Hash alice, byte[] data) We are Charlie and we got this from Bob.void
PeerTestManager.receiveTest
(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data) Entry point for all in-session incoming packets.void
PeerTestState.setAlice
(InetAddress ip, int port, Hash hash) void
PeerTestState.setCharlie
(InetAddress ip, int port, Hash hash) void
OutboundEstablishState2.setIntroState
(Hash h, OutboundEstablishState2.IntroState state) Set the current state for the SSU2 introducer specifiedstatic Signature
SSU2Util.sign
(I2PAppContext ctx, byte[] prologue, Hash h, Hash h2, byte[] data, int datalen, SigningPrivateKey spk) Sign the relay or peer test data, using the prologue and hash as the initial data, and then the provided data.void
void
void
static boolean
SSU2Util.validateSig
(I2PAppContext ctx, byte[] prologue, Hash h, Hash h2, byte[] data, SigningPublicKey spk) Validate the signed relay or peer test data, using the prologue and hash as the initial data, and then the provided data which ends with a signature of the specified type.ModifierConstructorDescriptionInboundMessageState
(RouterContext ctx, long messageId, Hash from) Only for Poison right now.InboundMessageState
(RouterContext ctx, long messageId, Hash from, byte[] data, int off, int len, int fragmentNum, boolean isLast) Create a new IMS and read in the data from the fragment.InboundMessageState
(RouterContext ctx, long messageId, Hash from, UDPPacketReader.DataReader data, int dataFragment) Create a new IMS and read in the data from the fragment.PeerState
(RouterContext ctx, UDPTransport transport, byte[] remoteIP, int remotePort, Hash remotePeer, boolean isInbound, int rtt, SessionKey cipherKey, SessionKey macKey) SSU 1 only.protected
PeerState
(RouterContext ctx, UDPTransport transport, InetSocketAddress addr, Hash remotePeer, boolean isInbound, int rtt) For SSU2PeerState2
(RouterContext ctx, UDPTransport transport, InetSocketAddress remoteAddress, Hash remotePeer, boolean isInbound, int rtt, CipherState sendCha, CipherState rcvCha, long sendID, long rcvID, byte[] sendHdrKey1, byte[] sendHdrKey2, byte[] rcvHdrKey2) PeerTestBlock
(int msgNum, int code, Hash hash, byte[] data) RemoteHostId
(Hash peerHash) indirect -
Uses of Hash in net.i2p.router.tunnel
Modifier and TypeMethodDescriptionTunnelCreatorConfig.getBlankHash()
Checksum for blank recordInboundEndpointProcessor.getDestination()
TunnelCreatorConfig.getDestination()
If this is a client tunnel, what destination is it for?TunnelCreatorConfig.getEndpoint()
For convenienceTunnelCreatorConfig.getFarEnd()
For convenienceTunnelCreatorConfig.getGateway()
For convenienceTunnelCreatorConfig.getPeer
(int hop) retrieve the peer at the given hop.HopConfig.getReceiveFrom()
what is the previous peer in the tunnel (null if gateway)HopConfig.getSendTo()
what is the next peer in the tunnel (null if endpoint)InboundGatewayReceiver.getSendTo()
The next hopOutboundReceiver.getSendTo()
The next hopTunnelGateway.Receiver.getSendTo()
The next hopFragmentedMessage.getTargetRouter()
PendingGatewayMessage.getToRouter()
may be nullModifier and TypeMethodDescriptionvoid
PumpedTunnelGateway.add
(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) Add a message to be sent down the tunnel, either sending it now (perhaps coallesced with other pending messages) or after a brief pause (_flushFrequency).void
ThrottledPumpedTunnelGateway.add
(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) Possibly drop a message due to bandwidth before adding it to the preprocessor queue.void
TunnelGateway.add
(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) Add a message to be sent down the tunnel, either sending it now (perhaps coallesced with other pending messages) or after a brief pause (_flushFrequency).void
TunnelGatewayZeroHop.add
(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) Add a message to be sent down the tunnel (immediately forwarding it to theInboundMessageDistributor
orOutboundMessageDistributor
, as necessary).void
OutboundTunnelEndpoint.dispatch
(TunnelDataMessage msg, Hash recvFrom) void
TunnelDispatcher.dispatch
(TunnelDataMessage msg, Hash recvFrom) We are participating in a tunnel (perhaps we're even the endpoint), so take the message and do what it says.void
TunnelParticipant.dispatch
(TunnelDataMessage msg, Hash recvFrom) void
TunnelDispatcher.dispatchOutbound
(I2NPMessage msg, TunnelId outboundTunnel, Hash targetPeer) We are the outbound tunnel gateway (we created it), so wrap up this message with instructions to be forwarded to the targetPeer when it reaches the endpoint.void
TunnelDispatcher.dispatchOutbound
(I2NPMessage msg, TunnelId outboundTunnel, TunnelId targetTunnel, Hash targetPeer) We are the outbound tunnel gateway (we created it), so wrap up this message with instructions to be forwarded to the targetTunnel on the targetPeer when it reaches the endpoint.void
InboundMessageDistributor.distribute
(I2NPMessage msg, Hash target) void
InboundMessageDistributor.distribute
(I2NPMessage msg, Hash target, TunnelId tunnel) void
OutboundMessageDistributor.distribute
(I2NPMessage msg, Hash target) void
OutboundMessageDistributor.distribute
(I2NPMessage msg, Hash target, TunnelId tunnel) boolean
Process the data for the current hop, overwriting the original data with what should be sent to the next peer.boolean
FragmentedMessage.receive
(byte[] payload, int offset, int length, boolean isLast, Hash toRouter, TunnelId toTunnel) Receive the first fragment (#0) and related metadata.void
FragmentHandler.DefragmentedReceiver.receiveComplete
(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) Receive a fully formed I2NPMessage out of the tunnelboolean
InboundEndpointProcessor.retrievePreprocessedData
(byte[] orig, int offset, int length, Hash prev) Undo all of the encryption done by the peers in the tunnel, recovering the preprocessed data sent by the gateway.void
TunnelCreatorConfig.setBlankHash
(Hash h) Checksum for blank recordvoid
void
HopConfig.setReceiveFrom
(Hash from) Do not set for gatewayvoid
Do not set for endpointModifierConstructorDescriptionInboundMessageDistributor
(RouterContext ctx, Hash client) OutboundGatewayMessage
(I2NPMessage message, Hash toRouter, TunnelId toTunnel) PendingGatewayMessage
(I2NPMessage message, Hash toRouter, TunnelId toTunnel) TunnelCreatorConfig
(RouterContext ctx, int length, boolean isInbound, Hash destination) -
Uses of Hash in net.i2p.router.tunnel.pool
Modifier and TypeMethodDescriptionTunnelPeerSelector.getClosestHopExclude
(boolean isInbound) Pick peers that we want to avoid for the first OB hop or last IB hop.TunnelPeerSelector.getExclude
(boolean isInbound, boolean isExploratory) Pick peers that we want to avoidTunnelPoolManager.getInboundClientPools()
for TunnelRenderer in router consoleTunnelPoolManager.getOutboundClientPools()
for TunnelRenderer in router consoleTunnelPeerSelector.selectExplicit
(TunnelPoolSettings settings, int length) For debugging, also possibly for restricted routes? Needs analysis and testingClientPeerSelector.selectPeers
(TunnelPoolSettings settings) Returns ENDPOINT FIRST, GATEWAY LAST!!!! In: us ..ExploratoryPeerSelector.selectPeers
(TunnelPoolSettings settings) Returns ENDPOINT FIRST, GATEWAY LAST!!!! In: us ..TunnelPeerSelector.selectPeers
(TunnelPoolSettings settings) Which peers should go into the next tunnel for the given settings?TunnelPoolManager.selectPeersInTooManyTunnels()
For reliability reasons, don't allow a peer in more than x% of client and exploratory tunnels.Modifier and TypeMethodDescriptionboolean
ConnectChecker.canConnect
(Hash from, Hash to) Can "from" connect to "to" based on published addresses? This is intended for tunnel candidates, where we already have the RI.static void
BuildMessageGenerator.createRecord
(int recordNum, int hop, TunnelBuildMessage msg, TunnelCreatorConfig cfg, Hash replyRouter, long replyTunnel, RouterContext ctx, PublicKey peerKey) Place the asymmetrically encrypted record in the specified record slot, containing the hop's configuration (as well as the reply info, if it is an outbound endpoint)BuildMessageProcessor.decrypt
(TunnelBuildMessage msg, Hash ourHash, PrivateKey privKey) Decrypt the record targetting us, encrypting all of the other records with the included reply key and IV.void
Fail all outbound tunnels with this peer as first hop, and all inbound tunnels with this peer as the last hop, baecause we can't contact it any more.TunnelPoolManager.getInboundPool
(Hash client) TunnelPoolManager.getInboundSettings
(Hash client) int
TunnelPoolManager.getOutboundClientTunnelCount
(Hash destination) Use to verify a tunnel pool is aliveTunnelPoolManager.getOutboundPool
(Hash client) TunnelPoolManager.getOutboundSettings
(Hash client) boolean
TunnelPoolManager.isValidTunnel
(Hash client, TunnelInfo tunnel) void
TunnelPoolManager.removeTunnels
(Hash destination) This will be called twice, once by the inbound and once by the outbound pool.TunnelPoolManager.selectInboundExploratoryTunnel
(Hash closestTo) Pick the inbound exploratory tunnel with the gateway closest to the given hash.TunnelPoolManager.selectInboundTunnel
(Hash destination) Pick a random inbound tunnel from the given destination's pool.TunnelPoolManager.selectInboundTunnel
(Hash destination, Hash closestTo) Pick the inbound tunnel with the gateway closest to the given hash from the given destination's pool.TunnelPoolManager.selectOutboundExploratoryTunnel
(Hash closestTo) Pick the outbound exploratory tunnel with the endpoint closest to the given hash.TunnelPoolManager.selectOutboundTunnel
(Hash destination) Pick a random outbound tunnel from the given destination's pool.TunnelPoolManager.selectOutboundTunnel
(Hash destination, Hash closestTo) Pick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool.(package private) TunnelInfo
AliasedTunnelPool.selectTunnel
(Hash closestTo) (package private) TunnelInfo
TunnelPool.selectTunnel
(Hash closestTo) Return the tunnel from the pool that is XOR-closet to the target.void
TunnelPoolManager.setInboundSettings
(Hash client, TunnelPoolSettings settings) void
TunnelPoolManager.setOutboundSettings
(Hash client, TunnelPoolSettings settings) (package private) ParticipatingThrottler.Result
ParticipatingThrottler.shouldThrottle
(Hash h) increments before checking(package private) boolean
RequestThrottler.shouldThrottle
(Hash h) increments before checking(package private) void
AliasedTunnelPool.tunnelFailed
(TunnelInfo cfg, Hash blamePeer) (package private) void
TunnelPool.tunnelFailed
(TunnelInfo cfg, Hash blamePeer) Remove the tunnel and blame only one peer.Modifier and TypeMethodDescriptionprotected boolean
TunnelPeerSelector.checkTunnel
(boolean isInbound, List<Hash> tunnel) Connectivity check.protected void
TunnelPeerSelector.orderPeers
(List<Hash> rv, SessionKey key) see HashComparatorModifierConstructorDescriptionPooledTunnelCreatorConfig
(RouterContext ctx, int length, boolean isInbound, Hash destination, TunnelPool pool) Creates a new instance of PooledTunnelCreatorConfig -
Uses of Hash in net.i2p.router.util
Modifier and TypeMethodDescriptionstatic BigInteger
HashDistance.getDistance
(Hash targetKey, Hash routerInQuestion) ModifierConstructorDescriptionMaskedIPSet
(RouterContext ctx, Hash peer, int mask) The Set of IPs for this peer, with a given mask.MaskedIPSet
(RouterContext ctx, Hash peer, RouterInfo pinfo, int mask) The Set of IPs for this peer, with a given mask. -
Uses of Hash in net.i2p.router.web.helpers
Modifier and TypeMethodDescriptionstatic void
SybilRenderer.renderSybilHTML
(Writer out, RouterContext ctx, List<Hash> sybils, String victim) Called from NetDbRenderer -
Uses of Hash in net.i2p.util
-
Uses of Hash in org.klomp.snark
ModifierConstructorDescriptionTrackerResponse
(int interval, int seeds, int leeches, Set<Hash> peers) success -
Uses of Hash in org.klomp.snark.dht
Modifier and TypeClassDescription(package private) class
A single peer for a single torrent.Modifier and TypeMethodDescriptionCaller's responsibility to remove himself from the listDHT.getPeersAndAnnounce
(byte[] ih, int max, long maxWait, int annMax, long annMaxWait, boolean isSeed, boolean noSeeds) Get peers for a torrent, and announce to the closest annMax nodes we find.KRPC.getPeersAndAnnounce
(byte[] ih, int max, long maxWait, int annMax, long annMaxWait, boolean isSeed, boolean noSeeds) Get peers for a torrent, and announce to the closest annMax nodes we find.Modifier and TypeMethodDescription(package private) void
static NID
NodeInfo.generateNID
(Hash h, int p, RandomSource random) Generate a secure NID that matches the Hash and port.(package private) void
DHTTracker.unannounce
(InfoHash ih, Hash hash)