diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-08-11 22:35:15 -0400 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-08-11 22:35:15 -0400 |
commit | 521b4d9ded086eb4435b12e39acb5b967a28a6e0 (patch) | |
tree | 09ef345db3a388233b51740834ace117a19d880b /contrib | |
parent | Merge pull request #7802 (diff) | |
parent | p2p: remove blocked addresses/hosts from peerlist (diff) | |
download | monero-521b4d9ded086eb4435b12e39acb5b967a28a6e0.tar.xz |
Merge pull request #7809
7354ffb p2p: remove blocked addresses/hosts from peerlist (moneromooo-monero)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/include/net/net_utils_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/epee/include/net/net_utils_base.h b/contrib/epee/include/net/net_utils_base.h index d86c62c17..722206ee1 100644 --- a/contrib/epee/include/net/net_utils_base.h +++ b/contrib/epee/include/net/net_utils_base.h @@ -236,6 +236,7 @@ namespace net_utils virtual address_type get_type_id() const = 0; virtual zone get_zone() const = 0; virtual bool is_blockable() const = 0; + virtual std::uint16_t port() const = 0; }; template<typename T> @@ -266,6 +267,7 @@ namespace net_utils virtual address_type get_type_id() const override { return value.get_type_id(); } virtual zone get_zone() const override { return value.get_zone(); } virtual bool is_blockable() const override { return value.is_blockable(); } + virtual std::uint16_t port() const override { return value.port(); } }; std::shared_ptr<interface> self; @@ -312,6 +314,7 @@ namespace net_utils address_type get_type_id() const { return self ? self->get_type_id() : address_type::invalid; } zone get_zone() const { return self ? self->get_zone() : zone::invalid; } bool is_blockable() const { return self ? self->is_blockable() : false; } + std::uint16_t port() const { return self ? self->port() : 0; } template<typename Type> const Type &as() const { return as_mutable<const Type>(); } BEGIN_KV_SERIALIZE_MAP() |