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.0.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 /** \brief IPv6 SR LocalSID add/del request
32 @param client_index - opaque cookie to identify the sender
33 @param context - sender context, to match reply w/ request
34 @param is_del Boolean of whether its a delete instruction
35 @param localsid_addr IPv6 address of the localsid
36 @param end_psp Boolean of whether decapsulation is allowed in this function
37 @param behavior Type of behavior (function) for this localsid
38 @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
39 fib_table. Default:0xffffffff
40 @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
41 @param fib_table FIB table in which we should install the localsid entry
42 @param nh_addr Next Hop IPv46 address. Only for L2/L3 xconnect.
44 autoreply define sr_localsid_add_del
48 bool is_del [default=false];
49 vl_api_ip6_address_t localsid;
51 vl_api_sr_behavior_t behavior;
52 vl_api_interface_index_t sw_if_index [default=0xffffffff];
55 vl_api_address_t nh_addr;
58 /** \brief IPv6 SR policy add
59 @param client_index - opaque cookie to identify the sender
60 @param context - sender context, to match reply w/ request
61 @param bsid is the bindingSID of the SR Policy
62 @param weight is the weight of the sid list. optional.
63 @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
64 @param is_spray is the type of the SR policy. (0.Default // 1.Spray)
65 @param fib_table is the VRF where to install the FIB entry for the BSID
66 @param sids is a srv6_sid_list object
68 autoreply define sr_policy_add
72 vl_api_ip6_address_t bsid_addr;
77 vl_api_srv6_sid_list_t sids;
80 /** \brief IPv6 SR policy modification
81 @param client_index - opaque cookie to identify the sender
82 @param context - sender context, to match reply w/ request
83 @param bsid is the bindingSID of the SR Policy
84 @param sr_policy_index is the index of the SR policy
85 @param fib_table is the VRF where to install the FIB entry for the BSID
86 @param operation is the operation to perform (among the top ones)
87 @param sl_index is the index of the Segment List to modify/delete
88 @param weight is the weight of the sid list. optional.
89 @param sids is a srv6_sid_list object
91 autoreply define sr_policy_mod
95 vl_api_ip6_address_t bsid_addr;
98 vl_api_sr_policy_op_t operation;
101 vl_api_srv6_sid_list_t sids;
104 /** \brief IPv6 SR policy deletion
105 @param client_index - opaque cookie to identify the sender
106 @param context - sender context, to match reply w/ request
107 @param bsid is the bindingSID of the SR Policy
108 @param index is the index of the SR policy
110 autoreply define sr_policy_del
114 vl_api_ip6_address_t bsid_addr;
118 /** \brief IPv6 SR Set SRv6 encapsulation source
119 @param client_index - opaque cookie to identify the sender
120 @param context - sender context, to match reply w/ request
121 @param bsid is the bindingSID of the SR Policy
122 @param index is the index of the SR policy
124 autoreply define sr_set_encap_source
128 vl_api_ip6_address_t encaps_source;
131 /** \brief IPv6 SR Set SRv6 encapsulation hop-limit
132 @param client_index - opaque cookie to identify the sender
133 @param context - sender context, to match reply w/ request
134 @param hop_limit is the hop-limit value to set
136 autoreply define sr_set_encap_hop_limit
143 /** \brief IPv6 SR steering add/del
144 @param client_index - opaque cookie to identify the sender
145 @param context - sender context, to match reply w/ request
147 @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
148 @param sr_policy is the index of the SR Policy (alt to bsid)
149 @param table_id is the VRF where to install the FIB entry for the BSID
150 @param prefix is the IPv4/v6 address for L3 traffic type
151 @param mask_width is the mask for L3 traffic type
152 @param sw_if_index is the incoming interface for L2 traffic
153 @param traffic_type describes the type of traffic
155 autoreply define sr_steering_add_del
159 bool is_del [default=false];
160 vl_api_ip6_address_t bsid_addr;
163 vl_api_prefix_t prefix;
164 vl_api_interface_index_t sw_if_index;
165 vl_api_sr_steer_t traffic_type;
168 /** \brief Dump the list of SR LocalSIDs
169 @param client_index - opaque cookie to identify the sender
170 @param context - sender context, to match reply w/ request
172 define sr_localsids_dump
178 define sr_localsids_details
181 vl_api_ip6_address_t addr;
183 vl_api_sr_behavior_t behavior;
186 vl_api_address_t xconnect_nh_addr;
187 u32 xconnect_iface_or_vrf_table;
190 /** \brief Dump the list of SR policies
191 @param client_index - opaque cookie to identify the sender
192 @param context - sender context, to match reply w/ request
194 define sr_policies_dump
200 define sr_policies_details
203 vl_api_ip6_address_t bsid;
208 vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
211 /** \brief Dump the steering policies
212 @param client_index - opaque cookie to identify the sender
213 @param context - sender context, to match reply w/ request
215 define sr_steering_pol_dump
221 define sr_steering_pol_details
224 vl_api_sr_steer_t traffic_type;
226 vl_api_prefix_t prefix;
227 vl_api_interface_index_t sw_if_index;
228 vl_api_ip6_address_t bsid;
232 * fd.io coding-style-patch-verification: OFF
234 * eval: (c-set-style "gnu")