1 /* Hey Emacs use -*- mode: C -*- */
3 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 option version = "2.1.0";
19 import "vnet/interface_types.api";
20 import "vnet/ip/ip_types.api";
21 import "vnet/srv6/sr_types.api";
28 vl_api_ip6_address_t sids[16];
31 typedef srv6_sid_list_with_sl_index
36 vl_api_ip6_address_t sids[16];
39 /** \brief IPv6 SR LocalSID add/del request
40 @param client_index - opaque cookie to identify the sender
41 @param context - sender context, to match reply w/ request
42 @param is_del Boolean of whether its a delete instruction
43 @param localsid_addr IPv6 address of the localsid
44 @param end_psp Boolean of whether decapsulation is allowed in this function
45 @param behavior Type of behavior (function) for this localsid
46 @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
47 fib_table. Default:0xffffffff
48 @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
49 @param fib_table FIB table in which we should install the localsid entry
50 @param nh_addr Next Hop IPv46 address. Only for L2/L3 xconnect.
52 autoreply define sr_localsid_add_del
56 bool is_del [default=false];
57 vl_api_ip6_address_t localsid;
59 vl_api_sr_behavior_t behavior;
60 vl_api_interface_index_t sw_if_index [default=0xffffffff];
63 vl_api_address_t nh_addr;
66 /** \brief IPv6 SR policy add
67 @param client_index - opaque cookie to identify the sender
68 @param context - sender context, to match reply w/ request
69 @param bsid is the bindingSID of the SR Policy
70 @param weight is the weight of the sid list. optional.
71 @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
72 @param is_spray is the type of the SR policy. (0.Default // 1.Spray)
73 @param fib_table is the VRF where to install the FIB entry for the BSID
74 @param sids is a srv6_sid_list object
76 autoreply define sr_policy_add
80 vl_api_ip6_address_t bsid_addr;
85 vl_api_srv6_sid_list_t sids;
88 /** \brief IPv6 SR policy modification
89 @param client_index - opaque cookie to identify the sender
90 @param context - sender context, to match reply w/ request
91 @param bsid is the bindingSID of the SR Policy
92 @param sr_policy_index is the index of the SR policy
93 @param fib_table is the VRF where to install the FIB entry for the BSID
94 @param operation is the operation to perform (among the top ones)
95 @param sl_index is the index of the Segment List to modify/delete
96 @param weight is the weight of the sid list. optional.
97 @param sids is a srv6_sid_list object
99 autoreply define sr_policy_mod
103 vl_api_ip6_address_t bsid_addr;
106 vl_api_sr_policy_op_t operation;
109 vl_api_srv6_sid_list_t sids;
112 enum sr_policy_type : u8
114 SR_API_POLICY_TYPE_DEFAULT = 0,
115 SR_API_POLICY_TYPE_SPRAY = 1,
116 SR_API_POLICY_TYPE_TEF = 2,
119 /** \brief IPv6 SR policy add
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
122 @param bsid is the bindingSID of the SR Policy
123 @param weight is the weight of the sid list. optional.
124 @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
125 @param type is the SR policy param. (0.Default // 1.Spray // 2.Tef)
126 @param fib_table is the VRF where to install the FIB entry for the BSID
127 @param sids is a srv6_sid_list object
128 @param encap_src is a encaps IPv6 source addr. optional.
130 autoreply define sr_policy_add_v2
134 vl_api_ip6_address_t bsid_addr;
137 vl_api_sr_policy_type_t type [default=0x0];
139 vl_api_srv6_sid_list_t sids;
140 vl_api_ip6_address_t encap_src;
141 option status="in_progress";
144 /** \brief IPv6 SR policy modification
145 @param client_index - opaque cookie to identify the sender
146 @param context - sender context, to match reply w/ request
147 @param bsid is the bindingSID of the SR Policy
148 @param sr_policy_index is the index of the SR policy
149 @param fib_table is the VRF where to install the FIB entry for the BSID
150 @param operation is the operation to perform (among the top ones)
151 @param sl_index is the index of the Segment List to modify/delete
152 @param weight is the weight of the sid list. optional.
153 @param sids is a srv6_sid_list object
154 @param encap_src is a encaps IPv6 source addr. optional.
156 autoreply define sr_policy_mod_v2
160 vl_api_ip6_address_t bsid_addr;
163 vl_api_sr_policy_op_t operation;
166 vl_api_srv6_sid_list_t sids;
167 vl_api_ip6_address_t encap_src;
168 option status="in_progress";
171 /** \brief IPv6 SR policy deletion
172 @param client_index - opaque cookie to identify the sender
173 @param context - sender context, to match reply w/ request
174 @param bsid is the bindingSID of the SR Policy
175 @param index is the index of the SR policy
177 autoreply define sr_policy_del
181 vl_api_ip6_address_t bsid_addr;
185 /** \brief IPv6 SR Set SRv6 encapsulation source
186 @param client_index - opaque cookie to identify the sender
187 @param context - sender context, to match reply w/ request
188 @param bsid is the bindingSID of the SR Policy
189 @param index is the index of the SR policy
191 autoreply define sr_set_encap_source
195 vl_api_ip6_address_t encaps_source;
198 /** \brief IPv6 SR Set SRv6 encapsulation hop-limit
199 @param client_index - opaque cookie to identify the sender
200 @param context - sender context, to match reply w/ request
201 @param hop_limit is the hop-limit value to set
203 autoreply define sr_set_encap_hop_limit
210 /** \brief IPv6 SR steering add/del
211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
214 @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
215 @param sr_policy is the index of the SR Policy (alt to bsid)
216 @param table_id is the VRF where to install the FIB entry for the BSID
217 @param prefix is the IPv4/v6 address for L3 traffic type
218 @param mask_width is the mask for L3 traffic type
219 @param sw_if_index is the incoming interface for L2 traffic
220 @param traffic_type describes the type of traffic
222 autoreply define sr_steering_add_del
226 bool is_del [default=false];
227 vl_api_ip6_address_t bsid_addr;
230 vl_api_prefix_t prefix;
231 vl_api_interface_index_t sw_if_index;
232 vl_api_sr_steer_t traffic_type;
235 /** \brief Dump the list of SR LocalSIDs
236 @param client_index - opaque cookie to identify the sender
237 @param context - sender context, to match reply w/ request
239 define sr_localsids_dump
245 define sr_localsids_details
248 vl_api_ip6_address_t addr;
250 vl_api_sr_behavior_t behavior;
253 vl_api_address_t xconnect_nh_addr;
254 u32 xconnect_iface_or_vrf_table;
258 /** \brief Dump the list of SR LocalSIDs along with packet statistics
259 @param client_index - opaque cookie to identify the sender
260 @param context - sender context, to match reply w/ request
262 define sr_localsids_with_packet_stats_dump
266 option status="in_progress";
269 define sr_localsids_with_packet_stats_details
272 vl_api_ip6_address_t addr;
274 vl_api_sr_behavior_t behavior;
277 vl_api_address_t xconnect_nh_addr;
278 u32 xconnect_iface_or_vrf_table;
279 u64 good_traffic_bytes;
280 u64 good_traffic_pkt_count;
281 u64 bad_traffic_bytes;
282 u64 bad_traffic_pkt_count;
283 option status="in_progress";
288 /** \brief Dump the list of SR policies
289 @param client_index - opaque cookie to identify the sender
290 @param context - sender context, to match reply w/ request
292 define sr_policies_dump
301 define sr_policies_details
304 vl_api_ip6_address_t bsid;
309 vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
312 /** \brief Dump the list of SR policies v2
313 @param client_index - opaque cookie to identify the sender
314 @param context - sender context, to match reply w/ request
316 define sr_policies_v2_dump
322 define sr_policies_v2_details
325 vl_api_ip6_address_t bsid;
326 vl_api_ip6_address_t encap_src;
327 vl_api_sr_policy_type_t type;
331 vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
334 /** \brief Dump the list of SR policies along with actual segment list index on VPP
335 @param client_index - opaque cookie to identify the sender
336 @param context - sender context, to match reply w/ request
338 define sr_policies_with_sl_index_dump
342 option status="in_progress";
346 define sr_policies_with_sl_index_details
349 vl_api_ip6_address_t bsid;
354 vl_api_srv6_sid_list_with_sl_index_t sid_lists[num_sid_lists];
355 option status="in_progress";
358 /** \brief Dump the steering policies
359 @param client_index - opaque cookie to identify the sender
360 @param context - sender context, to match reply w/ request
362 define sr_steering_pol_dump
368 define sr_steering_pol_details
371 vl_api_sr_steer_t traffic_type;
373 vl_api_prefix_t prefix;
374 vl_api_interface_index_t sw_if_index;
375 vl_api_ip6_address_t bsid;
379 * fd.io coding-style-patch-verification: OFF
381 * eval: (c-set-style "gnu")