#include <net_utils_base.h>
|
| static constexpr std::integral_constant< bool, is_store > | is_store_ {} |
Definition at line 110 of file net_utils_base.h.
◆ network_address() [1/2]
| epee::net_utils::network_address::network_address |
( |
| ) |
|
|
inline |
◆ network_address() [2/2]
| epee::net_utils::network_address::network_address |
( |
const T & | src | ) |
|
|
inline |
Definition at line 191 of file net_utils_base.h.
192 : self(std::make_shared<implementation<T>>(src)) {}
◆ as()
| const Type & epee::net_utils::network_address::as |
( |
| ) |
const |
|
inline |
◆ equal()
| bool epee::net_utils::network_address::equal |
( |
const network_address & | other | ) |
const |
Definition at line 25 of file net_utils_base.cpp.
26 {
27
28 network_address::interface const* const self_ = self.get();
29 network_address::interface const* const other_self = other.self.get();
30 if (self_ == other_self) return true;
31 if (!self_ || !other_self) return false;
32 if (typeid(*self_) != typeid(*other_self)) return false;
33 return self_->equal(*other_self);
34 }
◆ get_type_id()
| address_type epee::net_utils::network_address::get_type_id |
( |
| ) |
const |
|
inline |
◆ get_zone()
| zone epee::net_utils::network_address::get_zone |
( |
| ) |
const |
|
inline |
◆ host_str()
| std::string epee::net_utils::network_address::host_str |
( |
| ) |
const |
|
inline |
Definition at line 197 of file net_utils_base.h.
197{ return self ? self->host_str() : "<none>"; }
◆ if()
◆ is_blockable()
| bool epee::net_utils::network_address::is_blockable |
( |
| ) |
const |
|
inline |
Definition at line 202 of file net_utils_base.h.
202{ return self ? self->is_blockable() : false; }
◆ is_local()
| bool epee::net_utils::network_address::is_local |
( |
| ) |
const |
|
inline |
Definition at line 199 of file net_utils_base.h.
199{ return self ? self->is_local() : false; }
◆ is_loopback()
| bool epee::net_utils::network_address::is_loopback |
( |
| ) |
const |
|
inline |
Definition at line 198 of file net_utils_base.h.
198{ return self ? self->is_loopback() : false; }
◆ is_same_host()
| bool epee::net_utils::network_address::is_same_host |
( |
const network_address & | other | ) |
const |
Definition at line 48 of file net_utils_base.cpp.
49 {
50
51 network_address::interface const* const self_ = self.get();
52 network_address::interface const* const other_self = other.self.get();
53 if (self_ == other_self) return true;
54 if (!self_ || !other_self) return false;
55 if (typeid(*self_) != typeid(*other_self)) return false;
56 return self_->is_same_host(*other_self);
57 }
◆ less()
| bool epee::net_utils::network_address::less |
( |
const network_address & | other | ) |
const |
Definition at line 36 of file net_utils_base.cpp.
37 {
38
39 network_address::interface const* const self_ = self.get();
40 network_address::interface const* const other_self = other.self.get();
41 if (self_ == other_self) return false;
42 if (!self_ || !other_self) return self == nullptr;
43 if (typeid(*self_) != typeid(*other_self))
44 return self_->get_type_id() < other_self->get_type_id();
45 return self_->less(*other_self);
46 }
◆ MERROR()
| epee::net_utils::network_address::MERROR |
( |
"Unsupported network address type: "<<(unsigned) | type | ) |
|
◆ str()
| std::string epee::net_utils::network_address::str |
( |
| ) |
const |
|
inline |
◆ switch()
Definition at line 213 of file net_utils_base.h.
214 {
216 return this_ref.template serialize_addr<ipv4_network_address>(
is_store_, stg, hparent_section);
218 return this_ref.template serialize_addr<net::tor_address>(
is_store_, stg, hparent_section);
220 return this_ref.template serialize_addr<net::i2p_address>(
is_store_, stg, hparent_section);
222 default:
223 break;
224 }
static constexpr std::integral_constant< bool, is_store > is_store_
◆ false
| return epee::net_utils::network_address::false |
◆ is_store_
| std::integral_constant<bool, is_store> epee::net_utils::network_address::is_store_ {} |
|
staticconstexpr |
◆ type
| std::uint8_t epee::net_utils::network_address::type = std::uint8_t(is_store ? this_ref.get_type_id() : address_type::invalid) |
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/contrib/epee/include/net/net_utils_base.h
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/contrib/epee/src/net_utils_base.cpp