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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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 *------------------------------------------------------------------
18 #ifndef _ACL_HASH_LOOKUP_H_
19 #define _ACL_HASH_LOOKUP_H_
22 #include "lookup_context.h"
26 * Do the necessary to logically apply the ACL to the existing vector of ACLs looked up
27 * during the packet processing
30 void hash_acl_apply(acl_main_t *am, u32 lc_index, int acl_index, u32 acl_position);
32 /* Remove the ACL from the packet processing in a given lookup context */
34 void hash_acl_unapply(acl_main_t *am, u32 lc_index, int acl_index);
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.
41 void hash_acl_add(acl_main_t *am, int acl_index);
42 void hash_acl_delete(acl_main_t *am, int acl_index);
44 /* return if there is already a filled-in hash acl info */
45 int hash_acl_exists(acl_main_t *am, int acl_index);