FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
l2e.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 #ifndef included_vnet_l2_emulation_h
17 #define included_vnet_l2_emulation_h
18 
19 #include <vlib/vlib.h>
20 #include <vnet/vnet.h>
21 
22 /**
23  * Per-interface L2 configuration
24  */
25 typedef struct l2_emulation_t_
26 {
27  /**
28  * Enabled or Disabled.
29  * this is required since one L3 protocl can be enabled, but others not
30  */
33 
34 /**
35  * per-packet trace data
36  */
37 typedef struct l2_emulation_trace_t_
38 {
39  /* per-pkt trace data */
42 
43 /**
44  * Grouping of global data for the L2 emulation feature
45  */
46 typedef struct l2_emulation_main_t_
47 {
49 
51 
52  /**
53  * Per-interface vector of emulation configs
54  */
56 
57  /**
58  * Next nodes for L2 output features
59  */
62 
63 /**
64  * L2 Emulation is a feautre that is applied to L2 ports to 'extract'
65  * IP packets from the L2 path and inject them into the L3 path (i.e.
66  * into the appropriate ip[4|6]_input node).
67  * L3 routes in the table_id for that interface should then be configured
68  * as DVR routes, therefore the forwarded packet has the L2 header
69  * preserved and togehter the L3 routed system behaves like an L2 bridge.
70  */
71 extern void l2_emulation_enable (u32 sw_if_index);
73 
75 
76 #endif
77 
78 /*
79  * fd.io coding-style-patch-verification: ON
80  *
81  * Local Variables:
82  * eval: (c-set-style "gnu")
83  * End:
84  */
vlib.h
l2_emulation_t
struct l2_emulation_t_ l2_emulation_t
Per-interface L2 configuration.
l2_emulation_disable
void l2_emulation_disable(u32 sw_if_index)
Definition: l2e.c:54
l2_emulation_main_t_::l2_emulations
l2_emulation_t * l2_emulations
Per-interface vector of emulation configs.
Definition: l2e.h:55
l2_emulation_main_t
struct l2_emulation_main_t_ l2_emulation_main_t
Grouping of global data for the L2 emulation feature.
u16
unsigned short u16
Definition: types.h:57
l2_emulation_enable
void l2_emulation_enable(u32 sw_if_index)
L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and in...
Definition: l2e.c:32
l2_emulation_main_t_::msg_id_base
u16 msg_id_base
Definition: l2e.h:48
l2_emulation_main
l2_emulation_main_t l2_emulation_main
Definition: l2e.c:24
l2_emulation_trace_t_
per-packet trace data
Definition: l2e.h:37
l2_emulation_t_::enabled
u8 enabled
Enabled or Disabled.
Definition: l2e.h:31
l2_emulation_trace_t
struct l2_emulation_trace_t_ l2_emulation_trace_t
per-packet trace data
l2_emulation_trace_t_::extracted
u8 extracted
Definition: l2e.h:40
u32
unsigned int u32
Definition: types.h:88
u8
unsigned char u8
Definition: types.h:56
l2_emulation_main_t_
Grouping of global data for the L2 emulation feature.
Definition: l2e.h:46
l2_emulation_t_
Per-interface L2 configuration.
Definition: l2e.h:25
l2_emulation_main_t_::l2_input_feat_next
u32 l2_input_feat_next[32]
Next nodes for L2 output features.
Definition: l2e.h:60
vnet.h
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
l2_emulation_main_t_::l2_emulation_node_index
u32 l2_emulation_node_index
Definition: l2e.h:50