10 #include <vnc_cfg_types.h>
11 #include <bgp_schema_types.h>
12 #include <agent_types.h>
46 std::cout << str << std::endl;
47 if (system(str.c_str()) < 0) {
48 LOG(ERROR,
"Error executing command : " << str);
81 s <<
"brctl addbr " <<
name_;
86 <<
" group 239.1.1.1 dstport 0";
94 s <<
"ifconfig " << name_ <<
" up";
98 s <<
"ifconfig " << vxlan_port_name_ <<
" up";
110 s <<
"ip link del " << vxlan_port_name_ <<
" type vxlan id " <<
vxlan_id();
114 s <<
" brctl delbr " <<
name_;
205 switch (intrface->
type()) {
235 sprintf(buff,
"%02x:%02x:%02x:%02x:%02x:%02x",
248 if (
port() !=
nullptr) {
250 s <<
"bridge fdb add " << buff <<
" dev " <<
port()->
port_name()
258 s <<
"bridge fdb add " << buff <<
" dst " <<
tunnel_dest() <<
" dev "
274 if (
port() !=
nullptr) {
276 s <<
"bridge fdb del " << buff <<
" dev " <<
port()->
port_name()
virtual ~KSyncLinuxVrfObject()
KSyncLinuxBridgeObject(KSyncLinuxVxlan *ksync)
KSyncLinuxPortEntry(KSyncLinuxPortObject *obj, const Interface *intrface)
virtual ~KSyncLinuxFdbEntry()
KSyncLinuxBridgeEntry(KSyncLinuxBridgeObject *obj, const VxLanId *vxlan)
KSyncLinuxVrfObject(KSyncLinuxVxlan *ksync)
KSyncEntry * DBToKSyncEntry(const DBEntry *e)
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables.
uint32_t vxlan_id() const
const MacAddress & mac() const
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
KSyncLinuxVxlan(Agent *agent)
KSyncLinuxPortObject(KSyncLinuxVxlan *ksync)
static void MacToStr(char *buff, const MacAddress &mac)
void set_port_obj(KSyncVxlanPortObject *obj)
virtual ~KSyncLinuxFdbObject()
const KSyncVxlanBridgeEntry * bridge() const
static void Execute(const string &str)
const std::string & port_name() const
const std::string name() const
KSyncVxlanRouteObject * AllocBridgeRouteTable(const VrfEntry *entry)
AgentRouteTable * GetBridgeRouteTable() const
const Ip4Address & tunnel_dest() const
KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
KSyncEntry * DBToKSyncEntry(const DBEntry *e)
void set_vrf_obj(KSyncVxlanVrfObject *obj)
#define LOG(_Level, _Msg)
KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
void set_bridge_obj(KSyncVxlanBridgeObject *obj)
const KSyncLinuxBridgeEntry * old_bridge_
std::string vxlan_port_name_
KSyncLinuxFdbObject(KSyncLinuxVrfObject *vrf, AgentRouteTable *rt_table)
const KSyncVxlanBridgeEntry * bridge() const
KSyncLinuxFdbEntry(KSyncLinuxFdbObject *obj, const BridgeRouteEntry *route)
const KSyncVxlanPortEntry * port() const
const std::string vxlan_port_name() const