9 #include <boost/foreach.hpp>
15 #include <vnc_cfg_types.h>
16 #include <agent_types.h>
44 if (proto ==
"TCP" || proto ==
"tcp") {
48 if (proto ==
"UDP" || proto ==
"udp") {
52 if (proto ==
"ICMP" || proto ==
"icmp") {
56 if (proto ==
"SCTP" || proto ==
"sctp") {
64 return atoi(proto.c_str());
68 if (
agent()->flow_stats_req_handler() == NULL) {
72 std::vector<autogen::FlowAgingTimeout>::const_iterator new_list_it =
73 cfg->flow_aging_timeout_list().begin();
76 while (new_list_it != cfg->flow_aging_timeout_list().end()) {
78 if (proto < 0 || proto > 0xFF) {
84 new_list_it->timeout_in_seconds);
87 new_flow_aging_timeout_map.insert(
92 FlowAgingTimeoutMap::const_iterator old_list_it =
96 old_list_it->first.port, 0);
104 if (
agent()->flow_stats_req_handler() == NULL) {
108 FlowAgingTimeoutMap::const_iterator old_list_it =
112 old_list_it->first.port, 0);
119 if (
agent()->port_config_handler() == NULL) {
124 std::vector<autogen::PortTranslationPool>::const_iterator new_list_it =
125 cfg->port_translation_pools().begin();
126 for (;new_list_it != cfg->port_translation_pools().end(); new_list_it++) {
128 if (proto < 0 || proto > 0xFF) {
133 if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
137 uint16_t port_count = 0;
138 std::stringstream str(new_list_it->port_count);
142 if (new_list_it->port_range.start_port != 0 &&
143 new_list_it->port_range.end_port != 0) {
145 new_list_it->port_range.end_port);
146 new_protocol_port_set[proto].port_range.push_back(range);
147 }
else if (port_count != 0) {
148 new_protocol_port_set[proto].port_count = port_count;
153 int result = getrlimit(RLIMIT_NOFILE, &rl);
157 if (avail_count < 0) {
169 int total_port_count = 0;
170 ProtocolPortSet::iterator pc_list_it = new_protocol_port_set.begin();
171 for (; pc_list_it != new_protocol_port_set.end(); pc_list_it++) {
172 pc_list_it->second.Trim();
173 total_port_count += pc_list_it->second.port_count;
176 float avail_percent = 1;
177 if (total_port_count > avail_count) {
178 avail_percent = (float)avail_count / (
float)total_port_count;
181 pc_list_it = new_protocol_port_set.begin();
182 for (; pc_list_it != new_protocol_port_set.end(); pc_list_it++) {
183 pc_list_it->second.port_count *= avail_percent;
185 &(pc_list_it->second));
202 uint32_t max_vm_flows_percent;
203 uint32_t global_max_vmi_flows;
204 if (cfg.IsPropertySet(autogen::GlobalVrouterConfig::MAX_VM_FLOWS_PERCENT)) {
205 max_vm_flows_percent = cfg.max_vm_flows_percent();
209 if (cfg.IsPropertySet(autogen::GlobalVrouterConfig::GLOBAL_MAX_VMI_FLOWS)) {
210 global_max_vmi_flows = cfg.global_max_vmi_flows();
224 const std::string &service_name,
225 const std::string &fabric_dns_name,
226 const std::vector<Ip4Address> &fabric_ip,
227 uint16_t fabric_port)
228 : linklocal_service_name(service_name),
229 ipfabric_dns_service_name(fabric_dns_name),
230 ipfabric_service_ip(fabric_ip),
231 ipfabric_service_port(fabric_port) {
245 BOOST_FOREACH(
Ip4Address ipfabric_addr, ipfabric_service_ip) {
246 if (ipfabric_addr == ip)
282 std::vector<Ip4Address> empty_addr_list;
284 std::scoped_lock lock(
mutex_);
285 BOOST_FOREACH(std::string name, name_list) {
289 new_addr_map.insert(
ResolvePair(name, it->second));
292 new_addr_map.insert(
ResolvePair(name, empty_addr_list));
300 std::scoped_lock lock(
mutex_);
303 int index = rand() % it->second.size();
304 *address = it->second[index];
315 std::scoped_lock lock(
mutex_);
316 for (ResolveMap::const_iterator it =
address_map_.begin();
325 std::scoped_lock lock(
mutex_);
326 for (ResolveMap::const_iterator it =
address_map_.begin();
328 BOOST_FOREACH(
Ip4Address address, it->second) {
341 typedef std::map<std::string, std::vector<Ip4Address> >
ResolveMap;
342 typedef std::pair<std::string, std::vector<Ip4Address> >
ResolvePair;
345 boost_udp::resolver *resolver =
new boost_udp::resolver(
io_);
347 resolver->async_resolve(
348 boost_udp::resolver::query(boost_udp::v4(), name,
"domain"),
350 _1, _2, name, resolver));
356 boost_udp::resolver::iterator resolve_it,
357 std::string &name, boost_udp::resolver *resolver) {
358 std::vector<Ip4Address> old_list;
359 ResolveMap::iterator addr_it;
360 std::scoped_lock lock(
mutex_);
363 old_list.swap(addr_it->second);
365 boost_udp::resolver::iterator end;
366 while (resolve_it != end) {
367 boost_udp::endpoint ep = *resolve_it;
368 addr_it->second.push_back(ep.address().to_v4());
384 boost::asio::io_service &
io_;
421 vn_id_ = global_vrouter_->agent()->vn_table()->Register(
427 global_vrouter_->agent()->vn_table()->Unregister(vn_id_);
431 std::set<Ip4Address>::iterator it;
432 std::pair<std::set<Ip4Address>::iterator,
bool> ret;
434 ret = ipfabric_address_list_.insert(srv);
435 if (ret.second ==
false) {
465 global_vrouter_->agent()->vn_table()->AllocWalker(
467 this, _2, key, is_add),
470 global_vrouter_->agent()->vn_table()->WalkAgain(walk_ref);
507 boost::uuids::nil_uuid(),
529 global_vrouter_->agent()->vn_table()->ReleaseWalker(ref);
543 for (std::set<IpAddress>::const_iterator it =
548 state->
vrf_->
GetName(), *it, it->is_v4() ? 32 : 128, NULL);
567 global_vrouter_->linklocal_services_map();
568 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
569 services.begin(); it != services.end(); ++it) {
571 boost::uuids::nil_uuid(),
575 state->
Add(it->first.linklocal_service_ip);
579 it->first.linklocal_service_ip,
580 it->first.linklocal_service_ip.is_v4() ? 32 : 128,
595 (this, *(
agent->event_manager()->io_service()))),
650 autogen::SecurityLoggingObject *slo =
651 static_cast<autogen::SecurityLoggingObject *
>(adj_node->
653 autogen::IdPermsType id_perms = slo->id_perms();
654 CfgUuidSet(id_perms.uuid.uuid_mslong, id_perms.uuid.uuid_lslong,
664 bool resync_vn =
false;
665 bool resync_route =
false;
670 autogen::GlobalVrouterConfig *cfg =
671 static_cast<autogen::GlobalVrouterConfig *
>(node->
GetObject());
677 if (cfg->vxlan_network_identifier_mode() ==
"configured") {
682 cfg->encryption_mode());
692 if (cfg->IsPropertySet
693 (autogen::GlobalVrouterConfig::FLOW_EXPORT_RATE)) {
701 if (cfg->ecmp_hashing_include_fields().hashing_configured) {
703 ecmp_hashing_include_fields());
719 if (cfg_vxlan_network_identifier_mode !=
720 agent()->vxlan_network_identifier_mode()) {
722 (cfg_vxlan_network_identifier_mode);
744 uint16_t *service_port,
745 std::string *fabric_hostname,
747 uint16_t *fabric_port)
const {
748 std::string name = boost::to_lower_copy(service_name);
750 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
753 if (it->second.linklocal_service_name == name) {
754 *service_ip = it->first.linklocal_service_ip;
755 *service_port = it->first.linklocal_service_port;
756 *fabric_port = it->second.ipfabric_service_port;
757 *fabric_hostname = it->second.ipfabric_dns_service_name;
758 if (it->second.ipfabric_service_ip.size()) {
760 int index = rand() % it->second.ipfabric_service_ip.size();
761 *fabric_ip = it->second.ipfabric_service_ip[index];
765 if (it->second.ipfabric_dns_service_name.empty())
766 *fabric_hostname = fabric_ip->to_string();
768 }
else if (!it->second.ipfabric_dns_service_name.empty()) {
770 it->second.ipfabric_dns_service_name, fabric_ip);
779 uint16_t service_port,
780 std::string *service_name,
782 uint16_t *fabric_port)
const {
783 LinkLocalServicesMap::const_iterator it =
792 uint16_t metadata_service_port, metadata_fabric_port;
794 &metadata_service_ip,
795 &metadata_service_port,
797 &metadata_fabric_port) &&
798 service_ip == metadata_service_ip) {
808 *service_name = it->second.linklocal_service_name;
810 != std::string::npos) {
817 *fabric_port = it->second.ipfabric_service_port;
819 if (it->second.ipfabric_service_ip.size()) {
820 int index = rand() % it->second.ipfabric_service_ip.size();
821 *fabric_ip = it->second.ipfabric_service_ip[index];
826 }
else if (!it->second.ipfabric_dns_service_name.empty()) {
828 it->second.ipfabric_dns_service_name, fabric_ip);
835 std::set<IpAddress> *service_ip
837 if (service_name.empty())
840 std::string name = boost::to_lower_copy(service_name);
841 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
844 if (it->second.linklocal_service_name == name) {
845 service_ip->insert(it->first.linklocal_service_ip);
849 return (service_ip->size() > 0);
854 std::set<std::string> *service_names
856 LinkLocalServicesMap::const_iterator it =
860 it->first.linklocal_service_ip == service_ip) {
861 service_names->insert(it->second.linklocal_service_name);
865 return (service_names->size() > 0);
872 std::vector<std::string> dns_name_list;
874 for (std::vector<autogen::LinklocalServiceEntryType>::const_iterator it =
875 linklocal_list.begin(); it != linklocal_list.end(); it++) {
876 boost::system::error_code ec;
877 IpAddress llip = IpAddress::from_string(it->linklocal_service_ip, ec);
878 std::vector<Ip4Address> fabric_ip;
879 BOOST_FOREACH(std::string ip_fabric_ip, it->ip_fabric_service_ip) {
880 Ip4Address ip = Ip4Address::from_string(ip_fabric_ip, ec);
882 fabric_ip.push_back(ip);
884 std::string name = boost::to_lower_copy(it->linklocal_service_name);
888 fabric_ip, it->ip_fabric_service_port)));
889 if (!it->ip_fabric_DNS_service_name.empty())
890 dns_name_list.push_back(it->ip_fabric_DNS_service_name);
899 std::vector<std::string> dns_name_list;
911 LinkLocalServicesMap::iterator it_old = old_value->begin();
912 LinkLocalServicesMap::iterator it_new = new_value->begin();
913 while (it_old != old_value->end() && it_new != new_value->end()) {
914 if (it_old->first < it_new->first) {
919 }
else if (it_new->first < it_old->first) {
924 }
else if (it_new->second == it_old->second) {
938 for (; it_old != old_value->end(); ++it_old) {
944 for (; it_new != new_value->end(); ++it_new) {
954 const LinkLocalServicesMap::iterator &it) {
956 BOOST_FOREACH(
Ip4Address ip, it->second.ipfabric_service_ip) {
963 const LinkLocalServicesMap::iterator &it) {
970 const LinkLocalServicesMap::iterator &old_it,
971 const LinkLocalServicesMap::iterator &new_it) {
972 if (old_it->first.linklocal_service_ip !=
973 new_it->first.linklocal_service_ip) {
982 const std::vector<Ip4Address> &addr_list) {
989 for (LinkLocalServicesMap::const_iterator it =
992 if (it->second.IsAddressInUse(ip))
999 for (LinkLocalServicesMap::const_iterator it =
1002 if (it->first.linklocal_service_ip == ip)
1019 void LinkLocalServiceInfo::HandleRequest()
const {
1020 LinkLocalServiceResponse *resp =
new LinkLocalServiceResponse();
1021 std::vector<LinkLocalServiceData> linklocal_list;
1024 global_vrouter()->linklocal_services_map();
1026 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
1027 services.begin(); it != services.end(); ++it) {
1028 LinkLocalServiceData service;
1029 service.linklocal_service_name = it->second.linklocal_service_name;
1030 service.linklocal_service_ip =
1031 it->first.linklocal_service_ip.to_string();
1032 service.linklocal_service_port = it->first.linklocal_service_port;
1033 service.ipfabric_dns_name = it->second.ipfabric_dns_service_name;
1034 BOOST_FOREACH(
Ip4Address ip, it->second.ipfabric_service_ip) {
1035 service.ipfabric_ip.push_back(ip.to_string());
1037 service.ipfabric_port = it->second.ipfabric_service_port;
1038 linklocal_list.push_back(service);
1041 resp->set_service_list(linklocal_list);
1042 resp->set_context(context());
1050 bool vrouter_present =
false;
1051 for (EncryptionTunnelEndpointList::const_iterator it = endpoint_list.begin();
1052 it != endpoint_list.end(); it++) {
1053 if (it->tunnel_remote_ip_address.compare(
agent()->router_id().to_string()) == 0) {
1054 vrouter_present =
true;
1058 return vrouter_present;
1066 if (!
agent()->crypt_interface())
1069 if (boost::iequals(encrypt_mode_str,
"all"))
1071 for (EncryptionTunnelEndpointList::const_iterator it = endpoint_list.begin();
1072 it != endpoint_list.end(); it++) {
1073 if (it->tunnel_remote_ip_address.compare(
agent()->router_id().to_string()) == 0) {
1089 bool change =
false;
1090 CryptTunnelsMap::iterator it_old = old_value->begin();
1091 CryptTunnelsMap::iterator it_new = new_value->begin();
1092 while (it_old != old_value->end() && it_new != new_value->end()) {
1093 if (it_old->first < it_new->first) {
1098 }
else if (it_new->first < it_old->first) {
1103 }
else if (it_new->second == it_old->second) {
1117 for (; it_old != old_value->end(); ++it_old) {
1123 for (; it_new != new_value->end(); ++it_new) {
1132 bool crypt_traffic =
false;
1134 crypt_traffic =
true;
1143 const CryptTunnelsMap::iterator &new_it) {
1158 for (uint16_t index = 0; index <
port_range.size(); index++) {
1171 for (uint16_t sub_index = 0; sub_index <
port_range.size(); sub_index++) {
1172 if (index == sub_index) {
1210 std::vector<PortRange>::iterator it =
port_range.begin();
1212 std::vector<PortRange>::iterator prev_it = it++;
1213 if (prev_it->port_end == 0 &&
1214 prev_it->port_start == 0) {
1218 port_count += (prev_it->port_end - prev_it->port_start) + 1;
boost::asio::ip::address IpAddress
boost::asio::ip::address_v4 Ip4Address
#define FLOWS_LIMIT_UNLIMITED
std::vector< int > TagList
std::vector< int > SecurityGroupList
std::set< std::string > VnListType
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
IFMapAgentTable * cfg_slo_table() const
ConfigManager * config_manager() const
Agent::ForwardingMode TranslateForwardingMode(const std::string &mode) const
void set_vxlan_network_identifier_mode(VxLanNetworkIdentifierMode mode)
uint16_t metadata_server_port() const
static const uint32_t kMaxOtherOpenFds
void set_global_slo_status(bool flag)
AgentConfig * cfg() const
VxLanNetworkIdentifierMode
const std::string & fabric_vn_name() const
const std::string & vhost_interface_name() const
uint32_t flow_table_size() const
VnTable * vn_table() const
void set_max_vm_flows_perc(uint32_t count)
FlowStatsReqHandler & flow_stats_req_handler()
const Peer * link_local_peer() const
static Agent * GetInstance()
const Interface * vhost_interface() const
PortConfigHandler & port_config_handler()
process::ConnectionState * connection_state() const
const std::string & fabric_vrf_name() const
CryptTunnelTable * crypt_tunnel_table() const
Ip4Address router_id() const
void update_max_vm_flows(uint32_t flow_table_size)
void set_global_max_vmi_flows(uint32_t count)
bool SkipNode(IFMapNode *node)
void AddGlobalVrouterNode(IFMapNode *node)
void Create(const std::string &remote_ip, bool crypt)
void Delete(const std::string &remote_ip)
DBState * GetState(DBTableBase *tbl_base, ListenerId listener) const
void ClearState(DBTableBase *tbl_base, ListenerId listener)
DBTablePartBase * get_table_partition() const
void SetState(DBTableBase *tbl_base, ListenerId listener, DBState *state)
adjacency_iterator end(DBGraph *graph)
adjacency_iterator begin(DBGraph *graph)
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
bool UpdateFields(const autogen::EcmpHashingIncludeFields &ecmp_hashing_fields)
void ResolveHandler(const boost::system::error_code &error, boost_udp::resolver::iterator resolve_it, std::string &name, boost_udp::resolver *resolver)
std::pair< std::string, std::vector< Ip4Address > > ResolvePair
uint64_t PendingRequests() const
std::map< std::string, std::vector< Ip4Address > > ResolveMap
bool IsAddressInUse(const Ip4Address &ip)
static const uint32_t kDnsTimeout
GlobalVrouter * global_vrouter_
bool Resolve(const std::string &name, Ip4Address *address)
boost::asio::ip::udp boost_udp
void ResolveList(const std::vector< std::string > &name_list)
boost::asio::io_service & io_
void ResolveName(const std::string &name)
FabricDnsResolver(GlobalVrouter *vrouter, boost::asio::io_service &io)
virtual ~FabricDnsResolver()
virtual ~LinkLocalRouteManager()
bool VnUpdateWalk(DBEntryBase *entry, const LinkLocalServiceKey key, bool is_add)
std::set< Ip4Address > ipfabric_address_list_
GlobalVrouter * global_vrouter_
DBTableBase::ListenerId vn_id_
std::set< IpAddress > linklocal_address_list_
void AddArpRoute(const Ip4Address &srv)
bool VnNotify(DBTablePartBase *partition, DBEntryBase *entry)
void UpdateAllVns(const LinkLocalServiceKey &key, bool is_add)
void VnWalkDone(DBTable::DBTableWalkRef ref)
LinkLocalRouteManager(GlobalVrouter *vrouter)
boost::uuids::uuid slo_uuid_
bool IsLinkLocalAddressInUse(const IpAddress &ip) const
void DeleteCryptTunnelEndpoint(const CryptTunnelsMap::iterator &it)
boost::scoped_ptr< FabricDnsResolver > fabric_dns_resolver_
void AddLinkLocalService(const LinkLocalServicesMap::iterator &it)
void GlobalVrouterConfig(IFMapNode *node)
std::vector< autogen::EncryptionTunnelEndpoint > EncryptionTunnelEndpointList
void DeleteCryptTunnelEndpointConfig()
std::pair< FlowAgingTimeoutKey, uint32_t > FlowAgingTimeoutPair
bool ChangeNotifyCryptTunnels(CryptTunnelsMap *old_value, CryptTunnelsMap *new_value)
static const int32_t kDefaultFlowExportRate
AgentRouteWalkerPtr agent_route_resync_walker_
const LinkLocalServicesMap & linklocal_services_map() const
static const std::string kMetadataService6
const EcmpLoadBalance & ecmp_load_balance() const
std::pair< LinkLocalServiceKey, LinkLocalService > LinkLocalServicesPair
static const Ip4Address kLoopBackIp
static const std::string kMetadataService
void DeleteLinkLocalService(const LinkLocalServicesMap::iterator &it)
void UpdatePortConfig(autogen::GlobalVrouterConfig *cfg)
bool FindLinkLocalService(const std::string &service_name, IpAddress *service_ip, uint16_t *service_port, std::string *fabric_hostname, Ip4Address *fabric_ip, uint16_t *fabric_port) const
Get link local service configuration info, for a given service name.
void ChangeCryptTunnelEndpoint(const CryptTunnelsMap::iterator &old_it, const CryptTunnelsMap::iterator &new_it)
void ConfigManagerEnqueue(IFMapNode *node)
std::map< FlowAgingTimeoutKey, uint32_t > FlowAgingTimeoutMap
std::map< CryptTunnelKey, CryptTunnel > CryptTunnelsMap
FlowAgingTimeoutMap flow_aging_timeout_map_
std::vector< autogen::LinklocalServiceEntryType > LinkLocalServiceList
void UpdateSLOConfig(IFMapNode *node)
boost::scoped_ptr< LinkLocalRouteManager > linklocal_route_mgr_
CryptTunnelsMap crypt_tunnels_map_
ProtocolPortSet protocol_port_set_
void UpdateCryptTunnelEndpointConfig(const EncryptionTunnelEndpointList &endpoint_list, const std::string encrypt_mode_str)
int32_t flow_export_rate_
GlobalVrouter(Agent *agent)
void AddCryptTunnelEndpoint(const CryptTunnelsMap::iterator &it)
void UpdateFlowAging(autogen::GlobalVrouterConfig *cfg)
void UpdateLinkLocalServiceConfig(const LinkLocalServiceList &linklocal_list)
void LinkLocalRouteUpdate(const std::vector< Ip4Address > &addr_list)
std::map< uint8_t, PortConfig > ProtocolPortSet
void ConfigAddChange(IFMapNode *node)
EcmpLoadBalance ecmp_load_balance_
LinkLocalServicesMap linklocal_services_map_
uint64_t PendingFabricDnsRequests() const
bool IsAddressInUse(const Ip4Address &ip) const
bool ChangeNotify(LinkLocalServicesMap *old_value, LinkLocalServicesMap *new_value)
void ReadFlowsLimits(const autogen::GlobalVrouterConfig &cfg)
Reads configuration flow global flow limits.
bool IsVrouterPresentCryptTunnelConfig(const EncryptionTunnelEndpointList &endpoint_list)
std::string CryptTunnelKey
void ChangeLinkLocalService(const LinkLocalServicesMap::iterator &old_it, const LinkLocalServicesMap::iterator &new_it)
std::pair< CryptTunnelKey, CryptTunnel > CryptTunnelsPair
void DeleteLinkLocalServiceConfig()
void ConfigDelete(IFMapNode *node)
std::map< LinkLocalServiceKey, LinkLocalService > LinkLocalServicesMap
Agent::ForwardingMode forwarding_mode_
const DBGraph * GetGraph() const
IFMapObject * GetObject()
static void AddVHostRecvRoute(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap, bool ipam_host_route=true)
static void CheckAndAddArpReq(const string &vrf_name, const Ip4Address &ip, const Interface *intf, const VnListType &vn_list, const SecurityGroupList &sg, const TagList &tag)
static void DeleteReq(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen, AgentRouteData *data)
AgentRouteWalkerManager * agent_route_walk_manager() const
static bool DeleteTimer(Timer *Timer)
static Timer * CreateTimer(boost::asio::io_context &service, const std::string &name, int task_id=Timer::GetTimerTaskId(), int task_instance=Timer::GetTimerInstanceId(), bool delete_on_completion=false)
bool Start(int time, Handler handler, ErrorHandler error_handler=NULL)
static void DeletePriorityList()
static bool EncapPrioritySync(const std::vector< std::string > &cfg_list)
VrfEntry * GetVrf() const
const string & GetName() const
bool layer3_forwarding() const
void GlobalVrouterConfigChanged()
const string & GetName() const
InetUnicastAgentRouteTable * GetInetUnicastRouteTable(const IpAddress &addr) const
static int ProtocolToString(const std::string proto)
uint16_t linklocal_service_port
IpAddress linklocal_service_ip
bool operator<(const LinkLocalServiceKey &rhs) const
LinkLocalService(const std::string &service_name, const std::string &fabric_dns_name, const std::vector< Ip4Address > &fabric_ip, uint16_t fabric_port)
std::string linklocal_service_name
std::vector< Ip4Address > ipfabric_service_ip
uint16_t ipfabric_service_port
bool operator==(const LinkLocalService &rhs) const
bool IsAddressInUse(const Ip4Address &ip) const
std::string ipfabric_dns_service_name
void Add(const IpAddress &address)
void Delete(const IpAddress &address)
std::set< IpAddress > addresses_
std::vector< PortRange > port_range