6 #include <boost/foreach.hpp>
12 #include <vnc_cfg_types.h>
13 #include <agent_types.h>
41 if (proto ==
"TCP" || proto ==
"tcp") {
45 if (proto ==
"UDP" || proto ==
"udp") {
49 if (proto ==
"ICMP" || proto ==
"icmp") {
53 if (proto ==
"SCTP" || proto ==
"sctp") {
61 return atoi(proto.c_str());
65 if (
agent()->flow_stats_req_handler() == NULL) {
69 std::vector<autogen::FlowAgingTimeout>::const_iterator new_list_it =
70 cfg->flow_aging_timeout_list().begin();
73 while (new_list_it != cfg->flow_aging_timeout_list().end()) {
75 if (proto < 0 || proto > 0xFF) {
81 new_list_it->timeout_in_seconds);
84 new_flow_aging_timeout_map.insert(
89 FlowAgingTimeoutMap::const_iterator old_list_it =
93 old_list_it->first.port, 0);
101 if (
agent()->flow_stats_req_handler() == NULL) {
105 FlowAgingTimeoutMap::const_iterator old_list_it =
109 old_list_it->first.port, 0);
116 if (
agent()->port_config_handler() == NULL) {
121 std::vector<autogen::PortTranslationPool>::const_iterator new_list_it =
122 cfg->port_translation_pools().begin();
123 for (;new_list_it != cfg->port_translation_pools().end(); new_list_it++) {
125 if (proto < 0 || proto > 0xFF) {
130 if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
134 uint16_t port_count = 0;
135 std::stringstream str(new_list_it->port_count);
139 if (new_list_it->port_range.start_port != 0 &&
140 new_list_it->port_range.end_port != 0) {
142 new_list_it->port_range.end_port);
143 new_protocol_port_set[proto].port_range.push_back(range);
144 }
else if (port_count != 0) {
145 new_protocol_port_set[proto].port_count = port_count;
150 int result = getrlimit(RLIMIT_NOFILE, &rl);
154 if (avail_count < 0) {
166 int total_port_count = 0;
167 ProtocolPortSet::iterator pc_list_it = new_protocol_port_set.begin();
168 for (; pc_list_it != new_protocol_port_set.end(); pc_list_it++) {
169 pc_list_it->second.Trim();
170 total_port_count += pc_list_it->second.port_count;
173 float avail_percent = 1;
174 if (total_port_count > avail_count) {
175 avail_percent = (float)avail_count / (
float)total_port_count;
178 pc_list_it = new_protocol_port_set.begin();
179 for (; pc_list_it != new_protocol_port_set.end(); pc_list_it++) {
180 pc_list_it->second.port_count *= avail_percent;
182 &(pc_list_it->second));
199 uint32_t max_vm_flows_percent;
200 uint32_t global_max_vmi_flows;
201 if (cfg.IsPropertySet(autogen::GlobalVrouterConfig::MAX_VM_FLOWS_PERCENT)) {
202 max_vm_flows_percent = cfg.max_vm_flows_percent();
206 if (cfg.IsPropertySet(autogen::GlobalVrouterConfig::GLOBAL_MAX_VMI_FLOWS)) {
207 global_max_vmi_flows = cfg.global_max_vmi_flows();
221 const std::string &service_name,
222 const std::string &fabric_dns_name,
223 const std::vector<Ip4Address> &fabric_ip,
224 uint16_t fabric_port)
225 : linklocal_service_name(service_name),
226 ipfabric_dns_service_name(fabric_dns_name),
227 ipfabric_service_ip(fabric_ip),
228 ipfabric_service_port(fabric_port) {
242 BOOST_FOREACH(
Ip4Address ipfabric_addr, ipfabric_service_ip) {
243 if (ipfabric_addr == ip)
279 std::vector<Ip4Address> empty_addr_list;
281 tbb::mutex::scoped_lock lock(
mutex_);
282 BOOST_FOREACH(std::string name, name_list) {
286 new_addr_map.insert(
ResolvePair(name, it->second));
289 new_addr_map.insert(
ResolvePair(name, empty_addr_list));
297 tbb::mutex::scoped_lock lock(
mutex_);
300 int index = rand() % it->second.size();
301 *address = it->second[index];
312 tbb::mutex::scoped_lock lock(
mutex_);
313 for (ResolveMap::const_iterator it =
address_map_.begin();
322 tbb::mutex::scoped_lock lock(
mutex_);
323 for (ResolveMap::const_iterator it =
address_map_.begin();
325 BOOST_FOREACH(
Ip4Address address, it->second) {
338 typedef std::map<std::string, std::vector<Ip4Address> >
ResolveMap;
339 typedef std::pair<std::string, std::vector<Ip4Address> >
ResolvePair;
342 boost_udp::resolver *resolver =
new boost_udp::resolver(
io_);
344 resolver->async_resolve(
345 boost_udp::resolver::query(boost_udp::v4(), name,
"domain"),
347 _1, _2, name, resolver));
353 boost_udp::resolver::iterator resolve_it,
354 std::string &name, boost_udp::resolver *resolver) {
355 std::vector<Ip4Address> old_list;
356 ResolveMap::iterator addr_it;
357 tbb::mutex::scoped_lock lock(
mutex_);
360 old_list.swap(addr_it->second);
362 boost_udp::resolver::iterator end;
363 while (resolve_it != end) {
364 boost_udp::endpoint ep = *resolve_it;
365 addr_it->second.push_back(ep.address().to_v4());
381 boost::asio::io_service &
io_;
418 vn_id_ = global_vrouter_->agent()->vn_table()->Register(
424 global_vrouter_->agent()->vn_table()->Unregister(vn_id_);
428 std::set<Ip4Address>::iterator it;
429 std::pair<std::set<Ip4Address>::iterator,
bool> ret;
431 ret = ipfabric_address_list_.insert(srv);
432 if (ret.second ==
false) {
462 global_vrouter_->agent()->vn_table()->AllocWalker(
464 this, _2, key, is_add),
467 global_vrouter_->agent()->vn_table()->WalkAgain(walk_ref);
504 boost::uuids::nil_uuid(),
526 global_vrouter_->agent()->vn_table()->ReleaseWalker(ref);
540 for (std::set<IpAddress>::const_iterator it =
545 state->
vrf_->
GetName(), *it, it->is_v4() ? 32 : 128, NULL);
564 global_vrouter_->linklocal_services_map();
565 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
566 services.begin(); it != services.end(); ++it) {
568 boost::uuids::nil_uuid(),
572 state->
Add(it->first.linklocal_service_ip);
576 it->first.linklocal_service_ip,
577 it->first.linklocal_service_ip.is_v4() ? 32 : 128,
592 (this, *(
agent->event_manager()->io_service()))),
647 autogen::SecurityLoggingObject *slo =
648 static_cast<autogen::SecurityLoggingObject *
>(adj_node->
650 autogen::IdPermsType id_perms = slo->id_perms();
651 CfgUuidSet(id_perms.uuid.uuid_mslong, id_perms.uuid.uuid_lslong,
661 bool resync_vn =
false;
662 bool resync_route =
false;
667 autogen::GlobalVrouterConfig *cfg =
668 static_cast<autogen::GlobalVrouterConfig *
>(node->
GetObject());
674 if (cfg->vxlan_network_identifier_mode() ==
"configured") {
679 cfg->encryption_mode());
689 if (cfg->IsPropertySet
690 (autogen::GlobalVrouterConfig::FLOW_EXPORT_RATE)) {
698 if (cfg->ecmp_hashing_include_fields().hashing_configured) {
700 ecmp_hashing_include_fields());
716 if (cfg_vxlan_network_identifier_mode !=
717 agent()->vxlan_network_identifier_mode()) {
719 (cfg_vxlan_network_identifier_mode);
741 uint16_t *service_port,
742 std::string *fabric_hostname,
744 uint16_t *fabric_port)
const {
745 std::string name = boost::to_lower_copy(service_name);
747 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
750 if (it->second.linklocal_service_name == name) {
751 *service_ip = it->first.linklocal_service_ip;
752 *service_port = it->first.linklocal_service_port;
753 *fabric_port = it->second.ipfabric_service_port;
754 *fabric_hostname = it->second.ipfabric_dns_service_name;
755 if (it->second.ipfabric_service_ip.size()) {
757 int index = rand() % it->second.ipfabric_service_ip.size();
758 *fabric_ip = it->second.ipfabric_service_ip[index];
762 if (it->second.ipfabric_dns_service_name.empty())
763 *fabric_hostname = fabric_ip->to_string();
765 }
else if (!it->second.ipfabric_dns_service_name.empty()) {
767 it->second.ipfabric_dns_service_name, fabric_ip);
776 uint16_t service_port,
777 std::string *service_name,
779 uint16_t *fabric_port)
const {
780 LinkLocalServicesMap::const_iterator it =
789 uint16_t metadata_service_port, metadata_fabric_port;
791 &metadata_service_ip,
792 &metadata_service_port,
794 &metadata_fabric_port) &&
795 service_ip == metadata_service_ip) {
805 *service_name = it->second.linklocal_service_name;
807 != std::string::npos) {
814 *fabric_port = it->second.ipfabric_service_port;
816 if (it->second.ipfabric_service_ip.size()) {
817 int index = rand() % it->second.ipfabric_service_ip.size();
818 *fabric_ip = it->second.ipfabric_service_ip[index];
823 }
else if (!it->second.ipfabric_dns_service_name.empty()) {
825 it->second.ipfabric_dns_service_name, fabric_ip);
832 std::set<IpAddress> *service_ip
834 if (service_name.empty())
837 std::string name = boost::to_lower_copy(service_name);
838 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
841 if (it->second.linklocal_service_name == name) {
842 service_ip->insert(it->first.linklocal_service_ip);
846 return (service_ip->size() > 0);
851 std::set<std::string> *service_names
853 LinkLocalServicesMap::const_iterator it =
857 it->first.linklocal_service_ip == service_ip) {
858 service_names->insert(it->second.linklocal_service_name);
862 return (service_names->size() > 0);
869 std::vector<std::string> dns_name_list;
871 for (std::vector<autogen::LinklocalServiceEntryType>::const_iterator it =
872 linklocal_list.begin(); it != linklocal_list.end(); it++) {
873 boost::system::error_code ec;
874 IpAddress llip = IpAddress::from_string(it->linklocal_service_ip, ec);
875 std::vector<Ip4Address> fabric_ip;
876 BOOST_FOREACH(std::string ip_fabric_ip, it->ip_fabric_service_ip) {
877 Ip4Address ip = Ip4Address::from_string(ip_fabric_ip, ec);
879 fabric_ip.push_back(ip);
881 std::string name = boost::to_lower_copy(it->linklocal_service_name);
885 fabric_ip, it->ip_fabric_service_port)));
886 if (!it->ip_fabric_DNS_service_name.empty())
887 dns_name_list.push_back(it->ip_fabric_DNS_service_name);
896 std::vector<std::string> dns_name_list;
908 LinkLocalServicesMap::iterator it_old = old_value->begin();
909 LinkLocalServicesMap::iterator it_new = new_value->begin();
910 while (it_old != old_value->end() && it_new != new_value->end()) {
911 if (it_old->first < it_new->first) {
916 }
else if (it_new->first < it_old->first) {
921 }
else if (it_new->second == it_old->second) {
935 for (; it_old != old_value->end(); ++it_old) {
941 for (; it_new != new_value->end(); ++it_new) {
951 const LinkLocalServicesMap::iterator &it) {
953 BOOST_FOREACH(
Ip4Address ip, it->second.ipfabric_service_ip) {
960 const LinkLocalServicesMap::iterator &it) {
967 const LinkLocalServicesMap::iterator &old_it,
968 const LinkLocalServicesMap::iterator &new_it) {
969 if (old_it->first.linklocal_service_ip !=
970 new_it->first.linklocal_service_ip) {
979 const std::vector<Ip4Address> &addr_list) {
986 for (LinkLocalServicesMap::const_iterator it =
989 if (it->second.IsAddressInUse(ip))
996 for (LinkLocalServicesMap::const_iterator it =
999 if (it->first.linklocal_service_ip == ip)
1016 void LinkLocalServiceInfo::HandleRequest()
const {
1017 LinkLocalServiceResponse *resp =
new LinkLocalServiceResponse();
1018 std::vector<LinkLocalServiceData> linklocal_list;
1021 global_vrouter()->linklocal_services_map();
1023 for (GlobalVrouter::LinkLocalServicesMap::const_iterator it =
1024 services.begin(); it != services.end(); ++it) {
1025 LinkLocalServiceData service;
1026 service.linklocal_service_name = it->second.linklocal_service_name;
1027 service.linklocal_service_ip =
1028 it->first.linklocal_service_ip.to_string();
1029 service.linklocal_service_port = it->first.linklocal_service_port;
1030 service.ipfabric_dns_name = it->second.ipfabric_dns_service_name;
1031 BOOST_FOREACH(
Ip4Address ip, it->second.ipfabric_service_ip) {
1032 service.ipfabric_ip.push_back(ip.to_string());
1034 service.ipfabric_port = it->second.ipfabric_service_port;
1035 linklocal_list.push_back(service);
1038 resp->set_service_list(linklocal_list);
1039 resp->set_context(context());
1047 bool vrouter_present =
false;
1048 for (EncryptionTunnelEndpointList::const_iterator it = endpoint_list.begin();
1049 it != endpoint_list.end(); it++) {
1050 if (it->tunnel_remote_ip_address.compare(
agent()->router_id().to_string()) == 0) {
1051 vrouter_present =
true;
1055 return vrouter_present;
1063 if (!
agent()->crypt_interface())
1066 if (boost::iequals(encrypt_mode_str,
"all"))
1068 for (EncryptionTunnelEndpointList::const_iterator it = endpoint_list.begin();
1069 it != endpoint_list.end(); it++) {
1070 if (it->tunnel_remote_ip_address.compare(
agent()->router_id().to_string()) == 0) {
1086 bool change =
false;
1087 CryptTunnelsMap::iterator it_old = old_value->begin();
1088 CryptTunnelsMap::iterator it_new = new_value->begin();
1089 while (it_old != old_value->end() && it_new != new_value->end()) {
1090 if (it_old->first < it_new->first) {
1095 }
else if (it_new->first < it_old->first) {
1100 }
else if (it_new->second == it_old->second) {
1114 for (; it_old != old_value->end(); ++it_old) {
1120 for (; it_new != new_value->end(); ++it_new) {
1129 bool crypt_traffic =
false;
1131 crypt_traffic =
true;
1140 const CryptTunnelsMap::iterator &new_it) {
1155 for (uint16_t index = 0; index <
port_range.size(); index++) {
1168 for (uint16_t sub_index = 0; sub_index <
port_range.size(); sub_index++) {
1169 if (index == sub_index) {
1207 std::vector<PortRange>::iterator it =
port_range.begin();
1209 std::vector<PortRange>::iterator prev_it = it++;
1210 if (prev_it->port_end == 0 &&
1211 prev_it->port_start == 0) {
1215 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