FD.io VPP  v20.01-48-g3e0dafb74
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 = "1.2.0";
18 
19 /** \brief SRv6 SID
20 */
21 typedef srv6_sid
22 {
23  u8 addr[16];
24 };
25 
26 typedef srv6_sid_list
27 {
28  u8 num_sids;
30  vl_api_srv6_sid_t sids[16];
31 };
32 
33 /** \brief IPv6 SR LocalSID add/del request
34  @param client_index - opaque cookie to identify the sender
35  @param context - sender context, to match reply w/ request
36  @param is_del Boolean of whether its a delete instruction
37  @param localsid_addr IPv6 address of the localsid
38  @param end_psp Boolean of whether decapsulation is allowed in this function
39  @param behavior Type of behavior (function) for this localsid
40  @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
41  fib_table.
42  @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
43  @param fib_table FIB table in which we should install the localsid entry
44  @param nh_addr6 Next Hop IPv6 address. Only for L2/L3 xconnect.
45  @param nh_addr4 Next Hop IPv4 address. Only for L2/L3 xconnect.
46 */
47 autoreply define sr_localsid_add_del
48 {
52  vl_api_srv6_sid_t localsid;
58  u8 nh_addr6[16];
59  u8 nh_addr4[4];
60 };
61 
62 typedef sr_ip6_address
63 {
64  u8 data[16];
65 };
66 
67 /** \brief IPv6 SR policy add
68  @param client_index - opaque cookie to identify the sender
69  @param context - sender context, to match reply w/ request
70  @param bsid is the bindingSID of the SR Policy
71  @param weight is the weight of the sid list. optional.
72  @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
73  @param type is the type of the SR policy. (0.Default // 1.Spray)
74  @param fib_table is the VRF where to install the FIB entry for the BSID
75  @param sids is a srv6_sid_list object
76 */
77 autoreply define sr_policy_add
78 {
81  u8 bsid_addr[16];
86  vl_api_srv6_sid_list_t sids;
87 };
88 
89 /** \brief IPv6 SR policy modification
90  @param client_index - opaque cookie to identify the sender
91  @param context - sender context, to match reply w/ request
92  @param bsid is the bindingSID of the SR Policy
93  @param sr_policy_index is the index of the SR policy
94  @param fib_table is the VRF where to install the FIB entry for the BSID
95  @param operation is the operation to perform (among the top ones)
96  @param sl_index is the index of the Segment List to modify/delete
97  @param weight is the weight of the sid list. optional.
98  @param sids is a srv6_sid_list object
99 */
100 autoreply define sr_policy_mod
101 {
104  u8 bsid_addr[16];
110  vl_api_srv6_sid_list_t sids;
111 };
112 
113 /** \brief IPv6 SR policy deletion
114  @param client_index - opaque cookie to identify the sender
115  @param context - sender context, to match reply w/ request
116  @param bsid is the bindingSID of the SR Policy
117  @param index is the index of the SR policy
118 */
119 autoreply define sr_policy_del
120 {
123  vl_api_srv6_sid_t bsid_addr;
125 };
126 
127 /** \brief IPv6 SR Set SRv6 encapsulation source
128  @param client_index - opaque cookie to identify the sender
129  @param context - sender context, to match reply w/ request
130  @param bsid is the bindingSID of the SR Policy
131  @param index is the index of the SR policy
132 */
133 autoreply define sr_set_encap_source
134 {
137  u8 encaps_source[16];
138 };
139 
140 /** \brief IPv6 SR Set SRv6 encapsulation hop-limit
141  @param client_index - opaque cookie to identify the sender
142  @param context - sender context, to match reply w/ request
143  @param hop_limit is the hop-limit value to set
144 */
145 autoreply define sr_set_encap_hop_limit
146 {
150 };
151 
152 /** \brief IPv6 SR steering add/del
153  @param client_index - opaque cookie to identify the sender
154  @param context - sender context, to match reply w/ request
155  @param is_del
156  @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
157  @param sr_policy is the index of the SR Policy (alt to bsid)
158  @param table_id is the VRF where to install the FIB entry for the BSID
159  @param prefix is the IPv4/v6 address for L3 traffic type
160  @param mask_width is the mask for L3 traffic type
161  @param sw_if_index is the incoming interface for L2 traffic
162  @param traffic_type describes the type of traffic
163 */
164 autoreply define sr_steering_add_del
165 {
169  u8 bsid_addr[16];
172  u8 prefix_addr[16];
176 };
177 
178 /** \brief Dump the list of SR LocalSIDs
179  @param client_index - opaque cookie to identify the sender
180  @param context - sender context, to match reply w/ request
181 */
182 define sr_localsids_dump
183 {
186 };
187 
188 define sr_localsids_details
189 {
191  vl_api_srv6_sid_t addr;
196  u8 xconnect_nh_addr6[16];
197  u8 xconnect_nh_addr4[4];
199 };
200 
201 /** \brief Dump the list of SR policies
202  @param client_index - opaque cookie to identify the sender
203  @param context - sender context, to match reply w/ request
204 */
205 define sr_policies_dump
206 {
209 };
210 
211 define sr_policies_details
212 {
214  vl_api_srv6_sid_t bsid;
219  vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
220 };
221 
222 /** \brief Dump the steering policies
223  @param client_index - opaque cookie to identify the sender
224  @param context - sender context, to match reply w/ request
225 */
226 define sr_steering_pol_dump
227 {
230 };
231 
232 define sr_steering_pol_details
233 {
237  u8 prefix_addr[16];
240  vl_api_srv6_sid_t bsid;
241 };
242 
243 /*
244  * fd.io coding-style-patch-verification: OFF
245  * Local Variables:
246  * eval: (c-set-style "gnu")
247  * End:
248  */
option version
Definition: sr.api:17
vl_api_srv6_sid_t bsid
Definition: sr.api:240
vhost_vring_addr_t addr
Definition: vhost_user.h:147
unsigned char u8
Definition: types.h:56
vl_api_srv6_sid_list_t sids
Definition: sr.api:110
vl_api_srv6_sid_list_t sids
Definition: sr.api:86
u32 weight
Definition: sr.api:29
unsigned int u32
Definition: types.h:88
vl_api_srv6_sid_t addr
Definition: sr.api:191
vl_api_srv6_sid_t sids[16]
Definition: sr.api:30
typedef sr_ip6_address
Definition: sr.api:63
unsigned short u16
Definition: types.h:57
vl_api_srv6_sid_t bsid
Definition: sr.api:214
vl_api_srv6_sid_t localsid
Definition: sr.api:52
int sr_policy_del(ip6_address_t *bsid, u32 index)
Delete a SR policy.
typedef srv6_sid_list
Definition: sr.api:27
u8 data[128]
Definition: ipsec_types.api:87
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_srv6_sid_t bsid_addr
Definition: sr.api:123
typedef srv6_sid
SRv6 SID.
Definition: sr.api:22
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.