forked from I2P_Developers/i2p.i2p
Router: Misc. javadocs and debug
This commit is contained in:
@ -72,7 +72,6 @@ class SymmetricState implements Destroyable {
|
|||||||
* Constructs a new symmetric state object.
|
* Constructs a new symmetric state object.
|
||||||
* Noise protocol name is hardcoded.
|
* Noise protocol name is hardcoded.
|
||||||
*
|
*
|
||||||
* @param protocolName The name of the Noise protocol, which is assumed to be valid.
|
|
||||||
* @param cipherName The name of the cipher within protocolName.
|
* @param cipherName The name of the cipher within protocolName.
|
||||||
* @param hashName The name of the hash within protocolName.
|
* @param hashName The name of the hash within protocolName.
|
||||||
*
|
*
|
||||||
|
@ -157,11 +157,9 @@ public class RouterInfo extends DatabaseEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the approximate date on which the info was published
|
* Retrieve the timestamp on which the info was published,
|
||||||
* (essentially a version number for the routerInfo structure, except that
|
* essentially a version number for the RouterInfo.
|
||||||
* it also contains freshness information - whether or not the router is
|
* This should be used to expire old RouterInfo structures.
|
||||||
* currently publishing its information). This should be used to help expire
|
|
||||||
* old routerInfo structures
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public long getPublished() {
|
public long getPublished() {
|
||||||
|
@ -371,12 +371,12 @@ public class OutNetMessage implements CDPQEntry {
|
|||||||
buf.append(getMessageType());
|
buf.append(getMessageType());
|
||||||
buf.append(" ID ").append(_messageId);
|
buf.append(" ID ").append(_messageId);
|
||||||
}
|
}
|
||||||
buf.append(" expiring on ").append(new Date(_expiration));
|
buf.append(" expiring ").append(new Date(_expiration));
|
||||||
buf.append(" priority ").append(_priority);
|
buf.append(" priority ").append(_priority);
|
||||||
if (_failedTransports != null)
|
if (_failedTransports != null)
|
||||||
buf.append(" failed delivery on transports ").append(_failedTransports);
|
buf.append(" failed transports: ").append(_failedTransports);
|
||||||
if (_target == null)
|
if (_target == null)
|
||||||
buf.append(" targetting no one in particular...");
|
buf.append(" (null target)");
|
||||||
else
|
else
|
||||||
buf.append(" targetting ").append(_target.getIdentity().getHash().toBase64());
|
buf.append(" targetting ").append(_target.getIdentity().getHash().toBase64());
|
||||||
if (_onReply != null)
|
if (_onReply != null)
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 0;
|
public final static long BUILD = 1;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
@ -572,8 +572,7 @@ public class DHSessionKeyBuilder {
|
|||||||
*/
|
*/
|
||||||
public void returnUnused(DHSessionKeyBuilder builder) {
|
public void returnUnused(DHSessionKeyBuilder builder) {
|
||||||
if (builder.getPeerPublicValue() != null) {
|
if (builder.getPeerPublicValue() != null) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
_log.error("builder returned used", new Exception());
|
||||||
_log.warn("builder returned used");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_context.statManager().addRateData("crypto.DHReused", 1);
|
_context.statManager().addRateData("crypto.DHReused", 1);
|
||||||
|
@ -310,7 +310,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
|||||||
int port = getRequestedPort();
|
int port = getRequestedPort();
|
||||||
if (port < 0) {
|
if (port < 0) {
|
||||||
port = UDPEndpoint.selectRandomPort(_context);
|
port = UDPEndpoint.selectRandomPort(_context);
|
||||||
Map<String, String> changes = new HashMap<String, String>();
|
Map<String, String> changes = new HashMap<String, String>(2);
|
||||||
changes.put(PROP_INTERNAL_PORT, Integer.toString(port));
|
changes.put(PROP_INTERNAL_PORT, Integer.toString(port));
|
||||||
changes.put(PROP_EXTERNAL_PORT, Integer.toString(port));
|
changes.put(PROP_EXTERNAL_PORT, Integer.toString(port));
|
||||||
_context.router().saveConfig(changes, null);
|
_context.router().saveConfig(changes, null);
|
||||||
|
@ -305,7 +305,7 @@ public class TunnelPool {
|
|||||||
/**
|
/**
|
||||||
* Return a list of tunnels in the pool
|
* Return a list of tunnels in the pool
|
||||||
*
|
*
|
||||||
* @return list of TunnelInfo objects
|
* @return A copy of the list of TunnelInfo objects
|
||||||
*/
|
*/
|
||||||
public List<TunnelInfo> listTunnels() {
|
public List<TunnelInfo> listTunnels() {
|
||||||
synchronized (_tunnels) {
|
synchronized (_tunnels) {
|
||||||
|
Reference in New Issue
Block a user