2 * Copyright (c) 2018 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * The IPIP module implements IP{v4,v6} over IP{v4,v6} tunnelling as
18 * described in RFC2473 and to some extent the largely historical
19 * RFC1853. The module also supports an IPv4 over IPv6 automatic
20 * tunnelling mechanism called 6RD (RFC5969).
22 * The IPIP API module supports a CRD model for adding, deleting and
23 * listing tunnels. A tunnel is represented as an interface in
24 * VPP. The "handle" representing a tunnel is the sw_if_index. As any
25 * interface, the user must configure an IPv4 and/or IPv6 address on
26 * the interface. This is the inner or payload protocol.
28 * Tunnel MTU: The tunnel MTU (the payload MTU) is configurable per
29 * protocol. If a tunnel MTU is larger than the path MTU, the outer
30 * packet will be fragmented. Fragmentation support is configurable,
31 * as it can have severe performance issues, and might be used as an
32 * attack vector (the remote side must reassemble.)
34 * Traffic class / TOS field can either be configured to a fixed
35 * value, or can be copied from the inner to the outer header.
36 * (For now we have stolen ~0 to indicate copy).
40 * - The Tunnel encapsulation limit described in RFC2473 is not
43 * - ICMP proxying, as in a tunnel head-end receiving ICMP erors on
44 * the outer packet is currently not relayed to the original source
47 * - PMTUD / MTU probing and tunnel keepalives are not yet implemented.
51 option version = "1.2.0";
52 import "vnet/interface_types.api";
53 import "vnet/ip/ip_types.api";
56 * An IP{v4,v6} over IP{v4,v6} tunnel.
60 u32 instance; /* If non-~0, specifies a custom dev instance */
63 vl_api_interface_index_t sw_if_index; /* ignored on create, set in
66 u8 tc_tos; /* If ~0, the TOS/TC value is copied from
67 inner packet, otherwise set to value */
71 * Create an IP{v4,v6} over IP{v4,v6} tunnel.
73 define ipip_add_tunnel
77 vl_api_ipip_tunnel_t tunnel;
80 define ipip_add_tunnel_reply
84 vl_api_interface_index_t sw_if_index;
88 * Delete an IP{v4,v6} over IP{v4,v6} tunnel.
90 autoreply define ipip_del_tunnel
94 vl_api_interface_index_t sw_if_index;
98 * Create an IPv4 over IPv6 automatic tunnel (6RD)
100 define ipip_6rd_add_tunnel
106 vl_api_ip6_prefix_t ip6_prefix;
107 vl_api_ip4_prefix_t ip4_prefix;
108 vl_api_ip4_address_t ip4_src;
110 u8 tc_tos; /* If ~0, the TOS/TC value is copied from
111 inner packet, otherwise set to value */
114 define ipip_6rd_add_tunnel_reply
118 vl_api_interface_index_t sw_if_index;
122 * Delete an IPv4 over IPv6 automatic tunnel (6RD)
124 autoreply define ipip_6rd_del_tunnel
128 vl_api_interface_index_t sw_if_index;
132 * List all IPIP tunnels
134 define ipip_tunnel_dump
138 vl_api_interface_index_t sw_if_index;
141 define ipip_tunnel_details
144 vl_api_ipip_tunnel_t tunnel;