FD.io VPP  v21.06
Vector Packet Processing
tunnel_types.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2019 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 option version = "1.0.1";
17 
18 import "vnet/interface_types.api";
19 import "vnet/ip/ip_types.api";
20 
21 /**
22  * Flags controlling tunnel behaviour
23  */
25 {
27  /** at encap, copy the DF bit of the payload into the tunnel header */
29  /** at encap, set the DF bit in the tunnel header */
31  /** at encap, copy the DSCP bits of the payload into the tunnel header */
33  /** at encap, copy the ECN bit of the payload into the tunnel header */
35  /** at decap, copy the ECN bit of the tunnel header into the payload */
37  /** at encap, compute flow hash on the inner packet for more entropy */
38  TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_INNER_HASH = 0x20 [backwards_compatible],
39  /** at encap, copy the hop-limit/TTL of the payload into the tunnel header */
40  TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_HOP_LIMIT = 0x40 [backwards_compatible],
41  /** at encap, copy the Flow Label of the payload into the tunnel header */
43 };
44 
45 /**
46  * tunnel mode
47  */
49 {
50  /** point-to-point */
52  /** multi-point */
54 };
55 
56 /**
57  * tunnel mode
58  */
59 enumflag tunnel_flags : u8
60 {
61  /**
62  * the tunnel's MTU tracks the MTU of its destination
63  * Currently NOT IMPLEMENTATION (this is a API place-holder)
64  */
65  TUNNEL_API_FLAG_TRACK_MTU = 0x1,
66 };
67 
68 /**
69  * An IP{v4,v6} tunnel.
70  */
71 typedef tunnel
72 {
73  /** If non-~0, specifies a custom dev instance */
74  u32 instance;
75  /** Tunnel source and destination address */
76  vl_api_address_t src;
77  vl_api_address_t dst;
78  /** ignored on create, set in details/dump */
79  vl_api_interface_index_t sw_if_index;
80  /** The table ID in which the source and destination addresses are valid */
82  vl_api_tunnel_encap_decap_flags_t encap_decap_flags;
83  vl_api_tunnel_mode_t mode;
84  vl_api_tunnel_flags_t flags;
85  /* DSCP value for the tunnel encap, ignored if ECNAP_COPY_DSCP flag is set */
86  vl_api_ip_dscp_t dscp;
87  /* TTL=0 is considered 255 */
89 };
90 
91 /*
92  * Local Variables:
93  * eval: (c-set-style "gnu")
94  * End:
95  */
option version
at encap, copy the ECN bit of the payload into the tunnel header
u8 hop_limit
at encap, compute flow hash on the inner packet for more entropy
at decap, copy the ECN bit of the tunnel header into the payload
vl_api_ip_dscp_t dscp
enumflag tunnel_flags
tunnel mode
at encap, copy the DSCP bits of the payload into the tunnel header
vl_api_address_t dst
unsigned char u8
Definition: types.h:56
unsigned int u32
Definition: types.h:88
u32 table_id
The table ID in which the source and destination addresses are valid.
vl_api_tunnel_encap_decap_flags_t encap_decap_flags
tunnel_mode
tunnel mode
vl_api_tunnel_mode_t mode
at encap, set the DF bit in the tunnel header
vl_api_interface_index_t sw_if_index
ignored on create, set in details/dump
at encap, copy the Flow Label of the payload into the tunnel header
at encap, copy the hop-limit/TTL of the payload into the tunnel header
vl_api_tunnel_flags_t flags
tunnel_encap_decap_flags
Flags controlling tunnel behaviour.
vl_api_address_t src
Tunnel source and destination address.
point-to-point
u32 instance
Definition: gre.api:51
at encap, copy the DF bit of the payload into the tunnel header
enumflag typedef tunnel
An IP{v4,v6} tunnel.