aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/feature/feature.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-07-29 18:07:02 -0400
committerDave Barach <dave@barachs.net>2020-07-29 18:08:01 -0400
commitcaebbcf3cd19eff9dd505a89d12e26e331c77922 (patch)
tree11f4598722ec6d957ee6bfccb4b772be430fb931 /src/vnet/feature/feature.h
parent4c5343600d4fa4351816dd44a26c6a9b81e6b47e (diff)
feature: add vnet_feature_is_enabled
A predicate function which says whether a given sw_if_index has a certain feature enabled. int vnet_feature_is_enabled (const char *arc_name, const char *feature_node_name, u32 sw_if_index) returns 1 if the feature is enabled returns 0 if the feature is not enabled returns VNET_API_ERROR_INVALID_VALUE if the arc name is not found returns VNET_API_ERROR_INVALID_VALUE_2 if the feature node name is not found returns VNET_API_ERROR_INVALID_SW_IF_INDEX if the sw_if_index is not found Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id9ed53e2ae9252efc750ae80fd610456b95cefa4
Diffstat (limited to 'src/vnet/feature/feature.h')
-rw-r--r--src/vnet/feature/feature.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/feature/feature.h b/src/vnet/feature/feature.h
index 6eb6de3fba7..9aa32182ef6 100644
--- a/src/vnet/feature/feature.h
+++ b/src/vnet/feature/feature.h
@@ -488,6 +488,10 @@ typedef void (*vnet_feature_update_cb_t) (u32 sw_if_index,
extern void vnet_feature_register (vnet_feature_update_cb_t cb, void *data);
+int
+vnet_feature_is_enabled (const char *arc_name, const char *feature_node_name,
+ u32 sw_if_index);
+
#endif /* included_feature_h */
/*