FD.io VPP  v21.10.1-2-g0a485f517
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  */
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_FLOW_LABEL
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_FLOW_LABEL
at encap, copy the Flow Label of the payload into the tunnel header
Definition: tunnel_types.api:42
dst
vl_api_address_t dst
Definition: tunnel_types.api:77
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_SET_DF
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_SET_DF
at encap, set the DF bit in the tunnel header
Definition: tunnel_types.api:30
src
vl_api_address_t src
Tunnel source and destination address.
Definition: tunnel_types.api:76
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_HOP_LIMIT
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_HOP_LIMIT
at encap, copy the hop-limit/TTL of the payload into the tunnel header
Definition: tunnel_types.api:40
tunnel_mode
tunnel_mode
tunnel mode
Definition: tunnel_types.api:48
flags
vl_api_tunnel_flags_t flags
Definition: tunnel_types.api:84
tunnel_flags
enumflag tunnel_flags
tunnel mode
Definition: tunnel_types.api:65
TUNNEL_API_MODE_P2P
@ TUNNEL_API_MODE_P2P
point-to-point
Definition: tunnel_types.api:51
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DF
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DF
at encap, copy the DF bit of the payload into the tunnel header
Definition: tunnel_types.api:28
dscp
vl_api_ip_dscp_t dscp
Definition: tunnel_types.api:86
TUNNEL_API_MODE_MP
@ TUNNEL_API_MODE_MP
multi-point
Definition: tunnel_types.api:53
sw_if_index
vl_api_interface_index_t sw_if_index
ignored on create, set in details/dump
Definition: tunnel_types.api:79
encap_decap_flags
vl_api_tunnel_encap_decap_flags_t encap_decap_flags
Definition: tunnel_types.api:82
hop_limit
u8 hop_limit
Definition: tunnel_types.api:88
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN
at encap, copy the ECN bit of the payload into the tunnel header
Definition: tunnel_types.api:34
tunnel_encap_decap_flags
tunnel_encap_decap_flags
Flags controlling tunnel behaviour.
Definition: tunnel_types.api:24
mode
vl_api_tunnel_mode_t mode
Definition: tunnel_types.api:83
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_INNER_HASH
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_INNER_HASH
at encap, compute flow hash on the inner packet for more entropy
Definition: tunnel_types.api:38
TUNNEL_API_ENCAP_DECAP_FLAG_DECAP_COPY_ECN
@ TUNNEL_API_ENCAP_DECAP_FLAG_DECAP_COPY_ECN
at decap, copy the ECN bit of the tunnel header into the payload
Definition: tunnel_types.api:36
TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP
@ TUNNEL_API_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP
at encap, copy the DSCP bits of the payload into the tunnel header
Definition: tunnel_types.api:32
u32
unsigned int u32
Definition: types.h:88
instance
u32 instance
Definition: gre.api:51
u8
unsigned char u8
Definition: types.h:56
tunnel
enumflag typedef tunnel
An IP{v4,v6} tunnel.
Definition: tunnel_types.api:72
TUNNEL_API_ENCAP_DECAP_FLAG_NONE
@ TUNNEL_API_ENCAP_DECAP_FLAG_NONE
Definition: tunnel_types.api:26
version
option version
Definition: tunnel_types.api:16
table_id
u32 table_id
The table ID in which the source and destination addresses are valid.
Definition: tunnel_types.api:81