Changeset eefb36c
- Timestamp:
- Jan 26, 2017 9:37:23 PM (4 years ago)
- Branches:
- master
- Children:
- d196047
- Parents:
- dc5bfb2
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/crypto/SHA1.java
rdc5bfb2 reefb36c 63 63 * <li> Bruce Schneier, "Section 18.7 Secure Hash Algorithm (SHA)", 64 64 * <cite>Applied Cryptography, 2nd edition</cite>, <br> 65 * John Wiley & Sons, 1996</li>65 * John Wiley & Sons, 1996</li> 66 66 * </ol> 67 67 */ -
core/java/src/net/i2p/kademlia/KBucketImpl.java
rdc5bfb2 reefb36c 35 35 * Per-key last-seen-time, failures, etc. must be tracked elsewhere. 36 36 * 37 * If this bucket is full (i.e. begin == end & &size == max)37 * If this bucket is full (i.e. begin == end && size == max) 38 38 * then add() will call KBucketTrimmer.trim() do 39 39 * (possibly) remove older entries, and indicate whether -
core/java/src/net/metanotion/io/block/BlockFile.java
rdc5bfb2 reefb36c 338 338 * Go to any page but the superblock. 339 339 * Page 1 is the superblock, must use file.seek(0) to get there. 340 * @param page >= 2340 * @param page >= 2 341 341 */ 342 342 public static void pageSeek(RandomAccessInterface file, int page) throws IOException { -
core/java/src/net/metanotion/io/block/index/BSkipList.java
rdc5bfb2 reefb36c 222 222 ****/ 223 223 224 /** find */ 224 225 @Override 225 226 public SkipIterator<K, V> find(K key) { -
router/java/src/net/i2p/data/i2np/I2NPMessage.java
rdc5bfb2 reefb36c 39 39 * 40 40 * @param in stream to read from 41 * starting at type if type is <0 (16 byte header)42 * starting at ID if type is >= 0 (15 byte header)41 * starting at type if type is < 0 (16 byte header) 42 * starting at ID if type is >= 0 (15 byte header) 43 43 * @param type I2NP message type. If less than zero, read the type from data 44 44 * @param buffer scratch buffer to be used when reading and parsing … … 59 59 * @param type I2NP message type. If less than zero, read the type from data 60 60 * @param offset where to start 61 * starting at type if type is <0 (16 byte header)62 * starting at ID if type is >= 0 (15 byte header)61 * starting at type if type is < 0 (16 byte header) 62 * starting at ID if type is >= 0 (15 byte header) 63 63 * @return size of the message read (including headers) 64 64 * @throws I2NPMessageException if there is no valid message … … 74 74 * @param type I2NP message type. If less than zero, read the type from data 75 75 * @param offset where to start 76 * starting at type if type is <0 (16 byte header)77 * starting at ID if type is >= 0 (15 byte header)76 * starting at type if type is < 0 (16 byte header) 77 * starting at ID if type is >= 0 (15 byte header) 78 78 * @param maxLen read no more than this many bytes from data starting at offset, even if it is longer 79 * This includes the type byte only if type <079 * This includes the type byte only if type < 0 80 80 * @return size of the message read (including headers) 81 81 * @throws I2NPMessageException if there is no valid message -
router/java/src/net/i2p/router/TunnelPoolSettings.java
rdc5bfb2 reefb36c 167 167 * Always true for exploratory. 168 168 * Generally true for client, but should probably be ignored... 169 * use getLength() + getLengthVariance() >0 instead.169 * use getLength() + getLengthVariance() > 0 instead. 170 170 */ 171 171 public boolean getAllowZeroHop() { return _allowZeroHop; } -
router/java/src/net/i2p/router/client/LookupDestJob.java
rdc5bfb2 reefb36c 44 44 * even if the dest uses unsupported crypto. 45 45 * 46 * @param reqID must be >= 0 if name != null47 * @param sessID must non-null if reqID >= 046 * @param reqID must be >= 0 if name != null 47 * @param sessID must non-null if reqID >= 0 48 48 * @param fromLocalDest use these tunnels for the lookup, or null for exploratory 49 49 * @since 0.9.11 -
router/java/src/net/i2p/router/message/GarlicMessageBuilder.java
rdc5bfb2 reefb36c 36 36 /** 37 37 * @param local non-null; do not use this method for the router's SessionKeyManager 38 * @param minTagOverride 0 for no override, >0 to override SKM's settings38 * @param minTagOverride 0 for no override, > 0 to override SKM's settings 39 39 */ 40 40 static boolean needsTags(RouterContext ctx, PublicKey key, Hash local, int minTagOverride) { -
router/java/src/net/i2p/router/message/OutboundClientMessageJobHelper.java
rdc5bfb2 reefb36c 100 100 * This is called from OCMOSJ 101 101 * 102 * @param tagsToSendOverride if >0, use this instead of skm's default103 * @param lowTagsOverride if >0, use this instead of skm's default102 * @param tagsToSendOverride if > 0, use this instead of skm's default 103 * @param lowTagsOverride if > 0, use this instead of skm's default 104 104 * @param wrappedKey output parameter that will be filled with the sessionKey used 105 105 * @param wrappedTags output parameter that will be filled with the sessionTags used -
router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java
rdc5bfb2 reefb36c 152 152 * @param kbuckets now unused 153 153 * 154 * Sorted by closest to the key if >maxNumRouters, otherwise not154 * Sorted by closest to the key if > maxNumRouters, otherwise not 155 155 * The list is in 3 groups - sorted by routing key within each group. 156 156 * Group 1: No store or lookup failure in a long time, and -
router/java/src/net/i2p/router/time/NtpMessage.java
rdc5bfb2 reefb36c 279 279 280 280 /** 281 * Constructs a new NtpMessage in client - >server mode, and sets the281 * Constructs a new NtpMessage in client -> server mode, and sets the 282 282 * transmit timestamp to the current time. 283 283 */ -
router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java
rdc5bfb2 reefb36c 834 834 * Only used by SSU. 835 835 * May return without allocating. 836 * Check getPendingRequested() >0 in a loop.836 * Check getPendingRequested() > 0 in a loop. 837 837 */ 838 838 public void waitForNextAllocation() { … … 913 913 * Block until we are allocated some more bytes. 914 914 * May return without allocating. 915 * Check getPendingRequested() >0 in a loop.915 * Check getPendingRequested() > 0 in a loop. 916 916 */ 917 917 public void waitForNextAllocation(); -
router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java
rdc5bfb2 reefb36c 52 52 public static final int DEFAULT_INBOUND_BANDWIDTH = 300; 53 53 /** 54 * Caution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT >3254 * Caution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT > 32 55 55 * without thinking about the implications (default connection limits, for example) 56 56 * of moving the default bandwidth class from L to M, or maybe -
router/java/src/net/i2p/router/transport/ntcp/EstablishState.java
rdc5bfb2 reefb36c 31 31 * 32 32 * Message 1 (Session Request): 33 * X+(H(X) xor Bob.identHash)----------------------------- >33 * X+(H(X) xor Bob.identHash)-----------------------------> 34 34 * 35 35 * Message 2 (Session Created): 36 * <----------------------------------------Y+E(H(X+Y)+tsB, sk, Y[239:255])36 * <----------------------------------------Y+E(H(X+Y)+tsB, sk, Y[239:255]) 37 37 * 38 38 * Message 3 (Session Confirm A): 39 * E(sz+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])--- >39 * E(sz+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])---> 40 40 * 41 41 * Message 4 (Session Confirm B): 42 * <----------------------E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev)42 * <----------------------E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) 43 43 * 44 44 * Key: -
router/java/src/net/i2p/router/transport/udp/PacketBuilder.java
rdc5bfb2 reefb36c 223 223 * This doesn't leave anything for acks. 224 224 * 225 * @param numFragments >= 1225 * @param numFragments >= 1 226 226 * @since 0.9.16 227 227 */ -
router/java/src/net/i2p/router/transport/udp/PeerState.java
rdc5bfb2 reefb36c 1627 1627 * Pick one or more messages we want to send and allocate them out of our window 1628 1628 * High usage - 1629 * OutboundMessageFragments.getNextVolley() calls this 2nd, if finishMessages() returned >0.1629 * OutboundMessageFragments.getNextVolley() calls this 2nd, if finishMessages() returned > 0. 1630 1630 * TODO combine finishMessages(), allocateSend(), and getNextDelay() so we don't iterate 3 times. 1631 1631 * … … 1858 1858 /** 1859 1859 * A full ACK was received. 1860 * TODO if messages awaiting ack were a HashMap <Long, OutboundMessageState>this would be faster.1860 * TODO if messages awaiting ack were a HashMap<Long, OutboundMessageState> this would be faster. 1861 1861 * 1862 1862 * @return true if the message was acked for the first time -
router/java/src/net/i2p/router/transport/udp/UDPTransport.java
rdc5bfb2 reefb36c 709 709 * The current or configured internal IPv4 port. 710 710 * UDPEndpoint should always be instantiated (and a random port picked if not configured) 711 * before this is called, so the returned value should be >0711 * before this is called, so the returned value should be > 0 712 712 * unless the endpoint failed to bind. 713 713 */ … … 720 720 * The current or configured internal port. 721 721 * UDPEndpoint should always be instantiated (and a random port picked if not configured) 722 * before this is called, so the returned value should be >0722 * before this is called, so the returned value should be > 0 723 723 * unless the endpoint failed to bind. 724 724 */ … … 904 904 * @param from Hash of inbound destination 905 905 * @param ourIP publicly routable IPv4 only 906 * @param ourPort >= 1024906 * @param ourPort >= 1024 907 907 */ 908 908 void externalAddressReceived(Hash from, byte ourIP[], int ourPort) { … … 977 977 * @param ourIP MUST have been previously validated with isValid() 978 978 * IPv4 or IPv6 OK 979 * @param ourPort >= 1024 or 0 for no change979 * @param ourPort >= 1024 or 0 for no change 980 980 */ 981 981 private boolean changeAddress(byte ourIP[], int ourPort) { -
router/java/src/net/i2p/router/tunnel/BatchedPreprocessor.java
rdc5bfb2 reefb36c 36 36 * let's look to see if we have somthing that would fit instead 37 37 * by reordering: 38 * if (allocated > 0 &&msg.getFragment == 0) {39 * for (j = i+1, j <pending.size(); j++) {38 * if (allocated > 0 && msg.getFragment == 0) { 39 * for (j = i+1, j < pending.size(); j++) { 40 40 * if it will fit and it is fragment 0 { 41 41 * msg = pending.remove(j) -
router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java
rdc5bfb2 reefb36c 34 34 * Following tunnels are created by us: 35 35 * 36 * Outbound Gateway >0 hops:36 * Outbound Gateway > 0 hops: 37 37 * PumpedTunnelGateway 38 * BatchedRouterPreprocessor - > OutboundSender -> OutboundReceiver ->OutNetMessagePool38 * BatchedRouterPreprocessor -> OutboundSender -> OutboundReceiver -> OutNetMessagePool 39 39 * 40 40 * Outbound zero-hop Gateway+Endpoint: 41 41 * TunnelGatewayZeroHop 42 * OutboundMessageDistributor - >OutNetMessagePool43 * 44 * Inbound Endpoint >0 hops:42 * OutboundMessageDistributor -> OutNetMessagePool 43 * 44 * Inbound Endpoint > 0 hops: 45 45 * TunnelParticipant 46 * RouterFragmentHandler - > InboundEndpointProcessor -> InboundMessageDistributor ->InNetMessagePool46 * RouterFragmentHandler -> InboundEndpointProcessor -> InboundMessageDistributor -> InNetMessagePool 47 47 * 48 48 * Inbound zero-hop Gateway+Endpoint: 49 49 * TunnelGatewayZeroHop 50 * InboundMessageDistributor - >InNetMessagePool50 * InboundMessageDistributor -> InNetMessagePool 51 51 * 52 52 * … … 55 55 * Participant (not gateway or endpoint) 56 56 * TunnelParticipant 57 * HopProcessor - >OutNetMessagePool58 * 59 * Outbound Endpoint >0 hops:57 * HopProcessor -> OutNetMessagePool 58 * 59 * Outbound Endpoint > 0 hops: 60 60 * OutboundTunnelEndpoint 61 * RouterFragmentHandler - > HopProcessor -> OutboundMessageDistributor ->OutNetMessagePool62 * 63 * Inbound Gateway >0 hops:61 * RouterFragmentHandler -> HopProcessor -> OutboundMessageDistributor -> OutNetMessagePool 62 * 63 * Inbound Gateway > 0 hops: 64 64 * ThrottledPumpedTunnelGateway 65 * BatchedRouterPreprocessor - > InboundSender -> InboundGatewayReceiver ->OutNetMessagePool65 * BatchedRouterPreprocessor -> InboundSender -> InboundGatewayReceiver -> OutNetMessagePool 66 66 * 67 67 *</pre>
Note: See TracChangeset
for help on using the changeset viewer.