FD.io VPP  v21.01.1
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 
23 
25 
26 static void
28 {
29  if (action == VLIB_ENABLE)
30  {
33  }
34  else
35  {
38  }
39 }
40 
41 static clib_error_t *
43 {
45 
46  if ((error = vlib_call_init_function (vm, punt_init)))
47  return (error);
48 
50 
51 #define _(s,v) vlib_punt_reason_alloc (punt_hdl, v, \
52  ipsec_punt_interested_listener, \
53  NULL, \
54  &ipsec_punt_reason[IPSEC_PUNT_##s]);
56 #undef _
57  return (error);
58 }
59 
61 
62 
63 /*
64  * fd.io coding-style-patch-verification: ON
65  *
66  * Local Variables:
67  * eval: (c-set-style "gnu")
68  * End:
69  */
int vlib_punt_hdl_t
Typedef for a client handle.
Definition: punt.h:47
vlib_main_t * vm
Definition: in2out_ed.c:1580
static clib_error_t * ipsec_punt_init(vlib_main_t *vm)
Definition: ipsec_punt.c:42
u8 data[128]
Definition: ipsec_types.api:90
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:173
#define vlib_call_init_function(vm, x)
Definition: init.h:270
vlib_punt_hdl_t vlib_punt_client_register(const char *who)
Register a new clinet.
Definition: punt.c:156
Definition: cJSON.c:84
static clib_error_t * punt_init(vlib_main_t *vm)
Definition: punt.c:663
void ipsec_tun_register_nodes(ip_address_family_t af)
Definition: ipsec_tun.c:98
vlib_punt_reason_t ipsec_punt_reason[IPSEC_PUNT_N_REASONS]
Definition: ipsec_punt.c:24
static vlib_punt_hdl_t punt_hdl
Definition: ipsec_punt.c:22
#define foreach_ipsec_punt_reason
Definition: ipsec_punt.h:20
static void ipsec_punt_interested_listener(vlib_enable_or_disable_t action, void *data)
Definition: ipsec_punt.c:27
vl_api_mac_event_action_t action
Definition: l2.api:181
void ipsec_tun_unregister_nodes(ip_address_family_t af)
Definition: ipsec_tun.c:115
enum vlib_punt_reason_t_ vlib_punt_reason_t
The &#39;syatem&#39; defined punt reasons.
vlib_enable_or_disable_t
Definition: defs.h:76