Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 1 | /* Hey Emacs use -*- mode: C -*- */ |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 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 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 16 | |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 17 | option version = "1.2.0"; |
| 18 | |
| 19 | /** \brief SRv6 SID |
| 20 | */ |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 21 | typedef srv6_sid |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 22 | { |
| 23 | u8 addr[16]; |
| 24 | }; |
| 25 | |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 26 | typedef srv6_sid_list |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 27 | { |
| 28 | u8 num_sids; |
| 29 | u32 weight; |
| 30 | vl_api_srv6_sid_t sids[16]; |
| 31 | }; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 32 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 33 | /** \brief IPv6 SR LocalSID add/del request |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 34 | @param client_index - opaque cookie to identify the sender |
| 35 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 40 | @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the |
| 41 | fib_table. |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 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. |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 46 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 47 | autoreply define sr_localsid_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 48 | { |
| 49 | u32 client_index; |
| 50 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 51 | u8 is_del; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 52 | vl_api_srv6_sid_t localsid; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 53 | u8 end_psp; |
| 54 | u8 behavior; |
| 55 | u32 sw_if_index; |
| 56 | u32 vlan_index; |
| 57 | u32 fib_table; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 58 | u8 nh_addr6[16]; |
| 59 | u8 nh_addr4[4]; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 60 | }; |
| 61 | |
Paul Vinciguerra | e717482 | 2019-08-07 00:05:59 -0400 | [diff] [blame] | 62 | typedef sr_ip6_address |
Juraj Sloboda | e9fcf23 | 2018-04-23 10:14:37 +0200 | [diff] [blame] | 63 | { |
| 64 | u8 data[16]; |
| 65 | }; |
| 66 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 75 | @param sids is a srv6_sid_list object |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 76 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 77 | autoreply define sr_policy_add |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 78 | { |
| 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 Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 86 | vl_api_srv6_sid_list_t sids; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 87 | }; |
| 88 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 89 | /** \brief IPv6 SR policy modification |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 90 | @param client_index - opaque cookie to identify the sender |
| 91 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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) |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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. |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 98 | @param sids is a srv6_sid_list object |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 99 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 100 | autoreply define sr_policy_mod |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 101 | { |
| 102 | u32 client_index; |
| 103 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 104 | u8 bsid_addr[16]; |
| 105 | u32 sr_policy_index; |
| 106 | u32 fib_table; |
| 107 | u8 operation; |
| 108 | u32 sl_index; |
| 109 | u32 weight; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 110 | vl_api_srv6_sid_list_t sids; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 111 | }; |
| 112 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 119 | autoreply define sr_policy_del |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 120 | { |
| 121 | u32 client_index; |
| 122 | u32 context; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 123 | vl_api_srv6_sid_t bsid_addr; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 124 | u32 sr_policy_index; |
| 125 | }; |
| 126 | |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 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 | { |
| 135 | u32 client_index; |
| 136 | u32 context; |
| 137 | u8 encaps_source[16]; |
| 138 | }; |
| 139 | |
Ignas Bačius | eeb5fb3 | 2019-10-03 17:15:38 +0300 | [diff] [blame] | 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 | { |
| 147 | u32 client_index; |
| 148 | u32 context; |
| 149 | u8 hop_limit; |
| 150 | }; |
| 151 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 164 | autoreply define sr_steering_add_del |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 165 | { |
| 166 | u32 client_index; |
| 167 | u32 context; |
| 168 | u8 is_del; |
| 169 | u8 bsid_addr[16]; |
| 170 | u32 sr_policy_index; |
| 171 | u32 table_id; |
| 172 | u8 prefix_addr[16]; |
| 173 | u32 mask_width; |
| 174 | u32 sw_if_index; |
| 175 | u8 traffic_type; |
| 176 | }; |
| 177 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 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 | */ |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 182 | define sr_localsids_dump |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 183 | { |
| 184 | u32 client_index; |
| 185 | u32 context; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 186 | }; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 187 | |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 188 | define sr_localsids_details |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 189 | { |
| 190 | u32 context; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 191 | vl_api_srv6_sid_t addr; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 192 | u8 end_psp; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 193 | u16 behavior; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 194 | u32 fib_table; |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 195 | u32 vlan_index; |
| 196 | u8 xconnect_nh_addr6[16]; |
| 197 | u8 xconnect_nh_addr4[4]; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 198 | u32 xconnect_iface_or_vrf_table; |
| 199 | }; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 200 | |
Pablo Camarillo | 3337bd2 | 2018-06-19 15:49:02 +0200 | [diff] [blame] | 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 | { |
| 207 | u32 client_index; |
| 208 | u32 context; |
| 209 | }; |
| 210 | |
| 211 | define sr_policies_details |
| 212 | { |
| 213 | u32 context; |
| 214 | vl_api_srv6_sid_t bsid; |
| 215 | u8 type; |
| 216 | u8 is_encap; |
| 217 | u32 fib_table; |
| 218 | u8 num_sid_lists; |
| 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 | { |
| 228 | u32 client_index; |
| 229 | u32 context; |
| 230 | }; |
| 231 | |
| 232 | define sr_steering_pol_details |
| 233 | { |
| 234 | u32 context; |
| 235 | u8 traffic_type; |
| 236 | u32 fib_table; |
| 237 | u8 prefix_addr[16]; |
| 238 | u32 mask_width; |
| 239 | u32 sw_if_index; |
| 240 | vl_api_srv6_sid_t bsid; |
| 241 | }; |
| 242 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 243 | /* |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 244 | * fd.io coding-style-patch-verification: OFF |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 245 | * Local Variables: |
| 246 | * eval: (c-set-style "gnu") |
| 247 | * End: |
| 248 | */ |