aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier.api
blob: e4edfa1768a0faf4dff9a8a05d973ac75a4a9f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** \file

    This file defines vpp BIER control-plane API messages which are generally
    called through a shared memory interface.
*/
vl_api_version 1.0.0

/** \brief BIER Table Indentifier
    @param bt_set
    @param bt_sub_domain
    @param bt_bit_header_length
*/
typeonly define bier_table_id
{
  u8 bt_set;
  u8 bt_sub_domain;
  u8 bt_hdr_len_id;
};

/** \brief BIER Table Add / del route
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bt_tbl_id - The BIER table-id the route is added in
    @param bt_label - The MPLS label for the table (0 or all ones means not set)
                      If the label is not set, then it is assumed that non-MPLS
		      encoding is used.
    @param bt_is_add - Is this a route add or delete
*/
autoreply define bier_table_add_del
{
  u32 client_index;
  u32 context;
  vl_api_bier_table_id_t bt_tbl_id;
  u32 bt_label;
  u8 bt_is_add;
};

define bier_table_dump
{
  u32 client_index;
  u32 context;
};

define bier_table_details
{
  u32 context;
  u32 bt_label;
  vl_api_bier_table_id_t bt_tbl_id;
};

/** \brief FIB path
    @param sw_if_index - index of the interface
    @param weight - The weight, for UCMP
    @param preference - The preference of the path. lowest preference is prefered
    @param is_local - local if non-zero, else remote
    @param is_drop - Drop the packet
    @param is_udp_encap - The path describes a UDP-o-IP encapsulation.
    @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
    @param next_hop[16] - the next hop address
    @param next_hop_id - Used when the path resolves via an object that has a unique
                         identifier. e.g. the UDP encap object

    WARNING: this type is replicated, pending cleanup completion
*/
typeonly define fib_path3
{
  u32 sw_if_index;
  u32 table_id;
  u8 weight;
  u8 preference;
  u8 is_local;
  u8 is_drop;
  u8 is_udp_encap;
  u8 afi;
  u8 next_hop[16];
  u32 next_hop_id;
  u32 rpf_id;
  u8 n_labels;
  u32 label_stack[16];
};

/** \brief BIER Route Add / del route
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param br_bp - The Bit-position value
    @param br_tbl_id - The BIER table-id the route is added in
    @param br_is_add - Is this a route add or delete
    @param br_is_replace - Are the paths specfied replacing those already
                           present or are they to be combined.
    @param br_n_paths - The number of paths
    @param br_paths - The array of paths
*/
autoreply define bier_route_add_del
{
  u32 client_index;
  u32 context;
  u16 br_bp;
  u8 br_is_add;
  u8 br_is_replace;
  vl_api_bier_table_id_t br_tbl_id;
  u8 br_n_paths;
  vl_api_fib_path3_t br_paths[br_n_paths];
};

define bier_route_dump
{
  u32 client_index;
  u32 context;
  vl_api_bier_table_id_t br_tbl_id;
};

define bier_route_details
{
  u32 client_index;
  u32 context;
  u16 br_bp;
  vl_api_bier_table_id_t br_tbl_id;
  u32 br_n_paths;
  vl_api_fib_path3_t br_paths[br_n_paths];
};

/** \brief BIER Imposition Add
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bi_tbl_id - The BIER table-id used to forward post encap
    @param bi_src - The source Bit-position in the encap.
    @param bi_is_add - Is this a route add or delete
    @param bi_n_bytes - The number of bytes in the following bit-string
    @param bi_bytes - The bit-string represented as a byte array
*/
define bier_imp_add
{
  u32 client_index;
  u32 context;
  vl_api_bier_table_id_t bi_tbl_id;
  u16 bi_src;
  u8 bi_is_add;
  u8 bi_n_bytes;
  u8 bi_bytes[bi_n_bytes];
};

/** \brief Reply for BIER route add / del request
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param bi_index - The index of the created imposition object.
*/
define bier_imp_add_reply
{
  u32 context;
  i32 retval;
  u32 bi_index;
};

/** \brief BIER Imposition Del
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bi_index - The index of the imposition object (as returned
		      from the ADD)
*/
autoreply define bier_imp_del
{
  u32 client_index;
  u32 context;
  u32 bi_index;
};

define bier_imp_dump
{
  u32 client_index;
  u32 context;
};

define bier_imp_details
{
  u32 client_index;
  u32 context;
  vl_api_bier_table_id_t bi_tbl_id;
  u16 bi_src;
  u8 bi_n_bytes;
  u8 bi_bytes[bi_n_bytes];
};

/** \brief BIER Disposition Table Add / del route
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bt_tbl_id - The BIER Disposition table-id.
*/
autoreply define bier_disp_table_add_del
{
  u32 client_index;
  u32 context;
  u32 bdt_tbl_id;
  u8 bdt_is_add;
};

define bier_disp_table_dump
{
  u32 client_index;
  u32 context;
};

define bier_disp_table_details
{
  u32 context;
  u32 bdt_tbl_id;
};

/** \brief BIER Disposition Entry Add / del
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bde_bp - The Bit-position value for the entry
    @param bde_tbl_id - The BIER dispositiontable-id the route is added in
    @param bde_next_hop_sw_if_index - the nextop interface
    @param bde_is_add - Is this a route add or delete
    @param bde_payload_proto - The payload protocol for which the next-hop
			       is added
    @param bde_next_hop_table_id - The table ID for the next-hop
    @param bde_next_hop_proto_is_ip4 - The next-hop is IPV4
    @param bde_next_hop[16] - the nextop address.
                              Set this to all 0s for dispostion.
*/
autoreply define bier_disp_entry_add_del
{
  u32 client_index;
  u32 context;
  u16 bde_bp;
  u32 bde_tbl_id;
  u8 bde_is_add;
  u8 bde_payload_proto;
  u8 bde_n_paths;
  vl_api_fib_path3_t bde_paths[bde_n_paths];
};

define bier_disp_entry_dump
{
  u32 client_index;
  u32 context;
  u32 bde_tbl_id;
};

define bier_disp_entry_details
{
  u32 context;
  u16 bde_bp;
  u32 bde_tbl_id;
  u8 bde_is_add;
  u8 bde_payload_proto;
  u8 bde_n_paths;
  vl_api_fib_path3_t bde_paths[bde_n_paths];
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */