FD.io VPP  v21.06-1-gbb7418cf9
Vector Packet Processing
adl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016,2020 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 __vnet_adl_h__
17 #define __vnet_adl_h__
18 
19 #include <vlib/vlib.h>
20 #include <vnet/vnet.h>
21 
22 #include <vppinfra/error.h>
23 #include <vppinfra/hash.h>
24 #include <vnet/vnet.h>
25 #include <vnet/ip/ip.h>
26 #include <vnet/l2/l2_input.h>
27 #include <vnet/ethernet/ethernet.h>
28 #include <vnet/ip/ip4_packet.h>
29 #include <vnet/ip/ip6_packet.h>
30 
31 typedef enum {
36 } vnet_adl_t;
37 
38 typedef enum {
39  /* First check src address against allowlist */
43 
44  /* Pkts not otherwise dropped go to xxx-input */
48 
49  /* Going, going, gone... */
51 
54 
55 typedef struct {
59 
60 typedef struct {
63 
64 typedef struct {
65  adl_config_main_t adl_config_mains[VNET_N_ADLS];
66 
68 
69  /* convenience */
72 } adl_main_t;
73 
74 extern adl_main_t adl_main;
75 
77 
78 int adl_interface_enable_disable (u32 sw_if_index, int enable_disable);
79 
80 typedef struct {
87 
89 
90 /* Plugin private opaque union type */
91 typedef struct {
92  /* MUST be in sync with .../src/vnet/buffer.h */
99  /* end of must be in sync with .../src/vnet/buffer.h */
100  union
101  {
102  /* COP - configurable junk filter(s) */
103  struct
104  {
105  /* Current configuration index. */
107  } adl;
108  };
110 
111 #define adl_buffer(b) ((adl_buffer_opaque_t *) (b)->opaque)
112 
113 #endif /* __vnet_adl_h__ */
a
Definition: bitmap.h:544
i16 l3_hdr_offset
Definition: adl.h:95
unsigned char u8
Definition: types.h:56
Definition: adl.h:64
unsigned int u32
Definition: types.h:88
i16 l4_hdr_offset
Definition: adl.h:96
u16 msg_id_base
Definition: adl.h:67
u32 current_config_index
Definition: adl.h:106
vlib_main_t * vlib_main
Definition: adl.h:70
i16 l2_hdr_offset
Definition: adl.h:94
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
unsigned short u16
Definition: types.h:57
adl_main_t adl_main
Definition: adl.c:20
vnet_config_main_t config_main
Definition: adl.h:56
int adl_allowlist_enable_disable(adl_allowlist_enable_disable_args_t *a)
Definition: adl.c:233
int adl_interface_enable_disable(u32 sw_if_index, int enable_disable)
Definition: adl.c:169
u32 fib_index
Definition: adl.h:61
u8 feature_arc_index
Definition: adl.h:97
u32 * config_index_by_sw_if_index
Definition: adl.h:57
vlib_node_registration_t adl_input_node
(constructor) VLIB_REGISTER_NODE (adl_input_node)
Definition: node.c:258
struct _vlib_node_registration vlib_node_registration_t
adl_feature_type_t
Definition: adl.h:38
vnet_adl_t
Definition: adl.h:31
u8 dont_waste_me
Definition: adl.h:98
vnet_main_t * vnet_main
Definition: adl.h:71
signed short i16
Definition: types.h:46