26 #include <vpp/app/version.h> 33 #include <abf/abf.api_enum.h> 34 #include <abf/abf.api_types.h> 66 vl_api_abf_policy_add_del_reply_t *rmp;
73 for (pi = 0; pi < mp->
policy.n_paths; pi++)
87 ntohl (mp->
policy.acl_index), paths);
102 vl_api_abf_itf_attach_add_del_reply_t *rmp;
110 ntohl (mp->
attach.policy_id),
111 ntohl (mp->
attach.priority),
112 ntohl (mp->
attach.sw_if_index));
117 ntohl (mp->
attach.policy_id),
118 ntohl (mp->
attach.sw_if_index));
139 vl_api_fib_path_t *fp;
147 msg_size =
sizeof (*mp) +
sizeof (mp->
policy.paths[0]) * n_paths;
205 mp->_vl_msg_id = ntohs (VL_API_ABF_ITF_ATTACH_DETAILS +
abf_base_msg_id);
235 #include <abf/abf.api.c> 250 .version = VPP_BUILD_VER,
251 .description =
"Access Control List (ACL) Based Forwarding",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Add or delete a policy attachment to an interface.
fib_protocol_t aia_proto
The protocol for the attachment.
struct abf_dump_walk_ctx_t_ abf_dump_walk_ctx_t
A representation of a path as described by a route producer.
vl_api_abf_policy_t policy
u32 ap_id
The policy ID - as configured by the client.
abf_policy_t * abf_policy_get(u32 index)
Get an ABF object from its VPP index.
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
static void vl_api_abf_policy_add_del_t_handler(vl_api_abf_policy_add_del_t *mp)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static u32 abf_base_msg_id
Base message ID fot the plugin.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void vl_api_abf_policy_dump_t_handler(vl_api_abf_policy_dump_t *mp)
int abf_itf_detach(fib_protocol_t fproto, u32 policy_id, u32 sw_if_index)
void * vl_msg_api_alloc(int nbytes)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
Policy description returned in the dump.
u32 aia_abf
The VPP index of the ABF policy.
Attachment details from a dump.
static int abf_policy_send_details(u32 api, void *args)
static clib_error_t * abf_api_init(vlib_main_t *vm)
static int abf_itf_attach_send_details(u32 aiai, void *args)
#define VLIB_INIT_FUNCTION(x)
vl_api_abf_itf_attach_t attach
static abf_itf_attach_t * abf_itf_attach_get(u32 index)
static void vl_api_abf_itf_attach_dump_t_handler(vl_api_abf_itf_attach_dump_t *mp)
static void vl_api_abf_plugin_get_version_t_handler(vl_api_abf_plugin_get_version_t *mp)
#define ABF_PLUGIN_VERSION_MAJOR
int abf_policy_update(u32 policy_id, u32 acl_index, const fib_route_path_t *rpaths)
Create or update an ABF Policy.
vl_api_registration_t * rp
u32 aia_sw_if_index
The interface for the attachment.
void abf_policy_walk(abf_policy_walk_cb_t cb, void *ctx)
Walk/visit each of the ABF policies.
An API client registration, only in vpp/vlib.
fib_node_index_t ap_pl
The path-list describing how to forward in case of a match.
Attachment data for an ABF policy to an interface.
#define vec_free(V)
Free vector's memory (no header).
vl_api_abf_policy_t policy
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
vl_api_fib_path_t paths[n_paths]
u32 aia_prio
The priority of this policy for attachment.
A description of an ABF policy.
An ACL based Forwarding 'policy'.
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
void abf_itf_attach_walk(abf_itf_attach_walk_cb_t cb, void *ctx)
Path encode context to use when walking a path-list to encode paths.
static void vl_api_abf_itf_attach_add_del_t_handler(vl_api_abf_itf_attach_add_del_t *mp)
u32 ap_acl
ACL index to match.
fib_route_path_t * rpaths
Dump all the policy attachments.
Reply to get the plugin version.
#define ABF_PLUGIN_VERSION_MINOR
int abf_policy_delete(u32 policy_id, const fib_route_path_t *rpaths)
Delete paths from an ABF Policy.
#define vec_foreach(var, vec)
Vector iterator.
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
typedef abf_itf_attach
A description of a policy attachment to an interface.
void fib_path_list_walk_w_ext(fib_node_index_t path_list_index, const fib_path_ext_list_t *ext_list, fib_path_list_walk_w_ext_fn_t func, void *ctx)
import vnet interface_types api
vl_api_abf_itf_attach_t attach
fib_path_list_walk_rc_t fib_path_encode(fib_node_index_t path_list_index, fib_node_index_t path_index, const fib_path_ext_t *path_ext, void *args)