2 * Copyright (c) 2015 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.
15 #ifndef __IPSEC_SPD_H__
16 #define __IPSEC_SPD_H__
18 #include <vlib/vlib.h>
20 struct ipsec_policy_t_;
23 * @brief A Secruity Policy Database
25 typedef struct ipsec_spd_t_
28 /* pool of policies */
29 struct ipsec_policy_t_ *policies;
30 /* vectors of policy indices */
31 u32 *ipv4_outbound_policies;
32 u32 *ipv6_outbound_policies;
33 u32 *ipv4_inbound_protect_policy_indices;
34 u32 *ipv4_inbound_policy_discard_and_bypass_indices;
35 u32 *ipv6_inbound_protect_policy_indices;
36 u32 *ipv6_inbound_policy_discard_and_bypass_indices;
40 * @brief Add/Delete a SPD
42 extern int ipsec_add_del_spd (vlib_main_t * vm, u32 spd_id, int is_add);
45 * @brief Bind/attach a SPD to an interface
47 extern int ipsec_set_interface_spd (vlib_main_t * vm,
48 u32 sw_if_index, u32 spd_id, int is_add);
50 #endif /* __IPSEC_SPD_H__ */
53 * fd.io coding-style-patch-verification: ON
56 * eval: (c-set-style "gnu")