22 #include <ovsdb_types.h>
28 using namespace OVSDB;
32 const std::string &logical_switch,
const std::string &mac) :
33 OvsdbEntry(table), mac_(mac), logical_switch_name_(logical_switch),
34 dest_ip_(
""), vrf_(NULL, this) {
39 logical_switch_name_(key->logical_switch_name_), dest_ip_(key->dest_ip_),
44 struct ovsdb_idl_row *row) :
OvsdbEntry(table),
47 dest_ip_(), vrf_(NULL, this) {
70 boost::system::error_code err;
104 " due to unavailable VN ");
141 struct ovsdb_idl_row *row) {
145 if (ls_name == NULL) {
189 VrfDepList::iterator it =
192 if (it->first != vrf.get()) {
226 if (args.
Get(
"mac", &
mac_) ==
false) {
232 std::string resp_ctx,
const std::string &ip, uint32_t port,
233 const std::string &ls,
const std::string &mac) :
258 if (entry->
mac().find(
mac_) != std::string::npos) {
269 OvsdbUnicastMacLocalEntry oentry;
271 oentry.set_mac(entry->
mac());
273 oentry.set_dest_ip(entry->
dest_ip());
274 OvsdbUnicastMacLocalResp *u_resp =
275 static_cast<OvsdbUnicastMacLocalResp *
>(resp);
276 std::vector<OvsdbUnicastMacLocalEntry> &macs =
277 const_cast<std::vector<OvsdbUnicastMacLocalEntry>&
>(u_resp->get_macs());
278 macs.push_back(oentry);
291 void OvsdbUnicastMacLocalReq::HandleRequest()
const {
294 get_session_remote_port(),
295 get_logical_switch(), get_mac());
void NotifyDelAdd(struct ovsdb_idl_row *row)
std::string logical_switch_name_
#define OVSDB_TRACE(obj,...)
UnicastMacLocalSandeshTask(std::string resp_ctx, AgentSandeshArguments &args)
static boost::uuids::uuid StringToUuid(const std::string &str)
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
const std::string & dest_ip() const
std::string StateString() const
void Delete(KSyncEntry *entry)
UnicastMacLocalOvsdb(OvsdbClientIdl *idl, OvsPeer *peer)
void EncodeArgs(AgentSandeshArguments &args)
std::pair< VrfEntry *, UnicastMacLocalEntry * > VrfDepEntry
void Register(EntryType type, NotifyCB cb)
void VrfReEvalEnqueue(VrfEntry *vrf)
bool IsLess(const KSyncEntry &) const
int GetTaskId(const std::string &name)
KSyncEntry * FindActiveEntry(KSyncEntry *key)
void DeleteTableDone(void)
bool VrfReEval(VrfEntryRef vrf)
VnOvsdbObject * vn_ovsdb()
struct ovsdb_idl_row * ovs_entry_
TaskScheduler * task_scheduler() const
bool Get(const std::string &key, std::string *val) const
static TaskScheduler * GetInstance()
void Enqueue(Task *task)
Enqueues a task for running. Starts task if all policy rules are met else puts task in waitq...
const std::string & mac() const
bool AddOvsRoute(const VrfEntry *vrf, uint32_t vxlan_id, const std::string &dest_vn, const MacAddress &mac, Ip4Address &tor_ip)
UnicastMacLocalEntry(UnicastMacLocalOvsdb *table, const std::string &logical_switch, const std::string &mac)
OvsdbClientIdl * client_idl()
struct ovsdb_idl_row * ovs_entry()
bool Add(const std::string &key, const std::string &val)
KSyncEntry * GetReference(const KSyncEntry *key)
boost::asio::ip::address_v4 Ip4Address
KSyncEntry * Create(const KSyncEntry *key)
void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row)
WorkQueue< VrfEntryRef > * vrf_reeval_queue_
virtual ~UnicastMacLocalSandeshTask()
KSyncObject * GetObject(OvsdbClientSession *session)
const std::string & logical_switch_name() const
void DeleteOvsRoute(VrfEntry *vrf, uint32_t vxlan, const MacAddress &mac)
SandeshResponse * Alloc()
UnicastMacLocalOvsdb * unicast_mac_local_ovsdb()
FilterResp Filter(KSyncEntry *entry)
char * ovsdb_wrapper_ucast_mac_local_logical_switch(struct ovsdb_idl_row *row)
KSyncEntry * UnresolvedReference()
OvsdbClientIdlPtr client_idl_
char * ovsdb_wrapper_ucast_mac_local_mac(struct ovsdb_idl_row *row)
const std::string & name()
friend class UnicastMacLocalEntry
bool IsVrfReEvalQueueActive() const
char * ovsdb_wrapper_ucast_mac_local_dst_ip(struct ovsdb_idl_row *row)
void OvsdbUcastLocalMacNotify(OvsdbClientIdl::Op, struct ovsdb_idl_row *)
void UpdateResp(KSyncEntry *kentry, SandeshResponse *resp)
OvsdbClientIdl * client_idl()
KSyncEntry * Alloc(const KSyncEntry *key, uint32_t index)