summaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier.api
blob: b5ac8cabd394ef5d7acd6f79d8426b78d13d15a9 (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
/*
 * 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.
*/
option version = "1.1.0";
import "vnet/fib/fib_types.api";

/** \brief BIER Table Identifier
    @param bt_set - The BIER set
    @param bt_sub_domain - the sud-domain
    @param bt_bit_header_length - the number of bits in the 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 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 specified replacing those already
                           present or are they to be combined.
			   is_replace = 1 and n_paths=0 implies delete the
			   route and all paths;
    @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;
  u32 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_path_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 context;
  u16 br_bp;
  vl_api_bier_table_id_t br_tbl_id;
  u32 br_n_paths;
  vl_api_fib_path_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_n_bytes - The number of bytes in the following bit-string.
                        VPP only supports BSL of 1024 and less, so this is
			a u8 field.
    @param bi_bytes - The bit-string represented as a byte array (MSB first)
*/
define bier_imp_add
{
  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 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 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, i.e. the sender's
                    Use 0 for the default (match any source) entry.
    @param bde_tbl_id - The BIER disposition table-id the route is added in
    @param bde_next_hop_sw_if_index - the next hop 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_paths - The outgoing paths for the entry
*/
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_path_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_path_t bde_paths[bde_n_paths];
};

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