blob: afa8bb5e7c434ffd959da449f37713da344a080e [file] [log] [blame]
Dave Barachaff70772016-10-31 11:59:07 -04001/** \brief Set flags on the interface
2 @param client_index - opaque cookie to identify the sender
3 @param context - sender context, to match reply w/ request
4 @param sw_if_index - index of the interface to set flags on
5 @param admin_up_down - set the admin state, 1 = up, 0 = down
6 @param link_up_down - Oper state sent on change event, not used in config.
7 @param deleted - interface was deleted
8*/
9define sw_interface_set_flags
10{
11 u32 client_index;
12 u32 context;
13 u32 sw_if_index;
14 /* 1 = up, 0 = down */
15 u8 admin_up_down;
16 u8 link_up_down;
17 u8 deleted;
18};
19
20/** \brief Reply to sw_interface_set_flags
21 @param context - sender context which was passed in the request
22 @param retval - return code of the set flags request
23*/
24define sw_interface_set_flags_reply
25{
26 u32 context;
27 i32 retval;
28};
29
Matus Fabiand162f3d2016-12-05 01:05:35 -080030/** \brief Set interface MTU
31 @param client_index - opaque cookie to identify the sender
32 @param context - sender context, to match reply w/ request
33 @param sw_if_index - index of the interface to set MTU on
34 @param mtu - MTU
35*/
36define sw_interface_set_mtu
37{
38 u32 client_index;
39 u32 context;
40 u32 sw_if_index;
41 u16 mtu;
42};
43
44/** \brief Reply to sw_interface_set_mtu
45 @param context - sender context which was passed in the request
46 @param retval - return code of the set flags request
47*/
48define sw_interface_set_mtu_reply
49{
50 u32 context;
51 i32 retval;
52};
53
Dave Barach6d963c22016-12-05 09:50:05 -050054/** \brief Register for interface events
55 @param client_index - opaque cookie to identify the sender
56 @param context - sender context, to match reply w/ request
57 @param enable_disable - 1 => register for events, 0 => cancel registration
58 @param pid - sender's pid
59*/
60define want_interface_events
61{
62 u32 client_index;
63 u32 context;
64 u32 enable_disable;
65 u32 pid;
66};
67
68/** \brief Reply for interface events registration
69 @param context - returned sender context, to match reply w/ request
70 @param retval - return code
71*/
72define want_interface_events_reply
73{
74 u32 context;
75 i32 retval;
76};
77
78/** \brief Interface details structure (fix this)
79 @param sw_if_index - index of the interface
80 @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index
81 @param l2_address_length - length of the interface's l2 address
82 @param pid - the interface's l2 address
83 @param interface_name - name of the interface
84 @param link_duplex - 1 if half duplex, 2 if full duplex
85 @param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G
Pavel Kotucek65e84572017-01-16 17:01:56 +010086 @param link_MTU - max. transmittion unit
Dave Barach6d963c22016-12-05 09:50:05 -050087 @param sub_if_id - A number 0-N to uniquely identify this subif on super if
Pavel Kotucek65e84572017-01-16 17:01:56 +010088 @param sub_dot1ad - 0 = dot1q, 1 = dot1ad
89 @param sub_dot1ah - 1 = dot1ah, 0 = otherwise
Dave Barach6d963c22016-12-05 09:50:05 -050090 @param sub_number_of_tags - Number of tags (0 - 2)
91 @param sub_outer_vlan_id
92 @param sub_inner_vlan_id
93 @param sub_exact_match
94 @param sub_default
95 @param sub_outer_vlan_id_any
96 @param sub_inner_vlan_id_any
97 @param vtr_op - vlan tag rewrite operation
98 @param vtr_push_dot1q
99 @param vtr_tag1
100 @param vtr_tag2
Pavel Kotucek65e84572017-01-16 17:01:56 +0100101 @param pbb_outer_tag - translate pbb s-tag
102 @param pbb_b_dmac[6] - B-tag remote mac address
103 @param pbb_b_smac[6] - B-tag local mac address
104 @param pbb_b_vlanid - B-tag vlanid
105 @param pbb_i_sid - I-tag service id
Dave Barach6d963c22016-12-05 09:50:05 -0500106*/
107define sw_interface_details
108{
109 u32 context;
110 u32 sw_if_index;
111
112 /* index of sup interface (e.g. hw interface).
113 equal to sw_if_index for super hw interface. */
114 u32 sup_sw_if_index;
115
116 /* Layer 2 address, if applicable */
117 u32 l2_address_length;
118 u8 l2_address[8];
119
120 /* Interface name */
121 u8 interface_name[64];
122
123 /* 1 = up, 0 = down */
124 u8 admin_up_down;
125 u8 link_up_down;
126
127 /* 1 = half duplex, 2 = full duplex */
128 u8 link_duplex;
129
130 /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
131 u8 link_speed;
132
133 /* MTU */
134 u16 link_mtu;
135
136 /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
137 u32 sub_id;
138
139 /* 0 = dot1q, 1=dot1ad */
140 u8 sub_dot1ad;
Pavel Kotucek65e84572017-01-16 17:01:56 +0100141 /* 1 = dot1h, 1=otherwise */
142 u8 sub_dot1ah;
Dave Barach6d963c22016-12-05 09:50:05 -0500143
144 /* Number of tags 0-2 */
145 u8 sub_number_of_tags;
146 u16 sub_outer_vlan_id;
147 u16 sub_inner_vlan_id;
148 u8 sub_exact_match;
149 u8 sub_default;
150 u8 sub_outer_vlan_id_any;
151 u8 sub_inner_vlan_id_any;
152
153 /* vlan tag rewrite state */
154 u32 vtr_op;
155 u32 vtr_push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
156 u32 vtr_tag1; // first pushed tag
157 u32 vtr_tag2; // second pushed tag
158 u8 tag[64];
Pavel Kotucek65e84572017-01-16 17:01:56 +0100159
160 /* pbb tag rewrite info */
161 u16 outer_tag;
162 u8 b_dmac[6];
163 u8 b_smac[6];
164 u16 b_vlanid;
165 u32 i_sid;
Dave Barach6d963c22016-12-05 09:50:05 -0500166};
167
168/* works */
169define sw_interface_dump
170{
171 u32 client_index;
172 u32 context;
173 u8 name_filter_valid;
174 u8 name_filter[49];
175};
176
177/** \brief Set or delete one or all ip addresses on a specified interface
178 @param client_index - opaque cookie to identify the sender
179 @param context - sender context, to match reply w/ request
180 @param sw_if_index - index of the interface to add/del addresses
181 @param is_add - add address if non-zero, else delete
182 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
183 @param del_all - if non-zero delete all addresses on the interface
184 @param address_length - address length in bytes, 4 for ip4, 16 for ip6
185 @param address - array of address bytes
186*/
187define sw_interface_add_del_address
188{
189 u32 client_index;
190 u32 context;
191 u32 sw_if_index;
192 u8 is_add;
193 u8 is_ipv6;
194 u8 del_all;
195 u8 address_length;
196 u8 address[16];
197};
198
Juraj Slobodadfc19232016-12-05 13:20:37 +0100199/** \brief Reply to sw_interface_add_del_address
Dave Barach6d963c22016-12-05 09:50:05 -0500200 @param context - returned sender context, to match reply w/ request
201 @param retval - return code
202*/
203define sw_interface_add_del_address_reply
204{
205 u32 context;
206 i32 retval;
207};
208
209/** \brief Associate the specified interface with a fib table
210 @param client_index - opaque cookie to identify the sender
211 @param context - sender context, to match reply w/ request
212 @param sw_if_index - index of the interface
213 @param is_ipv6 - if non-zero ipv6, else ipv4
214 @param vrf_id - fib table/vrd id to associate the interface with
215*/
216define sw_interface_set_table
217{
218 u32 client_index;
219 u32 context;
220 u32 sw_if_index;
221 u8 is_ipv6;
222 u32 vrf_id;
223};
224
Juraj Slobodadfc19232016-12-05 13:20:37 +0100225/** \brief Reply to sw_interface_set_table
Dave Barach6d963c22016-12-05 09:50:05 -0500226 @param context - returned sender context, to match reply w/ request
227 @param retval - return code
228*/
229define sw_interface_set_table_reply
230{
231 u32 context;
232 i32 retval;
233};
234
Juraj Slobodadfc19232016-12-05 13:20:37 +0100235/** \brief Get VRF id assigned to interface
236 @param client_index - opaque cookie to identify the sender
237 @param context - sender context, to match reply w/ request
238 @param sw_if_index - index of the interface
239*/
240define sw_interface_get_table
241{
242 u32 client_index;
243 u32 context;
244 u32 sw_if_index;
245 u8 is_ipv6;
246};
247
248/** \brief Reply to get_sw_interface_vrf
249 @param context - sender context which was passed in the request
250 @param vrf_id - VRF id assigned to the interface
251*/
252define sw_interface_get_table_reply
253{
254 u32 context;
255 i32 retval;
256 u32 vrf_id;
257};
258
Dave Barach6d963c22016-12-05 09:50:05 -0500259/** \brief Stats counters structure
260 @param vnet_counter_type- such as ip4, ip6, punts, etc
261 @param is_combined - rx & tx total (all types) counts
262 @param first_sw_if_index - first sw index in block of index, counts
263 @param count - number of interfaces this stats block includes counters for
264 @param data - contiguous block of vlib_counter_t structures
265*/
266define vnet_interface_counters
267{
268 /* enums - plural - in vnet/interface.h */
269 u8 vnet_counter_type;
270 u8 is_combined;
271 u32 first_sw_if_index;
272 u32 count;
273 u8 data[count];
274};
275
276/** \brief Set unnumbered interface add / del request
277 @param client_index - opaque cookie to identify the sender
278 @param context - sender context, to match reply w/ request
279 @param sw_if_index - interface with an IP address
280 @param unnumbered_sw_if_index - interface which will use the address
281 @param is_add - if non-zero set the association, else unset it
282*/
283define sw_interface_set_unnumbered
284{
285 u32 client_index;
286 u32 context;
287 u32 sw_if_index; /* use this intfc address */
288 u32 unnumbered_sw_if_index; /* on this interface */
289 u8 is_add;
290};
291
292/** \brief Set unnumbered interface add / del response
293 @param context - sender context, to match reply w/ request
294 @param retval - return code for the request
295*/
296define sw_interface_set_unnumbered_reply
297{
298 u32 context;
299 i32 retval;
300};
301
302/** \brief Clear interface statistics
303 @param client_index - opaque cookie to identify the sender
304 @param context - sender context, to match reply w/ request
305 @param sw_if_index - index of the interface to clear statistics
306*/
307define sw_interface_clear_stats
308{
309 u32 client_index;
310 u32 context;
311 u32 sw_if_index;
312};
313
314/** \brief Reply to sw_interface_clear_stats
315 @param context - sender context which was passed in the request
316 @param retval - return code of the set flags request
317*/
318define sw_interface_clear_stats_reply
319{
320 u32 context;
321 i32 retval;
322};
323
324/** \brief Set / clear software interface tag
325 @param client_index - opaque cookie to identify the sender
326 @param context - sender context, to match reply w/ request
327 @param sw_if_index - the interface
328 @param add_del - 1 = add, 0 = delete
329 @param tag - an ascii tag
330*/
331define sw_interface_tag_add_del
332{
333 u32 client_index;
334 u32 context;
335 u8 is_add;
336 u32 sw_if_index;
337 u8 tag[64];
338};
339
340/** \brief Reply to set / clear software interface tag
341 @param context - sender context which was passed in the request
342 @param retval - return code for the request
343*/
344define sw_interface_tag_add_del_reply
345{
346 u32 context;
347 i32 retval;
348};
349/*
350 * Local Variables:
351 * eval: (c-set-style "gnu")
352 * End:
353 */
354