7#ifndef MINHTON_CORE_PHYSICAL_NODE_INFO_H_
8#define MINHTON_CORE_PHYSICAL_NODE_INFO_H_
14#include "solanet/serializer/serialize.h"
17constexpr uint16_t kPortMin = 1024;
18constexpr uint16_t kPortMax = UINT16_MAX;
95 SERIALIZE(address_, port_);
99 std::string address_ =
"";
101 std::vector<std::string> splitString(
const std::string &,
char token);
104 static bool isIpv4Address(
const std::string &str);
107 static bool isIpv6Address(
const std::string &str);
117 std::to_string(net.
getPort()) +
":" +
119 std::size_t res = std::hash<std::string>()(rep);
Definition physical_node_info.h:23
void setPort(uint16_t port)
Definition physical_node_info.cpp:38
friend bool operator>(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:129
PhysicalNodeInfo()=default
std::string getAddress() const
Definition physical_node_info.cpp:36
friend bool operator<(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:115
friend bool operator>=(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:133
std::string getString() const
Definition physical_node_info.cpp:66
friend bool operator<=(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:122
bool isInitialized() const
Definition physical_node_info.cpp:73
uint32_t getAddressValue() const
Definition physical_node_info.cpp:78
uint16_t getPort() const
Definition physical_node_info.cpp:35
friend bool operator!=(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:111
void setAddress(std::string address)
Definition physical_node_info.cpp:43
friend bool operator==(const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
Definition physical_node_info.cpp:107
Definition minhton_watchdog_ns3.cpp:24
Definition physical_node_info.h:110