|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
24 .stat_segment_name =
"/net/ipsec/policy",
108 IPSEC_SPD_POLICY_IP6_OUTBOUND : IPSEC_SPD_POLICY_IP4_OUTBOUND);
115 case IPSEC_POLICY_ACTION_PROTECT:
117 IPSEC_SPD_POLICY_IP6_INBOUND_PROTECT :
118 IPSEC_SPD_POLICY_IP4_INBOUND_PROTECT);
120 case IPSEC_POLICY_ACTION_BYPASS:
122 IPSEC_SPD_POLICY_IP6_INBOUND_BYPASS :
123 IPSEC_SPD_POLICY_IP4_INBOUND_BYPASS);
125 case IPSEC_POLICY_ACTION_DISCARD:
127 IPSEC_SPD_POLICY_IP6_INBOUND_DISCARD :
128 IPSEC_SPD_POLICY_IP4_INBOUND_DISCARD);
130 case IPSEC_POLICY_ACTION_RESOLVE:
152 return VNET_API_ERROR_SYSCALL_ERROR_1;
157 return VNET_API_ERROR_SYSCALL_ERROR_1;
163 if (
policy->policy == IPSEC_POLICY_ACTION_PROTECT)
168 return VNET_API_ERROR_SYSCALL_ERROR_1;
169 policy->sa_index = sa_index;
176 policy_index = vp -
im->policies;
185 *stat_index = policy_index;
vnet_interface_main_t * im
#define clib_memcpy(d, s, n)
ip46_address_range_t raddr
vl_api_ipsec_spd_action_t policy
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static int ipsec_policy_is_equal(ipsec_policy_t *p1, ipsec_policy_t *p2)
static int ipsec_spd_entry_sort(void *a1, void *a2)
void vlib_validate_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
validate a combined counter
#define pool_put(P, E)
Free an object E in pool P.
index_t ipsec_sa_find_and_lock(u32 id)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
char * name
The counter collection's name.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
int ipsec_policy_mk_type(bool is_outbound, bool is_ipv6, ipsec_policy_action_t action, ipsec_spd_policy_type_t *type)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_foreach_index(var, v)
Iterate over vector indices.
static void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
Clear a combined counter Clears the set of per-thread counters.
void ipsec_sa_unlock(index_t sai)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
vlib_combined_counter_main_t ipsec_spd_policy_counters
Policy packet & bytes counters.
A collection of combined counters.
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add, u32 *stat_index)
Add/Delete a SPD.
A Secruity Policy Database.
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
ipsec_spd_policy_type_t type
ip46_address_range_t laddr
u32 * policies[IPSEC_SPD_POLICY_N_TYPES]
vectors for each of the policy types
enum ipsec_spd_policy_t_ ipsec_spd_policy_type_t
ipsec_policy_action_t policy
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_mac_event_action_t action
vl_api_fib_path_type_t type
#define vec_del1(v, i)
Delete the element at index I.