2 * Copyright (c) 2016 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef __vnet_cop_h__
17 #define __vnet_cop_h__
19 #include <vlib/vlib.h>
20 #include <vnet/vnet.h>
21 #include <vnet/pg/pg.h>
23 #include <vppinfra/error.h>
24 #include <vppinfra/hash.h>
25 #include <vnet/vnet.h>
26 #include <vnet/ip/ip.h>
27 #include <vnet/l2/l2_input.h>
28 #include <vnet/ethernet/ethernet.h>
29 #include <vnet/ip/ip4_packet.h>
30 #include <vnet/ip/ip6_packet.h>
40 /* First check src address against whitelist */
43 DEFAULT_RX_COP_WHITELIST,
45 /* Pkts not otherwise dropped go to xxx-input */
50 /* Going, going, gone... */
57 vnet_config_main_t config_main;
58 u32 * config_index_by_sw_if_index;
66 cop_config_main_t cop_config_mains[VNET_N_COPS];
69 vlib_main_t * vlib_main;
70 vnet_main_t * vnet_main;
75 extern vlib_node_registration_t cop_input_node;
77 int cop_interface_enable_disable (u32 sw_if_index, int enable_disable);
85 } cop_whitelist_enable_disable_args_t;
87 int cop_whitelist_enable_disable (cop_whitelist_enable_disable_args_t *a);
89 #endif /* __vnet_cop_h__ */