FD.io VPP  v20.05-21-gb1500e9ff
Vector Packet Processing
sr.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
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:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 option version = "2.0.0";
18 
19 import "vnet/interface_types.api";
20 import "vnet/ip/ip_types.api";
21 import "vnet/srv6/sr_types.api";
22 
23 
24 typedef srv6_sid_list
25 {
26  u8 num_sids;
28  vl_api_ip6_address_t sids[16];
29 };
30 
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.
43 */
44 autoreply define sr_localsid_add_del
45 {
48  bool is_del [default=false];
49  vl_api_ip6_address_t localsid;
50  bool end_psp;
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;
56 };
57 
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
67 */
68 autoreply define sr_policy_add
69 {
72  vl_api_ip6_address_t bsid_addr;
74  bool is_encap;
75  bool is_spray;
77  vl_api_srv6_sid_list_t sids;
78 };
79 
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
90 */
91 autoreply define sr_policy_mod
92 {
95  vl_api_ip6_address_t bsid_addr;
98  vl_api_sr_policy_op_t operation;
101  vl_api_srv6_sid_list_t sids;
102 };
103 
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
109 */
110 autoreply define sr_policy_del
111 {
114  vl_api_ip6_address_t bsid_addr;
116 };
117 
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
123 */
124 autoreply define sr_set_encap_source
125 {
128  vl_api_ip6_address_t encaps_source;
129 };
130 
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
135 */
136 autoreply define sr_set_encap_hop_limit
137 {
141 };
142 
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
146  @param is_del
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
154 */
155 autoreply define sr_steering_add_del
156 {
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;
166 };
167 
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
171 */
172 define sr_localsids_dump
173 {
176 };
177 
178 define sr_localsids_details
179 {
181  vl_api_ip6_address_t addr;
182  bool end_psp;
183  vl_api_sr_behavior_t behavior;
186  vl_api_address_t xconnect_nh_addr;
188 };
189 
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
193 */
194 define sr_policies_dump
195 {
198 };
199 
200 define sr_policies_details
201 {
203  vl_api_ip6_address_t bsid;
204  bool is_spray;
205  bool is_encap;
208  vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
209 };
210 
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
214 */
215 define sr_steering_pol_dump
216 {
219 };
220 
221 define sr_steering_pol_details
222 {
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;
229 };
230 
231 /*
232  * fd.io coding-style-patch-verification: OFF
233  * Local Variables:
234  * eval: (c-set-style "gnu")
235  * End:
236  */
vl_api_ip6_address_t sids[16]
Definition: sr.api:28
option version
Definition: sr.api:17
vl_api_ip6_address_t addr
Definition: sr.api:181
vl_api_sr_steer_t traffic_type
Definition: sr.api:165
vl_api_ip6_address_t bsid
Definition: sr.api:203
vl_api_interface_index_t sw_if_index
Definition: sr.api:227
vl_api_prefix_t prefix
Definition: sr.api:163
vl_api_address_t nh_addr
Definition: sr.api:55
vl_api_address_t xconnect_nh_addr
Definition: sr.api:186
vl_api_sr_behavior_t behavior
Definition: sr.api:183
unsigned char u8
Definition: types.h:56
vl_api_srv6_sid_list_t sids
Definition: sr.api:101
vl_api_interface_index_t sw_if_index
Definition: gre.api:53
vl_api_srv6_sid_list_t sids
Definition: sr.api:77
vl_api_sr_policy_op_t operation
Definition: sr.api:98
vl_api_sr_behavior_t behavior
Definition: sr.api:51
u32 weight
Definition: sr.api:27
unsigned int u32
Definition: types.h:88
vl_api_interface_index_t sw_if_index
Definition: sr.api:164
vl_api_ip6_address_t bsid
Definition: sr.api:228
vl_api_sr_steer_t traffic_type
Definition: sr.api:224
vl_api_ip6_address_t bsid_addr
Definition: sr.api:160
int sr_policy_del(ip6_address_t *bsid, u32 index)
Delete a SR policy.
typedef srv6_sid_list
Definition: sr.api:25
vl_api_ip6_address_t localsid
Definition: sr.api:49
int sr_policy_add(ip6_address_t *bsid, ip6_address_t *segments, u32 weight, u8 behavior, u32 fib_table, u8 is_encap, u16 plugin, void *plugin_mem)
Create a new SR policy.
vl_api_ip6_address_t bsid_addr
Definition: sr.api:95
vl_api_ip6_address_t bsid_addr
Definition: sr.api:114
vl_api_ip6_address_t encaps_source
Definition: sr.api:128
vl_api_prefix_t prefix
Definition: sr.api:226
vl_api_ip6_address_t bsid_addr
Definition: sr.api:72
int sr_policy_mod(ip6_address_t *bsid, u32 index, u32 fib_table, u8 operation, ip6_address_t *segments, u32 sl_index, u32 weight)
Modify an existing SR policy.