|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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++)
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;
235 #include <abf/abf.api.c>
250 .version = VPP_BUILD_VER,
251 .description =
"Access Control List (ACL) Based Forwarding",
Add or delete a policy attachment to an interface.
u32 ap_id
The policy ID - as configured by the client.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
#define ABF_PLUGIN_VERSION_MINOR
static int abf_itf_attach_send_details(u32 aiai, void *args)
Path encode context to use when walking a path-list to encode paths.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Attachment details from a dump.
#define ABF_PLUGIN_VERSION_MAJOR
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void vl_api_abf_plugin_get_version_t_handler(vl_api_abf_plugin_get_version_t *mp)
Attachment data for an ABF policy to an interface.
An ACL based Forwarding 'policy'.
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
Encode and decode functions from the API types to internal types.
abf_policy_t * abf_policy_get(u32 index)
Get an ABF object from its VPP index.
u32 aia_sw_if_index
The interface for the attachment.
vl_api_abf_itf_attach_t attach
static void vl_api_abf_policy_dump_t_handler(vl_api_abf_policy_dump_t *mp)
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
import vnet interface_types api
fib_route_path_t * rpaths
static void setup_message_id_table(api_main_t *am)
Policy description returned in the dump.
static abf_itf_attach_t * abf_itf_attach_get(u32 index)
fib_node_index_t ap_pl
The path-list describing how to forward in case of a match.
A description of an ABF policy.
An API client registration, only in vpp/vlib.
static clib_error_t * abf_api_init(vlib_main_t *vm)
static int abf_policy_send_details(u32 api, void *args)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
static void vl_api_abf_itf_attach_dump_t_handler(vl_api_abf_itf_attach_dump_t *mp)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
vl_api_registration_t * rp
static void vl_api_abf_itf_attach_add_del_t_handler(vl_api_abf_itf_attach_add_del_t *mp)
vl_api_abf_policy_t policy
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)
#define vec_free(V)
Free vector's memory (no header).
typedef abf_itf_attach
A description of a policy attachment to an interface.
Reply to get the plugin version.
void abf_policy_walk(abf_policy_walk_cb_t cb, void *ctx)
Walk/visit each of the ABF policies.
u32 ap_acl
ACL index to match.
#define VLIB_INIT_FUNCTION(x)
int abf_policy_delete(u32 policy_id, const fib_route_path_t *rpaths)
Delete paths from an ABF Policy.
u32 aia_prio
The priority of this policy for attachment.
A representation of a path as described by a route producer.
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)
int abf_itf_detach(fib_protocol_t fproto, u32 policy_id, u32 sw_if_index)
#define vec_foreach(var, vec)
Vector iterator.
vl_api_abf_itf_attach_t attach
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
struct abf_dump_walk_ctx_t_ abf_dump_walk_ctx_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
int abf_policy_update(u32 policy_id, u32 acl_index, const fib_route_path_t *rpaths)
Create or update an ABF Policy.
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
static void vl_api_abf_policy_add_del_t_handler(vl_api_abf_policy_add_del_t *mp)
static u32 abf_base_msg_id
Base message ID fot the plugin.
void abf_itf_attach_walk(abf_itf_attach_walk_cb_t cb, void *ctx)
u32 aia_abf
The VPP index of the ABF policy.
fib_protocol_t aia_proto
The protocol for the attachment.
vl_api_abf_policy_t policy
void * vl_msg_api_alloc(int nbytes)
Dump all the policy attachments.