string feature_name[64];
};
+autoendian define feature_is_enabled
+{
+ u32 client_index;
+ u32 context;
+
+ string arc_name[64];
+ string feature_name[64];
+ vl_api_interface_index_t sw_if_index;
+};
+
+autoendian define feature_is_enabled_reply
+{
+ u32 client_index;
+ u32 context;
+ i32 retval;
+
+ bool is_enabled;
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")
REPLY_MACRO (VL_API_FEATURE_ENABLE_DISABLE_REPLY);
}
+static void
+vl_api_feature_is_enabled_t_handler (vl_api_feature_is_enabled_t *mp)
+{
+ vl_api_feature_is_enabled_reply_t *rmp = NULL;
+ i32 rv = 0;
+ bool is_enabled = false;
+
+ VALIDATE_SW_IF_INDEX_END (mp);
+
+ u8 *arc_name = format (0, "%s%c", mp->arc_name, 0);
+ u8 *feature_name = format (0, "%s%c", mp->feature_name, 0);
+
+ is_enabled = vnet_feature_is_enabled (
+ (const char *) arc_name, (const char *) feature_name, mp->sw_if_index);
+
+ vec_free (feature_name);
+ vec_free (arc_name);
+
+ BAD_SW_IF_INDEX_LABEL;
+
+ REPLY_MACRO2_END (VL_API_FEATURE_IS_ENABLED_REPLY,
+ ({ rmp->is_enabled = is_enabled; }));
+}
+
#include <vnet/feature/feature.api.c>
static clib_error_t *