Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 15 | |
| 16 | /** \brief IPv6 SR LocalSID add/del request |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 17 | @param client_index - opaque cookie to identify the sender |
| 18 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 19 | @param is_del Boolean of whether its a delete instruction |
| 20 | @param localsid_addr IPv6 address of the localsid |
| 21 | @param end_psp Boolean of whether decapsulation is allowed in this function |
| 22 | @param behavior Type of behavior (function) for this localsid |
| 23 | @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table. |
| 24 | @param vlan_index Only for L2 xconnect. Outgoing VLAN tag. |
| 25 | @param fib_table FIB table in which we should install the localsid entry |
| 26 | @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect. |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 27 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 28 | define sr_localsid_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 29 | { |
| 30 | u32 client_index; |
| 31 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 32 | u8 is_del; |
| 33 | u8 localsid_addr[16]; |
| 34 | u8 end_psp; |
| 35 | u8 behavior; |
| 36 | u32 sw_if_index; |
| 37 | u32 vlan_index; |
| 38 | u32 fib_table; |
| 39 | u8 nh_addr[16]; |
| 40 | }; |
| 41 | |
| 42 | /** \brief IPv6 SR LocalSID add/del request response |
| 43 | @param context - sender context, to match reply w/ request |
| 44 | @param retval - return value for request |
| 45 | */ |
| 46 | define sr_localsid_add_del_reply |
| 47 | { |
| 48 | u32 context; |
| 49 | i32 retval; |
| 50 | }; |
| 51 | |
| 52 | /** \brief IPv6 SR policy add |
| 53 | @param client_index - opaque cookie to identify the sender |
| 54 | @param context - sender context, to match reply w/ request |
| 55 | @param bsid is the bindingSID of the SR Policy |
| 56 | @param weight is the weight of the sid list. optional. |
| 57 | @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) |
| 58 | @param type is the type of the SR policy. (0.Default // 1.Spray) |
| 59 | @param fib_table is the VRF where to install the FIB entry for the BSID |
| 60 | @param segments is a vector of IPv6 address composing the segment list |
| 61 | */ |
| 62 | define sr_policy_add |
| 63 | { |
| 64 | u32 client_index; |
| 65 | u32 context; |
| 66 | u8 bsid_addr[16]; |
| 67 | u32 weight; |
| 68 | u8 is_encap; |
| 69 | u8 type; |
| 70 | u32 fib_table; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 71 | u8 n_segments; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 72 | u8 segments[0]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 73 | }; |
| 74 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 75 | /** \brief IPv6 SR Policy add request response |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 76 | @param context - sender context, to match reply w/ request |
| 77 | @param retval - return value for request |
| 78 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 79 | define sr_policy_add_reply |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 80 | { |
| 81 | u32 context; |
| 82 | i32 retval; |
| 83 | }; |
| 84 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 85 | /** \brief IPv6 SR policy modification |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 86 | @param client_index - opaque cookie to identify the sender |
| 87 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 88 | @param bsid is the bindingSID of the SR Policy |
| 89 | @param sr_policy_index is the index of the SR policy |
| 90 | @param fib_table is the VRF where to install the FIB entry for the BSID |
| 91 | @param operation is the operation to perform (among the top ones) |
| 92 | @param segments is a vector of IPv6 address composing the segment list |
| 93 | @param sl_index is the index of the Segment List to modify/delete |
| 94 | @param weight is the weight of the sid list. optional. |
| 95 | @param is_encap Mode. Encapsulation or SRH insertion. |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 96 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 97 | define sr_policy_mod |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 98 | { |
| 99 | u32 client_index; |
| 100 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 101 | u8 bsid_addr[16]; |
| 102 | u32 sr_policy_index; |
| 103 | u32 fib_table; |
| 104 | u8 operation; |
| 105 | u32 sl_index; |
| 106 | u32 weight; |
| 107 | u8 n_segments; |
| 108 | u8 segments[0]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 109 | }; |
| 110 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 111 | /** \brief IPv6 SR Policy modification request response |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 112 | @param context - sender context, to match reply w/ request |
| 113 | @param retval - return value for request |
| 114 | */ |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 115 | define sr_policy_mod_reply |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 116 | { |
| 117 | u32 context; |
| 118 | i32 retval; |
| 119 | }; |
| 120 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 121 | /** \brief IPv6 SR policy deletion |
| 122 | @param client_index - opaque cookie to identify the sender |
| 123 | @param context - sender context, to match reply w/ request |
| 124 | @param bsid is the bindingSID of the SR Policy |
| 125 | @param index is the index of the SR policy |
| 126 | */ |
| 127 | define sr_policy_del |
| 128 | { |
| 129 | u32 client_index; |
| 130 | u32 context; |
| 131 | u8 bsid_addr[16]; |
| 132 | u32 sr_policy_index; |
| 133 | }; |
| 134 | |
| 135 | /** \brief IPv6 SR Policy deletion request response |
| 136 | @param context - sender context, to match reply w/ request |
| 137 | @param retval - return value for request |
| 138 | */ |
| 139 | define sr_policy_del_reply |
| 140 | { |
| 141 | u32 context; |
| 142 | i32 retval; |
| 143 | }; |
| 144 | |
| 145 | /** \brief IPv6 SR steering add/del |
| 146 | @param client_index - opaque cookie to identify the sender |
| 147 | @param context - sender context, to match reply w/ request |
| 148 | @param is_del |
| 149 | @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index) |
| 150 | @param sr_policy is the index of the SR Policy (alt to bsid) |
| 151 | @param table_id is the VRF where to install the FIB entry for the BSID |
| 152 | @param prefix is the IPv4/v6 address for L3 traffic type |
| 153 | @param mask_width is the mask for L3 traffic type |
| 154 | @param sw_if_index is the incoming interface for L2 traffic |
| 155 | @param traffic_type describes the type of traffic |
| 156 | */ |
| 157 | define sr_steering_add_del |
| 158 | { |
| 159 | u32 client_index; |
| 160 | u32 context; |
| 161 | u8 is_del; |
| 162 | u8 bsid_addr[16]; |
| 163 | u32 sr_policy_index; |
| 164 | u32 table_id; |
| 165 | u8 prefix_addr[16]; |
| 166 | u32 mask_width; |
| 167 | u32 sw_if_index; |
| 168 | u8 traffic_type; |
| 169 | }; |
| 170 | |
| 171 | /** \brief IPv6 SR steering add/del request response |
| 172 | @param context - sender context, to match reply w/ request |
| 173 | @param retval - return value for request |
| 174 | */ |
| 175 | define sr_steering_add_del_reply |
| 176 | { |
| 177 | u32 context; |
| 178 | i32 retval; |
| 179 | }; |
| 180 | |
| 181 | /** \brief Dump the list of SR LocalSIDs |
| 182 | @param client_index - opaque cookie to identify the sender |
| 183 | @param context - sender context, to match reply w/ request |
| 184 | */ |
| 185 | /**define sr_localsids_dump |
| 186 | { |
| 187 | u32 client_index; |
| 188 | u32 context; |
| 189 | };*/ |
| 190 | |
| 191 | /** \brief Details about a single SR LocalSID |
| 192 | @param context - returned sender context, to match reply w/ request |
| 193 | @param localsid_addr IPv6 address of the localsid |
| 194 | @param behavior Type of behavior (function) for this localsid |
| 195 | @param end_psp Boolean of whether decapsulation is allowed in this function |
| 196 | @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table. |
| 197 | @param vlan_index Only for L2 xconnect. Outgoing VLAN tag. |
| 198 | @param fib_table FIB table in which we should install the localsid entry |
| 199 | @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect. |
| 200 | */ |
| 201 | /**manual_endian define sr_localsid_details |
| 202 | { |
| 203 | u32 context; |
| 204 | u8 localsid_addr[16]; |
| 205 | u8 behavior; |
| 206 | u8 end_psp; |
| 207 | u32 sw_if_index; |
| 208 | u32 vlan_index; |
| 209 | u32 fib_table; |
| 210 | u8 nh_addr[16]; |
| 211 | };*/ |
| 212 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 213 | /* |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 214 | * fd.io coding-style-patch-verification: ON |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 215 | * Local Variables: |
| 216 | * eval: (c-set-style "gnu") |
| 217 | * End: |
| 218 | */ |