FD.io VPP  v17.10-9-gd594711
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 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
17  a per-prefix label entry.
18  @param client_index - opaque cookie to identify the sender
19  @param context - sender context, to match reply w/ request
20  @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
21  @param mb_label - The MPLS label value to bind
22  @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
23  @param mb_create_table_if_needed - Create either/both tables if required.
24  @param mb_is_bind - Bind or unbind
25  @param mb_is_ip4 - The prefix to bind to is IPv4
26  @param mb_address_length - Length of IP prefix
27  @param mb_address[16] - IP prefix/
28 */
29 autoreply define mpls_ip_bind_unbind
30 {
40  u8 mb_address[16];
41 };
42 
43 /** \brief MPLS tunnel Add / del route
44  @param client_index - opaque cookie to identify the sender
45  @param context - sender context, to match reply w/ request
46  @param mt_is_add - Is this a route add or delete
47  @param mt_sw_if_index - The SW interface index of the tunnel to delete
48  @param mt_is_multicast - Is the tunnel's underlying LSP multicast
49  @param mt_next_hop_proto_is_ip4 - The next-hop is IPV4
50  @param mt_next_hop_weight - The weight, for UCMP
51  @param mt_next_hop_preference - The preference
52  @param mt_next_hop[16] - the nextop address
53  @param mt_next_hop_sw_if_index - the next-hop SW interface
54  @param mt_next_hop_table_id - the next-hop table-id (if appropriate)
55  @param mt_next_hop_n_out_labels - the number of next-hop output labels
56  @param mt_next_hop_out_label_stack - the next-hop output label stack, outer most first
57 */
58 define mpls_tunnel_add_del
59 {
69  u8 mt_next_hop[16];
73  u32 mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
74 };
75 
76 /** \brief Reply for MPLS tunnel add / del request
77  @param context - returned sender context, to match reply w/ request
78  @param retval - return code
79  @param sw_if_index - SW interface index of the tunnel created
80 */
81 define mpls_tunnel_add_del_reply
82 {
86 };
87 
88 /** \brief Dump mpls eth tunnel table
89  @param client_index - opaque cookie to identify the sender
90  @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
91 */
92 define mpls_tunnel_dump
93 {
97 };
98 
99 /** \brief FIB path
100  @param sw_if_index - index of the interface
101  @param weight - The weight, for UCMP
102  @param is_local - local if non-zero, else remote
103  @param is_drop - Drop the packet
104  @param is_unreach - Drop the packet and rate limit send ICMP unreachable
105  @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
106  @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
107  @param next_hop[16] - the next hop address
108 
109  WARNING: this type is replicated, pending cleanup completion
110 
111 */
112 typeonly manual_print manual_endian define fib_path2
113 {
122  u8 next_hop[16];
123  u32 labels[16];
124 };
125 
126 /** \brief mpls tunnel details
127 */
128 manual_endian manual_print define mpls_tunnel_details
129 {
136  vl_api_fib_path2_t mt_paths[mt_count];
137 };
138 
139 /** \brief MPLS Route Add / del route
140  @param client_index - opaque cookie to identify the sender
141  @param context - sender context, to match reply w/ request
142  @param mt_table_id - The MPLS table-id the route is added in
143  @param mt_is_add - Is this a route add or delete
144  @param mt_name - A client provided name/tag for the table. If this
145  is not set by the client, then VPP will generate
146  something meaningfull.
147 */
148 autoreply define mpls_table_add_del
149 {
154  u8 mt_name[64];
155 };
156 
157 /** \brief MPLS Route Add / del route
158  @param client_index - opaque cookie to identify the sender
159  @param context - sender context, to match reply w/ request
160  @param mr_label - The MPLS label value
161  @param mr_eos - The End of stack bit
162  @param mr_table_id - The MPLS table-id the route is added in
163  @param mr_classify_table_index - If this is a classify route,
164  this is the classify table index
165  @param mr_create_table_if_needed - If the MPLS or IP tables do not exist,
166  create them
167  @param mr_is_add - Is this a route add or delete
168  @param mr_is_classify - Is this route result a classify
169  @param mr_is_multicast - Is this a multicast route
170  @param mr_is_multipath - Is this route update a multipath - i.e. is this
171  a path addition to an existing route
172  @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
173  @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
174  @param mr_is_interface_rx - Interface Receive path
175  @param mr_is_interface_rx - RPF-ID Receive path. The next-hop interface
176  is used as the RPF-ID
177  @param mr_next_hop_proto - The next-hop protocol, of type dpo_proto_t
178  @param mr_next_hop_weight - The weight, for UCMP
179  @param mr_next_hop[16] - the nextop address
180  @param mr_next_hop_sw_if_index - the next-hop SW interface
181  @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
182  @param mr_next_hop_n_out_labels - the number of labels in the label stack
183  @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
184  @param next_hop_via_label - The next-hop is a resolved via a local label
185 */
186 autoreply define mpls_route_add_del
187 {
206  u8 mr_next_hop[16];
211  u32 mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
212 };
213 
214 /** \brief Dump MPLS fib table
215  @param client_index - opaque cookie to identify the sender
216 */
217 define mpls_fib_dump
218 {
221 };
222 
223 /** \brief mpls FIB table response
224  @param table_id - MPLS fib table id
225  @param s_bit - End-of-stack bit
226  @param label - MPLS label value
227  @param count - the number of fib_path in path
228  @param path - array of of fib_path structures
229 */
230 manual_endian manual_print define mpls_fib_details
231 {
234  u8 table_name[64];
239 };
240 
241 /*
242  * Local Variables:
243  * eval: (c-set-style "gnu")
244  * End:
245  */
246 
int i32
Definition: types.h:81
unsigned int u32
Definition: types.h:88
size_t count
Definition: vapi.c:40
unsigned char u8
Definition: types.h:56
FIB path.
Definition: mpls.api:112