summaryrefslogtreecommitdiffstats
path: root/src/plugins/urpf/urpf.h
diff options
context:
space:
mode:
authorhedi bouattour <hedibouattour2010@gmail.com>2022-09-14 12:39:23 +0000
committerNeale Ranns <neale@graphiant.com>2022-10-07 04:18:54 +0000
commitb3605eab5ad6b8acb758caf7ce04c39d91f9e969 (patch)
tree4be488ba1f2f8c466f83b4f5f5aa35b98deeee07 /src/plugins/urpf/urpf.h
parent9260b8861e62fb9bb0c9dfb5a89c9636ef9a05e2 (diff)
urpf: add mode for specific fib index lookup
this patch adds a mode to urpf in order to perform the lookup in a specified vrf instead of the interface vrf Type: feature Change-Id: Ieb91de6ccdfbf32b6939364f3bebeecd2d57af19 Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
Diffstat (limited to 'src/plugins/urpf/urpf.h')
-rw-r--r--src/plugins/urpf/urpf.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/plugins/urpf/urpf.h b/src/plugins/urpf/urpf.h
index 941cda25f4b..c2ce6b0d452 100644
--- a/src/plugins/urpf/urpf.h
+++ b/src/plugins/urpf/urpf.h
@@ -18,10 +18,10 @@
#include <vnet/ip/ip_types.h>
-#define foreach_urpf_mode \
- _(OFF, "off") \
- _(LOOSE, "loose") \
- _(STRICT, "strict") \
+#define foreach_urpf_mode \
+ _ (OFF, "off") \
+ _ (LOOSE, "loose") \
+ _ (STRICT, "strict")
typedef enum urpf_mode_t_
{
@@ -34,10 +34,17 @@ typedef enum urpf_mode_t_
extern u8 *format_urpf_mode (u8 * s, va_list * a);
-extern void urpf_update (urpf_mode_t mode,
- u32 sw_if_index,
- ip_address_family_t af, vlib_dir_t dir);
+typedef struct
+{
+ urpf_mode_t mode;
+ u32 fib_index;
+ u8 fib_index_is_custom;
+} urpf_data_t;
+
+extern urpf_data_t *urpf_cfgs[N_AF][VLIB_N_DIR];
+extern int urpf_update (urpf_mode_t mode, u32 sw_if_index,
+ ip_address_family_t af, vlib_dir_t dir, u32 fib_index);
#endif