aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/l3_binding.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vom/l3_binding.hpp')
-rw-r--r--src/vpp-api/vom/l3_binding.hpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/vpp-api/vom/l3_binding.hpp b/src/vpp-api/vom/l3_binding.hpp
index d94ff696b23..4403760180e 100644
--- a/src/vpp-api/vom/l3_binding.hpp
+++ b/src/vpp-api/vom/l3_binding.hpp
@@ -46,6 +46,19 @@ public:
~l3_binding();
/**
+ * The key type for l3_bindings
+ */
+ typedef std::pair<interface::key_type, route::prefix_t> key_type_t;
+
+ /**
+ * The iterator type
+ */
+ typedef singular_db<key_type_t, l3_binding>::const_iterator const_iterator_t;
+
+ static const_iterator_t cbegin();
+ static const_iterator_t cend();
+
+ /**
* Return the 'singular instance' of the L3-Config that matches this
* object
*/
@@ -57,19 +70,19 @@ public:
std::string to_string() const;
/**
- * Return the prefix associated with this L3config
+ * Return the prefix associated with this L3 binding
*/
const route::prefix_t& prefix() const;
/**
- * Dump all l3_bindings into the stream provided
+ * Return the interface associated with this L3 binding
*/
- static void dump(std::ostream& os);
+ const interface& itf() const;
/**
- * The key type for l3_bindings
+ * Dump all l3_bindings into the stream provided
*/
- typedef std::pair<interface::key_type, route::prefix_t> key_type_t;
+ static void dump(std::ostream& os);
/**
* Find an singular instance in the DB for the interface passed
@@ -142,6 +155,8 @@ private:
*/
void replay(void);
+ friend class interface;
+
/**
* A reference counting pointer the interface that this L3 layer
* represents. By holding the reference here, we can guarantee that