FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
abf_itf_attach.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __ABF_ITF_ATTACH_H__
17 #define __ABF_ITF_ATTACH_H__
18 
19 #include <plugins/abf/abf_policy.h>
20 #include <vnet/fib/fib_path_list.h>
21 
22 /**
23  * Attachment data for an ABF policy to an interface
24  */
25 typedef struct abf_itf_attach_t_
26 {
28  /**
29  * The ACL and DPO are cached for fast DP access
30  */
31  /**
32  * ACL index to match
33  */
35 
36  /**
37  * The DPO actually used for forwarding
38  */
40 
41  /**
42  * Linkage into the FIB graph
43  */
45 
46  /**
47  * The VPP index of the ABF policy
48  */
50 
51  /**
52  * Sibling index on the policy's path list
53  */
55 
56  /**
57  * The protocol for the attachment. i.e. the protocol
58  * of the packets that are being forwarded
59  */
61 
62  /**
63  * The interface for the attachment
64  */
66 
67  /**
68  * The priority of this policy for attachment.
69  * The lower the value the higher the priority.
70  * The higher priority policies are matched first.
71  */
74 
75 /**
76  * Pool of ABF interface attachment objects
77  */
79 
80 static inline abf_itf_attach_t *
82 {
84 }
85 
86 extern int abf_itf_attach (fib_protocol_t fproto,
87  u32 policy_id, u32 priority, u32 sw_if_index);
88 
89 extern int abf_itf_detach (fib_protocol_t fproto,
90  u32 policy_id, u32 sw_if_index);
91 
92 typedef int (*abf_itf_attach_walk_cb_t) (index_t aii, void *ctx0);
93 
94 extern void abf_itf_attach_walk (abf_itf_attach_walk_cb_t cb, void *ctx);
95 
96 /*
97  * fd.io coding-style-patch-verification: ON
98  *
99  * Local Variables:
100  * eval: (c-set-style "gnu")
101  * End:
102  */
103 
104 #endif
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:553
abf_itf_attach_walk
void abf_itf_attach_walk(abf_itf_attach_walk_cb_t cb, void *ctx)
Definition: abf_itf_attach.c:470
abf_itf_attach_t_::aia_node
fib_node_t aia_node
Linkage into the FIB graph.
Definition: abf_itf_attach.h:44
abf_itf_attach_t_
Attachment data for an ABF policy to an interface.
Definition: abf_itf_attach.h:25
abf_itf_attach_t_::aia_sw_if_index
u32 aia_sw_if_index
The interface for the attachment.
Definition: abf_itf_attach.h:65
abf_itf_attach_get
static abf_itf_attach_t * abf_itf_attach_get(u32 index)
Definition: abf_itf_attach.h:81
priority
i32 priority
Definition: ipsec.api:95
abf_itf_attach
int abf_itf_attach(fib_protocol_t fproto, u32 policy_id, u32 priority, u32 sw_if_index)
Definition: abf_itf_attach.c:166
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
abf_itf_attach_t_::aia_sibling
u32 aia_sibling
Sibling index on the policy's path list.
Definition: abf_itf_attach.h:54
abf_itf_detach
int abf_itf_detach(fib_protocol_t fproto, u32 policy_id, u32 sw_if_index)
Definition: abf_itf_attach.c:250
abf_itf_attach_walk_cb_t
int(* abf_itf_attach_walk_cb_t)(index_t aii, void *ctx0)
Definition: abf_itf_attach.h:92
abf_itf_attach_t_::CLIB_CACHE_LINE_ALIGN_MARK
CLIB_CACHE_LINE_ALIGN_MARK(marker)
fib_protocol_t
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
abf_itf_attach_t
struct abf_itf_attach_t_ abf_itf_attach_t
Attachment data for an ABF policy to an interface.
index
u32 index
Definition: flow_types.api:221
fib_path_list.h
u32
unsigned int u32
Definition: types.h:88
abf_itf_attach_t_::aia_prio
u32 aia_prio
The priority of this policy for attachment.
Definition: abf_itf_attach.h:72
abf_itf_attach_t_::aia_dpo
dpo_id_t aia_dpo
The DPO actually used for forwarding.
Definition: abf_itf_attach.h:39
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
fib_node_t_
An node in the FIB graph.
Definition: fib_node.h:301
abf_itf_attach_t_::aia_acl
u32 aia_acl
The ACL and DPO are cached for fast DP access.
Definition: abf_itf_attach.h:34
abf_policy.h
dpo_id_t_
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:172
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
abf_itf_attach_t_::aia_abf
u32 aia_abf
The VPP index of the ABF policy.
Definition: abf_itf_attach.h:49
abf_itf_attach_t_::aia_proto
fib_protocol_t aia_proto
The protocol for the attachment.
Definition: abf_itf_attach.h:60
abf_itf_attach_pool
abf_itf_attach_t * abf_itf_attach_pool
Pool of ABF interface attachment objects.
Definition: abf_itf_attach.c:34