|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
35 const boost::asio::ip::address_v4&
src)
41 , m_grd(grd.singular())
47 const boost::asio::ip::address_v4&
src)
52 , m_gbd(gbd.singular())
68 gbp_vxlan::mk_name(uint32_t
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);
201 gbp_vxlan vt(payload.tunnel.vni, *bd,
src);
217 gbp_vxlan::event_handler::handle_replay()
223 gbp_vxlan::event_handler::order()
const
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.
static rc_t write()
Write/Execute all commands hitherto enqueued.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
The VPP Object Model (VOM) library.
A entry in the ARP termination table of a Bridge Domain.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
const static rc_t OK
The HW write was successfull.
static void dump(std::ostream &os)
Dump all L3Configs into the stream provided.
HW::item< handle_t > m_hdl
The SW interface handle VPP has asigned to the interface.
bool operator==(const gbp_vxlan &vt) const
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.
const key_t key() const
Return the object's key.
const std::string & name() const
Return the interface type.
virtual std::string to_string() const
Debug rpint function.
const std::string GBP_VXLAN_NAME
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
static std::shared_ptr< gbp_bridge_domain > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
A representation of an interface in VPP.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void enqueue(cmd *f)
Enqueue A command for execution.
const static log_level_t DEBUG
A command class that creates an Bridge-Domain.
The admin state of the interface.
A entry in the ARP termination table of a Route Domain.
A cmd class that Delete an Bridge-Domain.
A Database to store the unique 'singular' instances of a single object type.
@ BINDING
Then L2/objects that bind to interfaces, BD, ACLS, etc.
void event_handler(void *tls_async)
@ GBP_VXLAN_TUNNEL_MODE_L3
A representation of a method call to VPP.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
A representation of a GBP_VXLAN Tunnel in VPP.
std::shared_ptr< gbp_vxlan > singular() const
Return the matching 'singular instance'.
static std::shared_ptr< gbp_route_domain > find(const key_t &k)
Find the instnace of the route_domain domain in the OM.