+int
+ip_feature_location_decode (vl_api_ip_feature_location_t loc,
+ ip_feature_location_t * out)
+{
+ /* Not all feature_locationcol are defined in vl_api_ip_feature_location_t
+ * so we must cast to a different type.
+ */
+ switch (loc)
+ {
+#define _(n,s) \
+ case IP_API_FEATURE_##n: \
+ *out = IP_FEATURE_##n; \
+ return (0);
+ foreach_ip_feature_location
+#undef _
+ }
+ return (VNET_API_ERROR_FEATURE_DISABLED);
+}
+
+vl_api_ip_feature_location_t
+ip_feature_location_encode (ip_feature_location_t loc)
+{
+ return ((vl_api_ip_feature_location_t) (loc));
+}
+
+