7 #include <net/ethernet.h>
8 #include <netinet/ether.h>
9 #include <boost/uuid/uuid_io.hpp>
10 #include <tbb/mutex.h>
37 #include <vnc_cfg_types.h>
41 #include <sandesh/sandesh_trace.h>
42 #include <sandesh/common/vns_types.h>
43 #include <sandesh/common/vns_constants.h>
50 using namespace boost::uuids;
51 using boost::assign::map_list_of;
52 using boost::assign::list_of;
61 index_table_(), vmi_count_(0), li_count_(0), active_vmi_count_(0),
62 vmi_ifnode_to_req_(0), li_ifnode_to_req_(0), pi_ifnode_to_req_(0) {
79 if (strcmp(node->
table()->
Typename(),
"virtual-machine-interface") == 0) {
83 if (strcmp(node->
table()->
Typename(),
"logical-interface") == 0) {
92 if (strcmp(node->
table()->
Typename(),
"physical-interface") == 0) {
96 if (strcmp(node->
table()->
Typename(),
"logical-interface") == 0) {
100 if (strcmp(node->
table()->
Typename(),
"virtual-machine-interface") == 0) {
116 FindAdjacentIFMapNode(node,
"logical-router");
118 autogen::LogicalRouter *lr =
119 static_cast<autogen::LogicalRouter *
>(adj_node->
GetObject());
120 autogen::IdPermsType id_perms = lr->id_perms();
121 CfgUuidSet(id_perms.uuid.uuid_mslong, id_perms.uuid.uuid_lslong,
130 bool config_processed =
false;
131 if (strcmp(node->
table()->
Typename(),
"physical-interface") == 0) {
133 config_processed =
true;
137 if (strcmp(node->
table()->
Typename(),
"logical-interface") == 0) {
139 config_processed =
true;
143 if (strcmp(node->
table()->
Typename(),
"virtual-machine-interface") == 0) {
145 config_processed =
true;
151 if (config_processed) {
154 return config_processed;
160 return std::unique_ptr<DBEntry>(
static_cast<DBEntry *
>
185 Allocate(rkey).get())->index();
202 switch (key->
type_) {
205 ret = intf->
OnChange(static_cast<VmInterfaceData *>(req->
data.get()));
213 intf->
OnChange(static_cast<InetInterfaceData *>(req->
data.get()));
221 ret = intf->
OnChange(
this, static_cast<PhysicalInterfaceData *>
229 ret = intf->
OnChange(
this, static_cast<RemotePhysicalInterfaceData *>
236 ret = intf->
OnChange(
this, static_cast<LogicalInterfaceData *>
262 if (qos_config_data) {
281 return intf->
Resync(
this, vm_data);
341 std::string *vm_uuid,
342 std::string *vm_project_uuid) {
350 LOG(ERROR,
"Interface in table was not found, ip = " <<
351 ip.to_string() <<
", in: " <<
352 "InterfaceTable::FindVmUuidFromMetadataIp" <<
401 vm_intf->
Resync(
this, &data);
427 if (
agent()->tsn_enabled()) {
433 agent()->fabric_vrf_name(),
443 agent()->vhost_interface_name()));
448 req.
data.reset(data);
454 if (
agent()->tsn_enabled()) {
459 agent()->fabric_vrf_name(),
460 agent()->router_id(),
461 agent()->vhost_prefix_len(),
462 agent()->vhost_default_gateway()[0],
468 agent()->vhost_interface_name()));
473 req.
data.reset(data);
483 type_(type), uuid_(uuid),
484 vrf_(vrf, this), label_(
MplsTable::kInvalidLabel),
485 l2_label_(
MplsTable::kInvalidLabel), ipv4_active_(true),
486 ipv6_active_(false), is_hc_active_(true),
487 metadata_ip_active_(true), metadata_l2_active_(true),
488 l2_active_(true), id_(kInvalidIndex), dhcp_enabled_(true), dhcp_enabled_v6_(true),
490 admin_state_(true), test_oper_state_(true), transport_(TRANSPORT_INVALID),
491 os_params_(name, kInvalidIndex, state),
492 logical_router_uuid_(logical_router_uuid) {
511 uint32_t domain, bus, device,
function;
513 if (pci >> std::hex >> domain) {
519 if (pci >> std::hex >> bus) {
525 if (pci >> std::hex >> device) {
531 pci >> std::hex >>
function;
538 static int dummy_ifindex = 0;
548 std::string lookup_name =
name();
558 std::vector<std::string>::const_iterator ptr;
561 if (*ptr == lookup_name) {
575 struct ether_addr *addr = NULL;
578 addr = ether_aton(agent->
params()->
579 physical_interface_mac_addr_list()[index].c_str());
581 LOG(ERROR,
"Physical interface MAC not set in DPDK vrouter agent");
587 LOG(ERROR,
"Physical interface MAC not set in DPDK vrouter agent");
592 addr = ether_aton(agent->
params()->
593 physical_interface_mac_addr_list()[0].c_str());
595 LOG(ERROR,
"Physical interface MAC not set in DPDK vrouter agent");
666 const std::string &ifname,
684 const std::string &ifname) {
687 req.
data.reset(NULL);
694 req.
data.reset(NULL);
721 return it->second.addr_;
745 addr = it->second.addr_;
758 if (it->second.config_entry_) {
763 if (addr.to_ulong() == 0) {
764 entry.
addr_ = it->second.addr_;
777 if (del_it->second.config_entry_ ==
false) {
794 return "VMI vlan-sub-if";
803 return "Virtual Machine";
805 return "Service Chain";
807 return "Service Instance";
824 data.set_name(
name());
828 data.set_vrf_name(
vrf_->GetName());
830 data.set_vrf_name(
"--ERROR--");
833 data.set_active(
"Active");
835 data.set_active(
"Inactive");
839 data.set_ipv4_active(
"Active");
841 data.set_ipv4_active(
"Inactive");
845 data.set_health_check_active(
"Active");
847 data.set_health_check_active(
"Inactive");
851 data.set_metadata_ip_active(
"Active");
853 data.set_metadata_ip_active(
"Inactive");
857 data.set_ip6_active(
"Active");
859 data.set_ip6_active(
"Inactive");
863 data.set_l2_active(
"L2 Active");
865 data.set_l2_active(
"L2 Inactive");
869 data.set_dhcp_service(
"Enable");
871 data.set_dhcp_service(
"Disable");
875 data.set_dhcp_service_v6(
"Enable");
877 data.set_dhcp_service_v6(
"Disable");
882 data.set_dns_service(
"Enable");
884 data.set_dns_service(
"Disable");
893 data.set_ip6_addr(
"--NA--");
894 std::vector<StaticRouteSandesh> aap_list;
895 data.set_allowed_address_pair_list(aap_list);
896 data.set_subnet(
"--NA--");
897 data.set_sub_type(
"--NA--");
898 data.set_vrf_assign_acl_uuid(
"--NA--");
899 data.set_vmi_type(
"--NA--");
900 data.set_flood_unknown_unicast(
false);
913 vector<BondInterface> bond_interface_list;
917 bond_intf = it->second;
919 entry.set_intf_name(bond_intf.
intf_name);
921 entry.set_intf_status(bond_intf.
intf_status ?
"UP" :
"DOWN");
922 bond_interface_list.push_back(entry);
924 data.set_bond_interface_list(bond_interface_list);
927 data.set_active(
"Active");
929 data.set_active(
"Inactive <Oper-state-down>");
930 data.set_type(
"eth");
936 data.set_type(
"remote-physical-port");
937 data.set_vrf_name(
"--NA--");
944 data.set_type(
"logical-port");
945 data.set_vrf_name(
"--NA--");
952 data.set_type(
"vport");
955 data.set_vn_name(vintf->
vn()->
GetName());
964 data.set_policy(
"Enable");
966 data.set_policy(
"Disable");
970 string common_reason =
"";
974 common_reason +=
"admin-down ";
977 if (vintf->
vn() == NULL) {
978 common_reason +=
"vn-null ";
980 common_reason +=
"vn-admin-down ";
983 if (vintf->
vrf() == NULL) {
984 common_reason +=
"vrf-null ";
989 common_reason +=
"no-dev ";
993 common_reason +=
"os-state-down ";
997 common_reason +=
"os-state-down ";
1002 common_reason +=
"parent-inactive ";
1005 string total_reason = common_reason;
1007 total_reason +=
"ipv4_inactive ";
1010 total_reason +=
"ipv6_inactive ";
1013 total_reason +=
"l2_inactive ";
1015 string reason =
"Inactive < " + total_reason +
" >";
1016 data.set_active(reason);
1019 string v4_v6_common_reason = common_reason;
1021 v4_v6_common_reason +=
"l3-disabled ";
1025 string reason =
"Ipv4 Inactive < " + v4_v6_common_reason;
1027 reason +=
"no-ipv4-addr ";
1030 data.set_ipv4_active(reason);
1033 string reason =
"Ipv6 Inactive < " + v4_v6_common_reason;
1035 reason +=
"no-ipv6-addr ";
1038 data.set_ip6_active(reason);
1043 string l2_reason = common_reason;
1045 l2_reason +=
"l2-disabled ";
1047 string reason =
"L2 Inactive < " + l2_reason;
1049 data.set_l2_active(reason);
1052 std::vector<FloatingIpSandeshList> fip_list;
1053 VmInterface::FloatingIpSet::const_iterator it =
1057 FloatingIpSandeshList entry;
1060 if (ip.
vrf_.get()) {
1061 entry.set_vrf_name(ip.
vrf_.get()->GetName());
1063 entry.set_vrf_name(
"--ERROR--");
1067 entry.set_installed(
"Y");
1069 entry.set_installed(
"N");
1071 entry.set_fixed_ip(ip.
fixed_ip_.to_string());
1074 switch (it->direction()) {
1091 entry.set_direction(dir);
1093 entry.set_port_map_enabled(it->port_map_enabled());
1094 std::vector<SandeshPortMapping> pmap_list;
1096 it->src_port_map_.begin();
1097 while (pmap_it != it->src_port_map_.end()) {
1098 SandeshPortMapping pmap;
1099 pmap.set_protocol(pmap_it->first.protocol_);
1100 pmap.set_port(pmap_it->first.port_);
1101 pmap.set_nat_port(pmap_it->second);
1102 pmap_list.push_back(pmap);
1105 entry.set_port_map(pmap_list);
1107 fip_list.push_back(entry);
1110 data.set_fip_list(fip_list);
1112 std::vector<AliasIpSandeshList> aip_list;
1113 VmInterface::AliasIpSet::const_iterator a_it =
1117 AliasIpSandeshList entry;
1118 entry.set_ip_addr(ip.
alias_ip_.to_string());
1119 if (ip.
vrf_.get()) {
1120 entry.set_vrf_name(ip.
vrf_.get()->GetName());
1122 entry.set_vrf_name(
"--ERROR--");
1126 entry.set_installed(
"Y");
1128 entry.set_installed(
"N");
1130 aip_list.push_back(entry);
1133 data.set_alias_ip_list(aip_list);
1138 std::vector<ServiceVlanSandeshList> vlan_list;
1139 VmInterface::ServiceVlanSet::const_iterator vlan_it =
1143 ServiceVlanSandeshList entry;
1145 entry.set_tag(vlan->
tag_);
1146 if (vlan->
vrf_.get()) {
1147 entry.set_vrf_name(vlan->
vrf_.get()->GetName());
1149 entry.set_vrf_name(
"--ERROR--");
1151 entry.set_ip_addr(vlan->
addr_.to_string());
1152 entry.set_ip6_addr(vlan->
addr6_.to_string());
1153 entry.set_label(vlan->
label_);
1156 entry.set_installed(
"Y");
1158 entry.set_installed(
"N");
1161 entry.set_v4_route_installed(
"Y");
1163 entry.set_v4_route_installed(
"N");
1166 entry.set_v6_route_installed(
"Y");
1168 entry.set_v6_route_installed(
"N");
1170 vlan_list.push_back(entry);
1174 std::vector<StaticRouteSandesh> static_route_list;
1175 VmInterface::StaticRouteSet::iterator static_rt_it =
1179 StaticRouteSandesh entry;
1180 entry.set_vrf_name(
"");
1181 entry.set_ip_addr(rt.
addr_.to_string());
1182 entry.set_prefix(rt.
plen_);
1185 static_route_list.push_back(entry);
1187 data.set_static_route_list(static_route_list);
1189 std::vector<StaticRouteSandesh> aap_list;
1190 VmInterface::AllowedAddressPairSet::iterator aap_it =
1194 StaticRouteSandesh entry;
1195 entry.set_vrf_name(
"");
1196 entry.set_ip_addr(rt.
addr_.to_string());
1197 entry.set_prefix(rt.
plen_);
1200 entry.set_label(rt.
label_);
1203 aap_list.push_back(entry);
1205 data.set_allowed_address_pair_list(aap_list);
1207 std::vector<std::string> fixed_ip4_list;
1209 data.set_fixed_ip4_list(fixed_ip4_list);
1211 std::vector<std::string> fixed_ip6_list;
1213 data.set_fixed_ip6_list(fixed_ip6_list);
1215 std::vector<std::string> fat_flow_list;
1216 VmInterface::FatFlowEntrySet::iterator fat_flow_it =
1220 str << (int)fat_flow_it->protocol <<
":" << (
int)fat_flow_it->port
1221 <<
":" << fat_flow_it->ignore_address;
1222 fat_flow_list.push_back(str.str());
1225 data.set_fat_flow_list(fat_flow_list);
1228 data.set_fabric_port(
"FabricPort");
1230 data.set_fabric_port(
"NotFabricPort");
1233 data.set_alloc_linklocal_ip(
"LL-Enable");
1235 data.set_alloc_linklocal_ip(
"LL-Disable");
1237 data.set_service_vlan_list(vlan_list);
1239 data.set_config_name(vintf->
cfg_name());
1241 VmInterface::TagEntrySet::const_iterator tag_it;
1242 std::vector<VmiTagData> vmi_tag_l;
1244 for (tag_it = tag_l.
list_.begin(); tag_it != tag_l.
list_.end();
1246 VmiTagData vmi_tag_data;
1247 if (tag_it->tag_.get()) {
1248 vmi_tag_data.set_name(tag_it->tag_->name());
1249 vmi_tag_data.set_id(tag_it->tag_->tag_id());
1250 TagEntry::PolicySetList::const_iterator aps_it =
1251 tag_it->tag_->policy_set_list().begin();
1252 std::vector<ApplicationPolicySetLink> aps_uuid_list;
1253 for(; aps_it != tag_it->tag_->policy_set_list().end();
1255 std::string aps_id =
1257 ApplicationPolicySetLink apl;
1258 apl.set_application_policy_set(aps_id);
1259 aps_uuid_list.push_back(apl);
1262 vmi_tag_data.set_application_policy_set_list(aps_uuid_list);
1263 vmi_tag_l.push_back(vmi_tag_data);
1266 data.set_vmi_tag_list(vmi_tag_l);
1268 VmInterface::SecurityGroupEntrySet::const_iterator sgit;
1269 std::vector<VmIntfSgUuid> intf_sg_uuid_l;
1271 for (sgit = sg_uuid_l.
list_.begin(); sgit != sg_uuid_l.
list_.end();
1275 intf_sg_uuid_l.push_back(sg_id);
1277 data.set_sg_uuid_list(intf_sg_uuid_l);
1279 data.set_vm_name(vintf->
vm_name());
1286 data.set_parent_interface(vintf->
parent()->
name());
1288 if (vintf->
subnet().to_ulong() != 0) {
1289 std::ostringstream str;
1290 str << vintf->
subnet().to_string() <<
"/"
1292 data.set_subnet(str.str());
1300 std::string vrf_assign_acl;
1302 data.set_vrf_assign_acl_uuid(vrf_assign_acl);
1305 data.set_service_health_check_ip(
1309 VmInterface::BridgeDomainEntrySet::const_iterator bd_it;
1310 std::vector<VmIntfBridgeDomainUuid> intf_bd_uuid_l;
1313 for (bd_it = bd_list.
list_.begin(); bd_it != bd_list.
list_.end(); ++bd_it) {
1314 VmIntfBridgeDomainUuid bd_id;
1315 bd_id.set_bridge_domain_uuid(
UuidToString(bd_it->uuid_));
1316 intf_bd_uuid_l.push_back(bd_id);
1318 data.set_bridge_domain_list(intf_bd_uuid_l);
1320 std::vector<std::string> policy_set_acl_list;
1321 FirewallPolicyList::const_iterator fw_it = vintf->
fw_policy_list().begin();
1323 policy_set_acl_list.push_back(
UuidToString(fw_it->get()->GetUuid()));
1325 data.set_policy_set_acl_list(policy_set_acl_list);
1327 std::vector<std::string> policy_set_fwaas_list;
1330 policy_set_fwaas_list.push_back(
UuidToString(fw_it->get()->GetUuid()));
1332 data.set_policy_set_fwaas_list(policy_set_fwaas_list);
1334 std::vector<SecurityLoggingObjectLink> slo_list;
1335 UuidList::const_iterator sit = vintf->
slo_list().begin();
1336 while (sit != vintf->
slo_list().end()) {
1337 SecurityLoggingObjectLink slo_entry;
1338 slo_entry.set_slo_uuid(to_string(*sit));
1339 slo_list.push_back(slo_entry);
1342 data.set_slo_list(slo_list);
1349 std::vector<LearntMacIpSandeshList> mac_ip_list;
1350 VmInterface::LearntMacIpSet::const_iterator it =
1354 LearntMacIpSandeshList entry;
1355 entry.set_ip_addr(mac_ip.
ip_.to_string());
1358 entry.set_l2_installed(
"Y");
1360 entry.set_l2_installed(
"N");
1363 entry.set_l3_installed(
"Y");
1365 entry.set_l3_installed(
"N");
1367 mac_ip_list.push_back(entry);
1370 data.set_mac_ip_list(mac_ip_list);
1376 data.set_type(
"vhost");
1384 data.set_type(
"pkt");
1387 data.set_type(
"invalid");
1392 data.set_admin_state(
"Enabled");
1394 data.set_admin_state(
"Disabled");
1399 data.set_transport(
"Ethernet");
1403 data.set_transport(
"Socket");
1407 data.set_transport(
"PMD");
1411 data.set_transport(
"Unknown");
1418 ItfResp *resp =
static_cast<ItfResp *
>(sresp);
1420 ItfSandeshData data;
1422 std::vector<ItfSandeshData> &list =
1423 const_cast<std::vector<ItfSandeshData>&
>(resp->get_itf_list());
1424 list.push_back(data);
1429 void ItfReq::HandleRequest()
const {
1431 get_name(), get_uuid(),
1432 get_vn(), get_mac(),
1439 sand->DoSandesh(sand);
1443 const std::string &context) {
1456 InterfaceInfo intf_info;
1457 intf_info.set_name(
name());
1458 intf_info.set_index(
id_);
1462 intf_info.set_op(
"Add");
1465 intf_info.set_op(
"Delete");
1468 intf_info.set_op(
"Unknown");
1498 if (vm_intf && vm_intf->
parent()) {
EntryType At(size_t index) const
bool OperDBDelete(DBEntry *entry, const DBRequest *req)
Interface * xconnect() const
static const MacAddress & ZeroMac()
IndexVector< Interface * > index_table_
boost::function< void(VmInterface *, const VnEntry *, const IpAddress &, bool)> UpdateFloatingIpFn
BridgeDomainEntrySet list_
void SetItfSandeshData(ItfSandeshData &data) const
const MacAddress & vm_mac() const
std::set< IntrusiveReferrer > back_ref_set_
void AddVmiToVmiType(const boost::uuids::uuid &u, int type)
bool isVmwareMode() const
bool ip_active(Address::Family family) const
DhcpSnoopMap dhcp_snoop_map_
void set_update_floatingip_cb(UpdateFloatingIpFn fn)
void VmInterfaceWalkDone(DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
const boost::uuids::uuid & vm_project_uuid() const
static void CreateReq(InterfaceTable *table, const std::string &ifname, Interface::Transport transport)
uint16_t rx_vlan_id() const
std::string GetString(const std::string &key) const
const boost::uuids::uuid & GetUuid() const
boost::uuids::uuid qos_config_uuid_
const ServiceVlanList & service_vlan_list() const
void UpdateOperStateOfSubIntf(const InterfaceTable *table)
DBTableBase * get_table() const
bool VmiIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
static string DeviceTypeToString(VmInterface::DeviceType type)
Ip4Address mdata_ip_addr() const
const LearntMacIpList & learnt_mac_ip_list() const
VmInterface::DeviceType device_type() const
uint32_t os_index() const
ConfigManager * config_manager() const
std::unique_ptr< DBEntry > AllocEntry(const DBRequestKey *k) const
const AddressList & gateway_list() const
boost::asio::ip::address IpAddress
static const MacAddress & vrrp_mac()
bool OperDBResync(DBEntry *entry, const DBRequest *req)
VmEntry * FindVmRef(const boost::uuids::uuid &uuid) const
void DeleteDhcpSnoopEntry(const std::string &ifname)
void BuildIpStringList(Address::Family family, std::vector< std::string > *vect) const
Interface(Type type, const boost::uuids::uuid &uuid, const std::string &name, VrfEntry *vrf, bool os_oper_state, const boost::uuids::uuid &logical_router_uuid)
const UuidList & slo_list() const
std::unique_ptr< DBRequestData > data
virtual Interface * AllocEntry(const InterfaceTable *table) const =0
boost::shared_ptr< ResourceKey > KeyPtr
static DBTableBase * CreateTable(DB *db, const std::string &name)
DBTableWalkRef AllocWalker(WalkFn walk_fn, WalkCompleteFn walk_complete)
virtual const char * Typename() const =0
IpAddress service_health_check_ip() const
InterfaceTable(DB *db, const std::string &name)
const Ip4Address & subnet() const
const boost::uuids::uuid & si_other_end_vmi() const
std::map< const std::string, DhcpSnoopEntry >::iterator DhcpSnoopIterator
AgentDBEntry * FindActiveEntry(const DBEntry *key)
bool Enqueue(DBRequest *req)
void DelVmiToVmiType(const boost::uuids::uuid &u)
VnTable * vn_table() const
bool VmiIFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
bool OnChange(PacketInterfaceData *data)
Interface::Transport transport_
static std::string UuidToString(const boost::uuids::uuid &id)
const boost::uuids::uuid & GetUuid() const
static void CreateReq(InterfaceTable *table, const std::string &ifname, SubType sub_type, const std::string &vrf_name, const Ip4Address &addr, int plen, const Ip4Address &gw, const std::string &xconnect, const std::string &vn_name, Interface::Transport transport)
const Ip4Address & vhost_addr() const
const int vhost_plen() const
void FreeInterfaceId(size_t index)
const boost::uuids::uuid & GetUuid() const
DBTable::DBTableWalkRef global_config_change_walk_ref_
bool IFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
std::unique_ptr< DBRequestKey > KeyPtr
MirrorEntry * FindMirrorRef(const std::string &name) const
virtual bool OnChange(const InterfaceTable *table, const PhysicalInterfaceData *data)
boost::uuids::uuid logical_router_uuid_
void AddDhcpSnoopEntry(const std::string &ifname, const Ip4Address &addr)
const NextHop * flow_key_nh() const
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
void ReleaseWalker(DBTableWalkRef &walk)
uint8_t vhostuser_mode() const
MirrorTable * mirror_table() const
std::string ToString() const
InterfaceConstRef FindVmi(const boost::uuids::uuid &u)
const std::vector< std::string > & physical_interface_pci_addr_list() const
void Remove(size_t index)
bool DBEntrySandesh(Sandesh *sresp, std::string &name) const
const std::string & fabric_vrf_name() const
bool PhysicalInterfaceProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
uint16_t tx_vlan_id() const
virtual ~PacketInterface()
bool L2VmInterfaceWalk(DBTablePartBase *partition, DBEntryBase *entry)
void WalkAgain(DBTableWalkRef walk)
MetaDataIpAllocator * metadata_ip_allocator() const
uint32_t local_preference() const
const SecurityGroupEntryList & sg_list() const
bool OnChange(VmInterfaceData *data)
uint8_t GetInterfaceTransport() const
const UpdateFloatingIpFn & update_floatingip_cb() const
virtual void ObtainOsSpecificParams(const std::string &name, Agent *agent)
bool flood_unknown_unicast() const
static void Create(InterfaceTable *table, const std::string &ifname, SubType sub_type, const std::string &vrf_name, const Ip4Address &addr, int plen, const Ip4Address &gw, const std::string &xconnect, const std::string &vn_name, Interface::Transport transport)
bool LogicalInterfaceProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
const BondChildIntfMap & getBondChildIntfMap() const
const std::string GetAnalyzer() const
virtual void SendTrace(const AgentDBTable *table, Trace event) const
void DhcpSnoopSetConfigSeen(const std::string &ifname)
bool need_linklocal_ip() const
const FirewallPolicyList & fwaas_fw_policy_list() const
void AuditDhcpSnoopTable()
NextHopConstRef flow_key_nh_
boost::asio::ip::address_v6 Ip6Address
VnEntry * FindVnRef(const boost::uuids::uuid &uuid) const
std::unique_ptr< DBRequestKey > key
AllowedAddressPairSet list_
bool NeedOsStateWithoutDevice() const
bool InterfaceCommonProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
DBEntry * OperDBAdd(const DBRequest *req)
const std::vector< std::string > & fabric_interface_name_list() const
virtual bool FindVmUuidFromMetadataIp(const IpAddress &ip, std::string *vm_ip, std::string *vm_uuid, std::string *vm_project_uuid)
Finds information about a virtual machine connected to a given vm interface with a specified link loc...
const TagEntryList & tag_list() const
tbb::mutex back_ref_mutex_
bool layer3_forwarding() const
bool cfg_igmp_enable() const
virtual void SetKey(const DBRequestKey *key)
static const std::string & NullString()
bool os_oper_state() const
boost::intrusive_ptr< const Interface > InterfaceConstRef
bool PhysicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
bool NeedDefaultOsOperStateDisabled(Agent *agent) const
#define OPER_TRACE_ENTRY(obj, table,...)
VrfEntry * FindVrfRef(const std::string &name) const
bool OnChange(InetInterfaceData *data)
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
const VnEntry * vn() const
bool policy_enabled() const
AgentDBEntry * Find(const DBEntry *key, bool ret_del)
virtual void Process(DBRequest &req)
AgentParam * params() const
int GetVmiToVmiType(const boost::uuids::uuid &u)
const AclDBEntry * vrf_assign_acl() const
BondChildIntfMap::const_iterator BondChildIntfMapIterator
void CopyVhostData(const Agent *agent)
boost::asio::ip::address_v4 Ip4Address
tbb::mutex dhcp_snoop_mutex_
const BridgeDomainList & bridge_domain_list() const
const FatFlowList & fat_flow_list() const
VrfTable * vrf_table() const
const Ip4Address & primary_ip_addr() const
const boost::uuids::uuid & logical_interface() const
PacketInterface(const std::string &name)
const StaticRouteList & static_route_list() const
IFMapObject * GetObject()
UpdateFloatingIpFn update_floatingip_cb_
const FloatingIpList & floating_ip_list() const
void SetPciIndex(Agent *agent, size_t index)
PortMap::iterator PortMapIterator
bool Resync(const InterfaceTable *table, const VmInterfaceData *data)
const std::string & phy_intf_display_name() const
VmiToVmiTypeMap vmi_to_vmitype_map_
const std::string & vm_name() const
virtual bool OnChange(const InterfaceTable *table, const LogicalInterfaceData *data)
static void CreatePacketInterfaceNh(Agent *agent, const string &ifname)
AgentQosConfigTable * qos_config_table() const
KeyPtr GetDBRequestKey() const
bool layer3_forwarding() const
const std::string & phy_dev_display_name() const
VmInterface::VmiType vmi_type() const
static const uint32_t kInvalidIndex
const Ip6Address & primary_ip6_addr() const
uint32_t max_flows() const
const uint8_t subnet_plen() const
const std::string & cfg_name() const
AgentQosConfigConstRef qos_config_
SecurityGroupEntrySet list_
bool igmp_enabled() const
const Interface * FindInterface(size_t index) const
static const uint32_t kInvalidIndex
#define LOG(_Level, _Msg)
static void Create(InterfaceTable *table, const std::string &ifname, Interface::Transport transport)
struct InterfaceOsParams os_params_
const FirewallPolicyList & fw_policy_list() const
const std::string & name() const
bool OperDBOnChange(DBEntry *entry, const DBRequest *req)
const string & GetName() const
virtual bool Delete(const DBRequest *req)
static InterfaceTable * interface_table_
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
bool LogicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual bool OnChange(const InterfaceTable *table, const RemotePhysicalInterfaceData *data)
const std::string & fabric_vn_name() const
bool mac_ip_learning_enable() const
bool IFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
const std::string & display_name() const
const AliasIpList & alias_ip_list() const
MetaDataIpAllocator * metadata_ip6_allocator() const
virtual void GetOsParams(Agent *agent)
CommunityList communities_
void set_vxlan_id(int vxlan_id)
const Ip4Address GetDhcpSnoopEntry(const std::string &ifname)
const std::vector< std::string > & eth_port_list() const
const Interface * parent() const
const AllowedAddressPairList & allowed_address_pair_list() const
bool VmiProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
bool ProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
VmTable * vm_table() const
static void DeleteReq(InterfaceTable *table, const std::string &ifname)
void RegisterDBClients(IFMapDependencyManager *dep)
const Interface * FindInterfaceFromMetadataIp(const Ip4Address &ip) const
Finds an interface (Interface) to which a given IPv4 address belongs to.
const VmEntry * vm() const
bool LogicalInterfaceIFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
ResourceManager * resource_manager() const
void GlobalVrouterConfigChanged()
bool drop_new_flows() const
size_t InsertAtIndex(uint32_t index, EntryType entry)
static string VmiTypeToString(VmInterface::VmiType type)