aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_defs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-05-27 11:35:54 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-05-27 11:35:54 +0100
commit072102cfd23c47d36f4d51875026339a767f22ae (patch)
tree3005737650989527f71b2c742696e6dfb0a2a7f6 /src/cryptonote_protocol/cryptonote_protocol_defs.h
parentMerge pull request #2015 (diff)
downloadmonero-072102cfd23c47d36f4d51875026339a767f22ae.tar.xz
abstracted nework addresses
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_defs.h')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h
index fd5b980b8..6f6c1a803 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_defs.h
+++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h
@@ -49,6 +49,8 @@ namespace cryptonote
bool localhost;
bool local_ip;
+ std::string address;
+ std::string host;
std::string ip;
std::string port;
@@ -76,6 +78,8 @@ namespace cryptonote
KV_SERIALIZE(incoming)
KV_SERIALIZE(localhost)
KV_SERIALIZE(local_ip)
+ KV_SERIALIZE(address)
+ KV_SERIALIZE(host)
KV_SERIALIZE(ip)
KV_SERIALIZE(port)
KV_SERIALIZE(peer_id)