blob: 466524cc6a3a142797fb8cd4499d51c601c0858a [file] [log] [blame]
Neale Rannsd792d9c2017-10-21 10:53:20 -07001/*
2 * Copyright (c) 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/** \file
17
18 This file defines vpp BIER control-plane API messages which are generally
19 called through a shared memory interface.
20*/
21vl_api_version 1.0.0
22
23/** \brief BIER Table Indentifier
24 @param bt_set
25 @param bt_sub_domain
26 @param bt_bit_header_length
27*/
28typeonly define bier_table_id
29{
30 u8 bt_set;
31 u8 bt_sub_domain;
32 u8 bt_hdr_len_id;
33};
34
35/** \brief BIER Table Add / del route
36 @param client_index - opaque cookie to identify the sender
37 @param context - sender context, to match reply w/ request
38 @param bt_tbl_id - The BIER table-id the route is added in
39 @param bt_mpls_label - The MPLS label for the table
40 @param bt_is_add - Is this a route add or delete
41*/
42autoreply define bier_table_add_del
43{
44 u32 client_index;
45 u32 context;
46 vl_api_bier_table_id_t bt_tbl_id;
47 u32 bt_label;
48 u8 bt_is_add;
49};
50
51define bier_table_dump
52{
53 u32 client_index;
54 u32 context;
55};
56
57define bier_table_details
58{
59 u32 context;
60 u32 bt_label;
61 vl_api_bier_table_id_t bt_tbl_id;
62};
63
64/** \brief FIB path
65 @param sw_if_index - index of the interface
66 @param weight - The weight, for UCMP
67 @param preference - The preference of the path. lowest preference is prefered
68 @param is_local - local if non-zero, else remote
69 @param is_drop - Drop the packet
70 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
71 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
72 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
73 @param next_hop[16] - the next hop address
74
75 WARNING: this type is replicated, pending cleanup completion
76*/
77typeonly define fib_path3
78{
79 u32 sw_if_index;
80 u32 table_id;
81 u8 weight;
82 u8 preference;
83 u8 is_local;
84 u8 is_drop;
85 u8 is_unreach;
86 u8 is_prohibit;
87 u8 afi;
88 u8 next_hop[16];
89 u32 rpf_id;
90 u8 n_labels;
91 u32 label_stack[16];
92};
93
94/** \brief BIER Route Add / del route
95 @param client_index - opaque cookie to identify the sender
96 @param context - sender context, to match reply w/ request
97 @param br_bp - The Bit-position value
98 @param br_tbl_id - The BIER table-id the route is added in
99 @param br_is_add - Is this a route add or delete
100 @param br_is_replace - Are the paths specfied replacing those already
101 present or are they to be combined.
102 @param br_n_paths - The number of paths
103 @param br_paths - The array of paths
104*/
105autoreply define bier_route_add_del
106{
107 u32 client_index;
108 u32 context;
109 u16 br_bp;
110 u8 br_is_add;
111 u8 br_is_replace;
112 vl_api_bier_table_id_t br_tbl_id;
113 u8 br_n_paths;
114 vl_api_fib_path3_t br_paths[br_n_paths];
115};
116
117define bier_route_dump
118{
119 u32 client_index;
120 u32 context;
121 vl_api_bier_table_id_t br_tbl_id;
122};
123
124define bier_route_details
125{
126 u32 client_index;
127 u32 context;
128 u16 br_bp;
129 vl_api_bier_table_id_t br_tbl_id;
130 u32 br_n_paths;
131 vl_api_fib_path3_t br_paths[br_n_paths];
132};
133
134/** \brief BIER Imposition Add
135 @param client_index - opaque cookie to identify the sender
136 @param context - sender context, to match reply w/ request
137 @param bi_tbl_id - The BIER table-id used to forward post encap
138 @param bi_src - The source Bit-position in the encap.
139 @param bi_is_add - Is this a route add or delete
140 @param bi_n_bytes - The number of bytes in the following bit-string
141 @param bi_bytes - The bit-string represented as a byte array
142*/
143define bier_imp_add
144{
145 u32 client_index;
146 u32 context;
147 vl_api_bier_table_id_t bi_tbl_id;
148 u16 bi_src;
149 u8 bi_is_add;
150 u8 bi_n_bytes;
151 u8 bi_bytes[bi_n_bytes];
152};
153
154/** \brief Reply for BIER route add / del request
155 @param context - returned sender context, to match reply w/ request
156 @param retval - return code
157 @param bi_index - The index of the created imposition object.
158*/
159define bier_imp_add_reply
160{
161 u32 context;
162 i32 retval;
163 u32 bi_index;
164};
165
166/** \brief BIER Imposition Del
167 @param client_index - opaque cookie to identify the sender
168 @param context - sender context, to match reply w/ request
169 @param bi_index - The index of the imposition object (as returned
170 from the ADD)
171*/
172autoreply define bier_imp_del
173{
174 u32 client_index;
175 u32 context;
176 u32 bi_index;
177};
178
179define bier_imp_dump
180{
181 u32 client_index;
182 u32 context;
183};
184
185define bier_imp_details
186{
187 u32 client_index;
188 u32 context;
189 vl_api_bier_table_id_t bi_tbl_id;
190 u16 bi_src;
191 u8 bi_n_bytes;
192 u8 bi_bytes[bi_n_bytes];
193};
194
195/** \brief BIER Disposition Table Add / del route
196 @param client_index - opaque cookie to identify the sender
197 @param context - sender context, to match reply w/ request
198 @param bt_tbl_id - The BIER Disposition table-id.
199*/
200autoreply define bier_disp_table_add_del
201{
202 u32 client_index;
203 u32 context;
204 u32 bdt_tbl_id;
205 u8 bdt_is_add;
206};
207
208define bier_disp_table_dump
209{
210 u32 client_index;
211 u32 context;
212};
213
214define bier_disp_table_details
215{
216 u32 context;
217 u32 bdt_tbl_id;
218};
219
220/** \brief BIER Disposition Entry Add / del
221 @param client_index - opaque cookie to identify the sender
222 @param context - sender context, to match reply w/ request
223 @param bde_bp - The Bit-position value for the entry
224 @param bde_tbl_id - The BIER dispositiontable-id the route is added in
225 @param bde_next_hop_sw_if_index - the nextop interface
226 @param bde_is_add - Is this a route add or delete
227 @param bde_payload_proto - The payload protocol for which the next-hop
228 is added
229 @param bde_next_hop_table_id - The table ID for the next-hop
230 @param bde_next_hop_proto_is_ip4 - The next-hop is IPV4
231 @param bde_next_hop[16] - the nextop address.
232 Set this to all 0s for dispostion.
233*/
234autoreply define bier_disp_entry_add_del
235{
236 u32 client_index;
237 u32 context;
238 u16 bde_bp;
239 u32 bde_tbl_id;
240 u8 bde_is_add;
241 u8 bde_payload_proto;
242 u8 bde_n_paths;
243 vl_api_fib_path3_t bde_paths[bde_n_paths];
244};
245
246define bier_disp_entry_dump
247{
248 u32 client_index;
249 u32 context;
250 u32 bde_tbl_id;
251};
252
253define bier_disp_entry_details
254{
255 u32 context;
256 u16 bde_bp;
257 u32 bde_tbl_id;
258 u8 bde_is_add;
259 u8 bde_payload_proto;
260 u8 bde_n_paths;
261 vl_api_fib_path3_t bde_paths[bde_n_paths];
262};
263
264/*
265 * Local Variables:
266 * eval: (c-set-style "gnu")
267 * End:
268 */