FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
hash_lookup.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2017 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #ifndef _ACL_HASH_LOOKUP_H_
19 #define _ACL_HASH_LOOKUP_H_
20 
21 #include <stddef.h>
22 #include "lookup_context.h"
23 #include "acl.h"
24 
25 /*
26  * Do the necessary to logically apply the ACL to the existing vector of ACLs looked up
27  * during the packet processing
28  */
29 
30 void hash_acl_apply(acl_main_t *am, u32 lc_index, int acl_index, u32 acl_position);
31 
32 /* Remove the ACL from the packet processing in a given lookup context */
33 
34 void hash_acl_unapply(acl_main_t *am, u32 lc_index, int acl_index);
35 
36 /*
37  * Add an ACL or delete an ACL. ACL may already have been referenced elsewhere,
38  * so potentially we also need to do the work to enable the lookups.
39  */
40 
41 void hash_acl_add(acl_main_t *am, int acl_index);
42 void hash_acl_delete(acl_main_t *am, int acl_index);
43 
44 /* return if there is already a filled-in hash acl info */
46 
47 #endif
u32 acl_index
Definition: gbp.api:310
void hash_acl_apply(acl_main_t *am, u32 lc_index, int acl_index, u32 acl_position)
Definition: hash_lookup.c:685
int hash_acl_exists(acl_main_t *am, int acl_index)
Definition: hash_lookup.c:1118
unsigned int u32
Definition: types.h:88
void hash_acl_delete(acl_main_t *am, int acl_index)
Definition: hash_lookup.c:1175
void hash_acl_unapply(acl_main_t *am, u32 lc_index, int acl_index)
Definition: hash_lookup.c:903
void hash_acl_add(acl_main_t *am, int acl_index)
Definition: hash_lookup.c:1127