FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ipsec_punt.c
Go to the documentation of this file.
1 /*
2  * esp_decrypt.c : IPSec ESP decrypt node
3  *
4  * Copyright (c) 2015 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <vnet/ipsec/ipsec.h>
19 #include <vnet/ipsec/ipsec_punt.h>
20 #include <vnet/ipsec/ipsec_tun.h>
21 #include <vnet/ip/punt.h>
22 
24 
26 
27 static void
29 {
30  if (action == VLIB_ENABLE)
31  {
34  }
35  else
36  {
39  }
40 }
41 
42 static clib_error_t *
44 {
46 
48  return (error);
49 
51 
52 #define _(s, v, f) \
53  vlib_punt_reason_alloc (punt_hdl, v, ipsec_punt_interested_listener, NULL, \
54  &ipsec_punt_reason[IPSEC_PUNT_##s], \
55  VNET_PUNT_REASON_F_##f, \
56  format_vnet_punt_reason_flags);
58 #undef _
59  return (error);
60 }
61 
63 
64 
65 /*
66  * fd.io coding-style-patch-verification: ON
67  *
68  * Local Variables:
69  * eval: (c-set-style "gnu")
70  * End:
71  */
vlib_punt_reason_t
enum vlib_punt_reason_t_ vlib_punt_reason_t
The 'syatem' defined punt reasons.
ipsec.h
foreach_ipsec_punt_reason
#define foreach_ipsec_punt_reason
Definition: ipsec_punt.h:20
ipsec_tun_register_nodes
void ipsec_tun_register_nodes(ip_address_family_t af)
Definition: ipsec_tun.c:98
ipsec_tun.h
punt_hdl
static vlib_punt_hdl_t punt_hdl
Definition: ipsec_punt.c:23
ipsec_punt_init
static clib_error_t * ipsec_punt_init(vlib_main_t *vm)
Definition: ipsec_punt.c:43
vlib_call_init_function
#define vlib_call_init_function(vm, x)
Definition: init.h:259
punt_init
static clib_error_t * punt_init(vlib_main_t *vm)
Definition: punt.c:712
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
AF_IP4
@ AF_IP4
Definition: ip_types.h:23
IPSEC_PUNT_N_REASONS
@ IPSEC_PUNT_N_REASONS
Definition: ipsec_punt.h:30
error
Definition: cJSON.c:88
vlib_enable_or_disable_t
vlib_enable_or_disable_t
Definition: defs.h:76
ipsec_punt.h
VLIB_ENABLE
@ VLIB_ENABLE
Definition: defs.h:79
data
u8 data[128]
Definition: ipsec_types.api:95
punt.h
Definitions for punt infrastructure.
VLIB_INIT_FUNCTION
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:172
ipsec_tun_unregister_nodes
void ipsec_tun_unregister_nodes(ip_address_family_t af)
Definition: ipsec_tun.c:115
ipsec_punt_interested_listener
static void ipsec_punt_interested_listener(vlib_enable_or_disable_t action, void *data)
Definition: ipsec_punt.c:28
AF_IP6
@ AF_IP6
Definition: ip_types.h:24
vlib_punt_hdl_t
int vlib_punt_hdl_t
Typedef for a client handle.
Definition: punt.h:52
vlib_main_t
Definition: main.h:102
clib_error_t
Definition: clib_error.h:21
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51
vlib_punt_client_register
vlib_punt_hdl_t vlib_punt_client_register(const char *who)
Register a new clinet.
Definition: punt.c:171
action
vl_api_mac_event_action_t action
Definition: l2.api:211
ipsec_punt_reason
vlib_punt_reason_t ipsec_punt_reason[IPSEC_PUNT_N_REASONS]
Definition: ipsec_punt.c:25