35 const boost::asio::ip::address_v4&
src)
41 , m_grd(grd.singular())
47 const boost::asio::ip::address_v4&
src)
68 gbp_vxlan::mk_name(uint32_t
vni)
72 s << GBP_VXLAN_NAME <<
"-" <<
vni;
86 return (m_vni == vt.m_vni && m_src == vt.m_src);
104 false, m_grd->id()));
114 m_db.release(
key(),
this);
120 std::ostringstream s;
121 s <<
"gbp-vxlan:[" << m_vni <<
"]";
126 std::shared_ptr<gbp_vxlan>
129 return (m_db.find(key));
133 gbp_vxlan::update(
const gbp_vxlan& desired)
141 false, m_grd->id()));
148 std::shared_ptr<gbp_vxlan>
149 gbp_vxlan::find_or_add(
const gbp_vxlan& temp)
151 return (m_db.find_or_add(temp.
key(), temp));
154 std::shared_ptr<gbp_vxlan>
157 return find_or_add(*
this);
160 std::shared_ptr<interface>
161 gbp_vxlan::singular_i()
const 163 return find_or_add(*
this);
178 std::shared_ptr<gbp_vxlan_cmds::dump_cmd>
cmd =
179 std::make_shared<gbp_vxlan_cmds::dump_cmd>();
184 for (
auto& record : *cmd) {
185 auto& payload = record.get_payload();
187 boost::asio::ip::address_v4
src =
from_api(payload.tunnel.src);
193 gbp_vxlan vt(payload.tunnel.vni, *rd, src);
201 gbp_vxlan vt(payload.tunnel.vni, *bd, src);
217 gbp_vxlan::event_handler::handle_replay()
223 gbp_vxlan::event_handler::order()
const
static void dump(std::ostream &os)
Dump all L3Configs into the stream provided.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static const log_level_t DEBUG
A command class that creates an Bridge-Domain.
static std::shared_ptr< gbp_bridge_domain > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
const std::string & name() const
Return the interface type.
std::shared_ptr< gbp_vxlan > singular() const
Return the matching 'singular instance'.
A entry in the ARP termination table of a Bridge Domain.
A representation of a GBP_VXLAN Tunnel in VPP.
virtual std::string to_string() const
Debug rpint function.
A Database to store the unique 'singular' instances of a single object type.
A cmd class that Delete an Bridge-Domain.
The admin state of the interface.
gbp_vxlan(uint32_t vni, const gbp_bridge_domain &gbd, const boost::asio::ip::address_v4 &src)
Construct a new object matching the desried state.
A representation of an interface in VPP.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
A entry in the ARP termination table of a Route Domain.
Then L2/objects that bind to interfaces, BD, ACLS, etc.
const key_t key() const
Return the object's key.
The VPP Object Model (VOM) library.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
A representation of a method call to VPP.
static std::shared_ptr< gbp_route_domain > find(const key_t &k)
Find the instnace of the route_domain domain in the OM.
uint32_t key_t
The VNI is the key.
static std::shared_ptr< gbp_vxlan > find(const key_t k)
Find the GBP_VXLAN tunnel in the OM.
static bool register_listener(listener *listener)
Register a listener of events.
const std::string GBP_VXLAN_NAME
bool operator==(const gbp_vxlan &vt) const