4 #ifndef vnsw_agent_interface_hpp
5 #define vnsw_agent_interface_hpp
13 #include <boost/optional.hpp>
86 virtual void Add() { }
123 const uint32_t
id()
const {
return id_;}
207 const std::string &name,
bool is_mcast) :
212 const std::string &name) {
231 if ((
IsLess(rhs) ==
false) && (rhs.
IsLess(*
this) ==
false)) {
295 typedef std::map<boost::uuids::uuid, VmiToPhysicalDeviceVnData>
339 const std::string &context);
416 std::string *vm_uuid,
417 std::string *vm_project_uuid);
466 virtual void Clear();
502 #endif // vnsw_agent_interface_hpp
bool OperDBDelete(DBEntry *entry, const DBRequest *req)
IndexVector< Interface * > index_table_
size_t Hash(const DBEntry *entry) const
boost::function< void(VmInterface *, const VnEntry *, const IpAddress &, bool)> UpdateFloatingIpFn
DhcpSnoopEntry(const Ip4Address &addr, bool config_entry)
void SetItfSandeshData(ItfSandeshData &data) const
void AddVmiToVmiType(const boost::uuids::uuid &u, int type)
VmiToPhysicalDeviceVnTree vmi_to_physical_device_vn_tree_
bool ip_active(Address::Family family) const
DhcpSnoopMap dhcp_snoop_map_
const AgentQosConfig * qos_config() const
void set_update_floatingip_cb(UpdateFloatingIpFn fn)
void VmInterfaceWalkDone(DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
uint32_t GetRefCount() const
virtual bool CmpInterface(const DBEntry &rhs) const =0
InterfaceQosConfigData(const Agent *agent, IFMapNode *node, const boost::uuids::uuid &qos_config_uuid)
const boost::uuids::uuid & GetUuid() const
boost::uuids::uuid qos_config_uuid_
void UpdateOperStateOfSubIntf(const InterfaceTable *table)
void EthInit(const std::string &vrf_name)
const uint32_t id() const
bool VmiIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
uint32_t li_ifnode_to_req_
std::map< boost::uuids::uuid, int > VmiToVmiTypeMap
virtual InterfaceKey * Clone() const =0
uint32_t os_index() const
std::unique_ptr< DBEntry > AllocEntry(const DBRequestKey *k) const
VmiToPhysicalDeviceVnData & operator=(VmiToPhysicalDeviceVnData const &rhs)
boost::asio::ip::address IpAddress
InterfaceData(Agent *agent, IFMapNode *node, Interface::Transport transport)
Interface::Transport transport() const
bool OperDBResync(DBEntry *entry, const DBRequest *req)
VmEntry * FindVmRef(const boost::uuids::uuid &uuid) const
void DeleteDhcpSnoopEntry(const std::string &ifname)
void DelPhysicalDeviceVnEntry(const boost::uuids::uuid &vmi)
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)
~VmiToPhysicalDeviceVnData()
InterfaceKey(const InterfaceKey &rhs)
virtual Interface * AllocEntry(const InterfaceTable *table) const =0
uint32_t active_vmi_count_
static DBTableBase * CreateTable(DB *db, const std::string &name)
InterfaceTable(DB *db, const std::string &name)
void set_flow_key_nh(const NextHop *nh)
std::map< const std::string, DhcpSnoopEntry >::iterator DhcpSnoopIterator
void DelVmiToVmiType(const boost::uuids::uuid &u)
bool VmiIFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
InterfaceKey(AgentKey::DBSubOperation sub_op, Interface::Type type, const boost::uuids::uuid &uuid, const std::string &name, bool is_mcast)
uint32_t vmi_ifnode_to_req() const
Interface::Transport transport_
VmiToPhysicalDeviceVnData(const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
const MacAddress & mac() const
void FreeInterfaceId(size_t index)
uint32_t pi_ifnode_to_req() const
bool IsLess(const DBEntry &rhs) const
const boost::uuids::uuid & logical_router_uuid() const
DBTable::DBTableWalkRef global_config_change_walk_ref_
bool IFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
bool IsTunnelEnabled() const
std::unique_ptr< DBRequestKey > KeyPtr
MirrorEntry * FindMirrorRef(const std::string &name) const
boost::uuids::uuid logical_router_uuid_
uint32_t GetRefCount() const
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)
InterfaceConstRef FindVmi(const boost::uuids::uuid &u)
boost::uuids::uuid logical_router_uuid_
std::map< const std::string, DhcpSnoopEntry > DhcpSnoopMap
bool DBEntrySandesh(Sandesh *sresp, std::string &name) const
bool PhysicalInterfaceProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
bool L2VmInterfaceWalk(DBTablePartBase *partition, DBEntryBase *entry)
bool metadata_l2_active() const
bool dhcp_enabled_v6() const
const UpdateFloatingIpFn & update_floatingip_cb() const
virtual void ObtainOsSpecificParams(const std::string &name, Agent *agent)
bool LogicalInterfaceProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual void SendTrace(const AgentDBTable *table, Trace event) const
void DhcpSnoopSetConfigSeen(const std::string &ifname)
void AuditDhcpSnoopTable()
NextHopConstRef flow_key_nh_
boost::asio::ip::address_v6 Ip6Address
boost::intrusive_ptr< const AgentQosConfig > AgentQosConfigConstRef
VnEntry * FindVnRef(const boost::uuids::uuid &uuid) const
bool metadata_ip_active() const
bool InterfaceCommonProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
DBEntry * OperDBAdd(const DBRequest *req)
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...
InterfaceOsParams get_os_params()
bool IsLess(const InterfaceKey &rhs) const
virtual void SetKey(const DBRequestKey *key)
bool dhcp_enabled() const
bool os_oper_state() const
uint32_t pi_ifnode_to_req_
boost::intrusive_ptr< const Interface > InterfaceConstRef
bool PhysicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
bool NeedDefaultOsOperStateDisabled(Agent *agent) const
void LinkVmPortToMetaDataIp(const Interface *intf, const Ip6Address &addr)
Creates a link between a given interface (Interface) and a given IPv6 address.
VrfEntry * FindVrfRef(const std::string &name) const
void RemotePhysicalPortInit(const std::string &vrf_name)
uint32_t vmi_count() const
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
void UpdatePhysicalDeviceVnEntry(const boost::uuids::uuid &vmi, boost::uuids::uuid &dev, boost::uuids::uuid &vn, IFMapNode *vn_node)
const std::string & name() const
virtual ~InterfaceTable()
void decr_active_vmi_count()
int GetVmiToVmiType(const boost::uuids::uuid &u)
uint32_t active_vmi_count() const
boost::asio::ip::address_v4 Ip4Address
void set_test_oper_state(bool val)
tbb::mutex dhcp_snoop_mutex_
static InterfaceTable * GetInstance()
size_t Hash(const DBRequestKey *key) const
bool IsEqual(const InterfaceKey &rhs) const
virtual KeyPtr GetDBRequestKey() const =0
DISALLOW_COPY_AND_ASSIGN(Interface)
void incr_active_vmi_count()
UpdateFloatingIpFn update_floatingip_cb_
void SetPciIndex(Agent *agent, size_t index)
bool IsL2LabelValid(uint32_t label) const
const Agent * agent() const
uint32_t li_ifnode_to_req() const
VmiToVmiTypeMap vmi_to_vmitype_map_
DISALLOW_COPY_AND_ASSIGN(InterfaceTable)
static const uint32_t kInvalidIndex
boost::intrusive_ptr< const NextHop > NextHopConstRef
uint32_t l2_label() const
AgentQosConfigConstRef qos_config_
const Interface * FindInterface(size_t index) const
struct InterfaceOsParams os_params_
boost::optional< IfGuid > os_guid_
const std::string & name() const
uint32_t vmi_ifnode_to_req_
void set_logical_router_uuid(const boost::uuids::uuid &logical_router_uuid)
void InetInit(const std::string &vrf_name)
bool OperDBOnChange(DBEntry *entry, const DBRequest *req)
bool RemotePhysicalInterfaceIFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
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)
bool IFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
virtual void GetOsParams(Agent *agent)
boost::optional< InterfaceOsParams::IfGuid > os_guid() const
const Ip4Address GetDhcpSnoopEntry(const std::string &ifname)
std::map< boost::uuids::uuid, VmiToPhysicalDeviceVnData > VmiToPhysicalDeviceVnTree
bool VmiProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
bool ProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
void RegisterDBClients(IFMapDependencyManager *dep)
const Interface * FindInterfaceFromMetadataIp(const Ip4Address &ip) const
Finds an interface (Interface) to which a given IPv4 address belongs to.
void Init(Interface::Type type, const boost::uuids::uuid &intf_uuid, const std::string &name)
bool is_hc_active() const
bool LogicalInterfaceIFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
void GlobalVrouterConfigChanged()
uint32_t li_count() const