blob: e989ffe2f16aad19d142994edeba8082694ea923 [file] [log] [blame]
Dave Barach0d056e52017-09-28 15:11:16 -04001/* Hey Emacs use -*- mode: C -*- */
Pavel Kotucek0f971d82017-01-03 10:48:54 +01002/*
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 */
Pablo Camarillofb380952016-12-07 18:34:18 +010016
Pablo Camarillo3337bd22018-06-19 15:49:02 +020017option version = "1.2.0";
18
19/** \brief SRv6 SID
20*/
Paul Vinciguerrae7174822019-08-07 00:05:59 -040021typedef srv6_sid
Pablo Camarillo3337bd22018-06-19 15:49:02 +020022{
23 u8 addr[16];
24};
25
Paul Vinciguerrae7174822019-08-07 00:05:59 -040026typedef srv6_sid_list
Pablo Camarillo3337bd22018-06-19 15:49:02 +020027{
28 u8 num_sids;
29 u32 weight;
30 vl_api_srv6_sid_t sids[16];
31};
Dave Barach0d056e52017-09-28 15:11:16 -040032
Pablo Camarillofb380952016-12-07 18:34:18 +010033/** \brief IPv6 SR LocalSID add/del request
Pavel Kotucek0f971d82017-01-03 10:48:54 +010034 @param client_index - opaque cookie to identify the sender
35 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010036 @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
Dave Barach0d056e52017-09-28 15:11:16 -040040 @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
41 fib_table.
Pablo Camarillofb380952016-12-07 18:34:18 +010042 @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
43 @param fib_table FIB table in which we should install the localsid entry
Pablo Camarillo3337bd22018-06-19 15:49:02 +020044 @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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010046*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040047autoreply define sr_localsid_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +010048{
49 u32 client_index;
50 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +010051 u8 is_del;
Pablo Camarillo3337bd22018-06-19 15:49:02 +020052 vl_api_srv6_sid_t localsid;
Pablo Camarillofb380952016-12-07 18:34:18 +010053 u8 end_psp;
54 u8 behavior;
55 u32 sw_if_index;
56 u32 vlan_index;
57 u32 fib_table;
Pablo Camarillo3337bd22018-06-19 15:49:02 +020058 u8 nh_addr6[16];
59 u8 nh_addr4[4];
Pablo Camarillofb380952016-12-07 18:34:18 +010060};
61
Paul Vinciguerrae7174822019-08-07 00:05:59 -040062typedef sr_ip6_address
Juraj Slobodae9fcf232018-04-23 10:14:37 +020063{
64 u8 data[16];
65};
66
Pablo Camarillofb380952016-12-07 18:34:18 +010067/** \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
Pablo Camarillo3337bd22018-06-19 15:49:02 +020075 @param sids is a srv6_sid_list object
Pablo Camarillofb380952016-12-07 18:34:18 +010076*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040077autoreply define sr_policy_add
Pablo Camarillofb380952016-12-07 18:34:18 +010078{
79 u32 client_index;
80 u32 context;
81 u8 bsid_addr[16];
82 u32 weight;
83 u8 is_encap;
84 u8 type;
85 u32 fib_table;
Pablo Camarillo3337bd22018-06-19 15:49:02 +020086 vl_api_srv6_sid_list_t sids;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010087};
88
Pablo Camarillofb380952016-12-07 18:34:18 +010089/** \brief IPv6 SR policy modification
Pavel Kotucek0f971d82017-01-03 10:48:54 +010090 @param client_index - opaque cookie to identify the sender
91 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010092 @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)
Pablo Camarillofb380952016-12-07 18:34:18 +010096 @param sl_index is the index of the Segment List to modify/delete
97 @param weight is the weight of the sid list. optional.
Pablo Camarillo3337bd22018-06-19 15:49:02 +020098 @param sids is a srv6_sid_list object
Pavel Kotucek0f971d82017-01-03 10:48:54 +010099*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400100autoreply define sr_policy_mod
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100101{
102 u32 client_index;
103 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +0100104 u8 bsid_addr[16];
105 u32 sr_policy_index;
106 u32 fib_table;
107 u8 operation;
108 u32 sl_index;
109 u32 weight;
Pablo Camarillo3337bd22018-06-19 15:49:02 +0200110 vl_api_srv6_sid_list_t sids;
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100111};
112
Pablo Camarillofb380952016-12-07 18:34:18 +0100113/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400119autoreply define sr_policy_del
Pablo Camarillofb380952016-12-07 18:34:18 +0100120{
121 u32 client_index;
122 u32 context;
Pablo Camarillo3337bd22018-06-19 15:49:02 +0200123 vl_api_srv6_sid_t bsid_addr;
Pablo Camarillofb380952016-12-07 18:34:18 +0100124 u32 sr_policy_index;
125};
126
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100127/** \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*/
133autoreply define sr_set_encap_source
134{
135 u32 client_index;
136 u32 context;
137 u8 encaps_source[16];
138};
139
Pablo Camarillofb380952016-12-07 18:34:18 +0100140/** \brief IPv6 SR steering add/del
141 @param client_index - opaque cookie to identify the sender
142 @param context - sender context, to match reply w/ request
143 @param is_del
144 @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
145 @param sr_policy is the index of the SR Policy (alt to bsid)
146 @param table_id is the VRF where to install the FIB entry for the BSID
147 @param prefix is the IPv4/v6 address for L3 traffic type
148 @param mask_width is the mask for L3 traffic type
149 @param sw_if_index is the incoming interface for L2 traffic
150 @param traffic_type describes the type of traffic
151*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400152autoreply define sr_steering_add_del
Pablo Camarillofb380952016-12-07 18:34:18 +0100153{
154 u32 client_index;
155 u32 context;
156 u8 is_del;
157 u8 bsid_addr[16];
158 u32 sr_policy_index;
159 u32 table_id;
160 u8 prefix_addr[16];
161 u32 mask_width;
162 u32 sw_if_index;
163 u8 traffic_type;
164};
165
Pablo Camarillofb380952016-12-07 18:34:18 +0100166/** \brief Dump the list of SR LocalSIDs
167 @param client_index - opaque cookie to identify the sender
168 @param context - sender context, to match reply w/ request
169*/
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100170define sr_localsids_dump
Pablo Camarillofb380952016-12-07 18:34:18 +0100171{
172 u32 client_index;
173 u32 context;
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100174};
Pablo Camarillofb380952016-12-07 18:34:18 +0100175
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100176define sr_localsids_details
Pablo Camarillofb380952016-12-07 18:34:18 +0100177{
178 u32 context;
Pablo Camarillo3337bd22018-06-19 15:49:02 +0200179 vl_api_srv6_sid_t addr;
Pablo Camarillofb380952016-12-07 18:34:18 +0100180 u8 end_psp;
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100181 u16 behavior;
Pablo Camarillofb380952016-12-07 18:34:18 +0100182 u32 fib_table;
Pablo Camarillo3337bd22018-06-19 15:49:02 +0200183 u32 vlan_index;
184 u8 xconnect_nh_addr6[16];
185 u8 xconnect_nh_addr4[4];
Pablo Camarillo1a5e3012017-11-16 16:02:50 +0100186 u32 xconnect_iface_or_vrf_table;
187};
Pablo Camarillofb380952016-12-07 18:34:18 +0100188
Pablo Camarillo3337bd22018-06-19 15:49:02 +0200189/** \brief Dump the list of SR policies
190 @param client_index - opaque cookie to identify the sender
191 @param context - sender context, to match reply w/ request
192*/
193define sr_policies_dump
194{
195 u32 client_index;
196 u32 context;
197};
198
199define sr_policies_details
200{
201 u32 context;
202 vl_api_srv6_sid_t bsid;
203 u8 type;
204 u8 is_encap;
205 u32 fib_table;
206 u8 num_sid_lists;
207 vl_api_srv6_sid_list_t sid_lists[num_sid_lists];
208};
209
210/** \brief Dump the steering policies
211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
213*/
214define sr_steering_pol_dump
215{
216 u32 client_index;
217 u32 context;
218};
219
220define sr_steering_pol_details
221{
222 u32 context;
223 u8 traffic_type;
224 u32 fib_table;
225 u8 prefix_addr[16];
226 u32 mask_width;
227 u32 sw_if_index;
228 vl_api_srv6_sid_t bsid;
229};
230
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100231/*
Dave Barach0d056e52017-09-28 15:11:16 -0400232 * fd.io coding-style-patch-verification: OFF
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100233 * Local Variables:
234 * eval: (c-set-style "gnu")
235 * End:
236 */