mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 04:44:13 +00:00
Add constants
This commit is contained in:
parent
b0a6c9fa53
commit
a549ebc25f
@ -6,18 +6,24 @@ void TunnelConfig::saveHeaderToStringStream(std::stringstream& out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TunnelConfig::saveI2CPParametersToStringStream(std::stringstream& out) {
|
void TunnelConfig::saveI2CPParametersToStringStream(std::stringstream& out) {
|
||||||
if (i2cpParameters.getInbound_length().toUShort() != 3)
|
if (i2cpParameters.getInbound_length().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNEL_LENGTH)
|
||||||
out << "inbound.length=" << i2cpParameters.getInbound_length().toStdString() << "\n";
|
out << i2p::client::I2CP_PARAM_INBOUND_TUNNEL_LENGTH << "="
|
||||||
if (i2cpParameters.getOutbound_length().toUShort() != 3)
|
<< i2cpParameters.getInbound_length().toStdString() << "\n";
|
||||||
out << "outbound.length=" << i2cpParameters.getOutbound_length().toStdString() << "\n";
|
if (i2cpParameters.getOutbound_length().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNEL_LENGTH)
|
||||||
if (i2cpParameters.getInbound_quantity().toUShort() != 5)
|
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNEL_LENGTH << "="
|
||||||
out << "inbound.quantity=" << i2cpParameters.getInbound_quantity().toStdString() << "\n";
|
<< i2cpParameters.getOutbound_length().toStdString() << "\n";
|
||||||
if (i2cpParameters.getOutbound_quantity().toUShort() != 5)
|
if (i2cpParameters.getInbound_quantity().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNELS_QUANTITY)
|
||||||
out << "outbound.quantity=" << i2cpParameters.getOutbound_quantity().toStdString() << "\n";
|
out << i2p::client::I2CP_PARAM_INBOUND_TUNNELS_QUANTITY << "="
|
||||||
if (i2cpParameters.getCrypto_tagsToSend().toUShort() != 40)
|
<< i2cpParameters.getInbound_quantity().toStdString() << "\n";
|
||||||
out << "crypto.tagsToSend=" << i2cpParameters.getCrypto_tagsToSend().toStdString() << "\n";
|
if (i2cpParameters.getOutbound_quantity().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNELS_QUANTITY)
|
||||||
|
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNELS_QUANTITY << "="
|
||||||
|
<< i2cpParameters.getOutbound_quantity().toStdString() << "\n";
|
||||||
|
if (i2cpParameters.getCrypto_tagsToSend().toUShort() != i2p::client::DEFAULT_TAGS_TO_SEND)
|
||||||
|
out << i2p::client::I2CP_PARAM_TAGS_TO_SEND << "="
|
||||||
|
<< i2cpParameters.getCrypto_tagsToSend().toStdString() << "\n";
|
||||||
if (!i2cpParameters.getExplicitPeers().isEmpty())
|
if (!i2cpParameters.getExplicitPeers().isEmpty())
|
||||||
out << "explicitPeers=" << i2cpParameters.getExplicitPeers().toStdString() << "\n";
|
out << i2p::client::I2CP_PARAM_EXPLICIT_PEERS << "="
|
||||||
|
<< i2cpParameters.getExplicitPeers().toStdString() << "\n";
|
||||||
out << "\n";
|
out << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "../../libi2pd_client/ClientContext.h"
|
#include "../../libi2pd_client/ClientContext.h"
|
||||||
|
#include "../../libi2pd/Destination.h"
|
||||||
#include "TunnelsPageUpdateListener.h"
|
#include "TunnelsPageUpdateListener.h"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user