FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
mpls.api
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016 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 option version = "1.1.0";
17 import "vnet/fib/fib_types.api";
18 
19 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
20  a per-prefix label entry.
21  @param client_index - opaque cookie to identify the sender
22  @param context - sender context, to match reply w/ request
23  @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
24  @param mb_label - The MPLS label value to bind
25  @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
26  @param mb_is_bind - Bind or unbind
27  @param mb_is_ip4 - The prefix to bind to is IPv4
28  @param mb_address_length - Length of IP prefix
29  @param mb_address[16] - IP prefix/
30 */
31 autoreply define mpls_ip_bind_unbind
32 {
41  u8 mb_address[16];
42 };
43 
44 define mpls_tunnel_add_del
45 {
55  u8 mt_next_hop[16];
60  vl_api_fib_mpls_label_t mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
61 };
62 
63 /** \brief Reply for MPLS tunnel add / del request
64  @param context - returned sender context, to match reply w/ request
65  @param retval - return code
66  @param sw_if_index - SW interface index of the tunnel created
67 */
68 define mpls_tunnel_add_del_reply
69 {
73 };
74 
75 /** \brief Dump mpls eth tunnel table
76  @param client_index - opaque cookie to identify the sender
77  @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
78 */
79 define mpls_tunnel_dump
80 {
84 };
85 
86 /** \brief mpls tunnel details
87 */
88 manual_endian manual_print define mpls_tunnel_details
89 {
96  vl_api_fib_path_t mt_paths[mt_count];
97 };
98 
99 /** \brief MPLS Route Add / del route
100  @param client_index - opaque cookie to identify the sender
101  @param context - sender context, to match reply w/ request
102  @param mt_table_id - The MPLS table-id the route is added in
103  @param mt_is_add - Is this a route add or delete
104  @param mt_name - A client provided name/tag for the table. If this
105  is not set by the client, then VPP will generate
106  something meaningfull.
107 */
108 autoreply define mpls_table_add_del
109 {
114  u8 mt_name[64];
115 };
116 
117 /** \brief MPLS Route Add / del route
118  @param client_index - opaque cookie to identify the sender
119  @param context - sender context, to match reply w/ request
120  @param mr_label - The MPLS label value
121  @param mr_eos - The End of stack bit
122  @param mr_table_id - The MPLS table-id the route is added in
123  @param mr_classify_table_index - If this is a classify route,
124  this is the classify table index
125  create them
126  @param mr_is_add - Is this a route add or delete
127  @param mr_is_classify - Is this route result a classify
128  @param mr_is_multicast - Is this a multicast route
129  @param mr_is_multipath - Is this route update a multipath - i.e. is this
130  a path addition to an existing route
131  @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
132  @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
133  @param mr_is_interface_rx - Interface Receive path
134  @param mr_is_interface_rx - RPF-ID Receive path. The next-hop interface
135  is used as the RPF-ID
136  @param mr_next_hop_proto - The next-hop protocol, of type dpo_proto_t
137  @param mr_next_hop_weight - The weight, for UCMP
138  @param mr_next_hop[16] - the nextop address
139  @param mr_next_hop_sw_if_index - the next-hop SW interface
140  @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
141  @param mr_next_hop_n_out_labels - the number of labels in the label stack
142  @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
143  @param next_hop_via_label - The next-hop is a resolved via a local label
144 */
145 autoreply define mpls_route_add_del
146 {
164  u8 mr_next_hop[16];
169  vl_api_fib_mpls_label_t mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
170 };
171 
172 /** \brief Dump MPLS fib table
173  @param client_index - opaque cookie to identify the sender
174 */
175 define mpls_fib_dump
176 {
179 };
180 
181 /** \brief mpls FIB table response
182  @param table_id - MPLS fib table id
183  @param s_bit - End-of-stack bit
184  @param label - MPLS label value
185  @param count - the number of fib_path in path
186  @param path - array of of fib_path structures
187 */
188 manual_endian manual_print define mpls_fib_details
189 {
192  u8 table_name[64];
197 };
198 
199 /** \brief Enable or Disable MPLS on and interface
200  @param client_index - opaque cookie to identify the sender
201  @param context - sender context, to match reply w/ request
202  @param sw_if_index - index of the interface
203  @param enable - if non-zero enable, else disable
204 */
205 autoreply define sw_interface_set_mpls_enable
206 {
211 };
212 
213 /*
214  * Local Variables:
215  * eval: (c-set-style "gnu")
216  * End:
217  */
218 
unsigned char u8
Definition: types.h:56
unsigned int u32
Definition: types.h:88
option version
Definition: mpls.api:16
signed int i32
Definition: types.h:81
FIB path.
Definition: fib_types.api:47
size_t count
Definition: vapi.c:46