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 | |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 17 | option version = "1.0.1"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 18 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 19 | /** \brief IPv6 SR LocalSID add/del request |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 20 | @param client_index - opaque cookie to identify the sender |
| 21 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 22 | @param is_del Boolean of whether its a delete instruction |
| 23 | @param localsid_addr IPv6 address of the localsid |
| 24 | @param end_psp Boolean of whether decapsulation is allowed in this function |
| 25 | @param behavior Type of behavior (function) for this localsid |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 26 | @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the |
| 27 | fib_table. |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 28 | @param vlan_index Only for L2 xconnect. Outgoing VLAN tag. |
| 29 | @param fib_table FIB table in which we should install the localsid entry |
| 30 | @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] | 31 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 32 | autoreply define sr_localsid_add_del |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 33 | { |
| 34 | u32 client_index; |
| 35 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 36 | u8 is_del; |
| 37 | u8 localsid_addr[16]; |
| 38 | u8 end_psp; |
| 39 | u8 behavior; |
| 40 | u32 sw_if_index; |
| 41 | u32 vlan_index; |
| 42 | u32 fib_table; |
| 43 | u8 nh_addr[16]; |
| 44 | }; |
| 45 | |
Juraj Sloboda | e9fcf23 | 2018-04-23 10:14:37 +0200 | [diff] [blame] | 46 | typeonly define sr_ip6_address |
| 47 | { |
| 48 | u8 data[16]; |
| 49 | }; |
| 50 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 51 | /** \brief IPv6 SR policy add |
| 52 | @param client_index - opaque cookie to identify the sender |
| 53 | @param context - sender context, to match reply w/ request |
| 54 | @param bsid is the bindingSID of the SR Policy |
| 55 | @param weight is the weight of the sid list. optional. |
| 56 | @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) |
| 57 | @param type is the type of the SR policy. (0.Default // 1.Spray) |
| 58 | @param fib_table is the VRF where to install the FIB entry for the BSID |
| 59 | @param segments is a vector of IPv6 address composing the segment list |
| 60 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 61 | autoreply define sr_policy_add |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 62 | { |
| 63 | u32 client_index; |
| 64 | u32 context; |
| 65 | u8 bsid_addr[16]; |
| 66 | u32 weight; |
| 67 | u8 is_encap; |
| 68 | u8 type; |
| 69 | u32 fib_table; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 70 | u8 n_segments; |
Juraj Sloboda | e9fcf23 | 2018-04-23 10:14:37 +0200 | [diff] [blame] | 71 | vl_api_sr_ip6_address_t segments[n_segments]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 72 | }; |
| 73 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 74 | /** \brief IPv6 SR policy modification |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 75 | @param client_index - opaque cookie to identify the sender |
| 76 | @param context - sender context, to match reply w/ request |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 77 | @param bsid is the bindingSID of the SR Policy |
| 78 | @param sr_policy_index is the index of the SR policy |
| 79 | @param fib_table is the VRF where to install the FIB entry for the BSID |
| 80 | @param operation is the operation to perform (among the top ones) |
| 81 | @param segments is a vector of IPv6 address composing the segment list |
| 82 | @param sl_index is the index of the Segment List to modify/delete |
| 83 | @param weight is the weight of the sid list. optional. |
| 84 | @param is_encap Mode. Encapsulation or SRH insertion. |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 85 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 86 | autoreply define sr_policy_mod |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 87 | { |
| 88 | u32 client_index; |
| 89 | u32 context; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 90 | u8 bsid_addr[16]; |
| 91 | u32 sr_policy_index; |
| 92 | u32 fib_table; |
| 93 | u8 operation; |
| 94 | u32 sl_index; |
| 95 | u32 weight; |
| 96 | u8 n_segments; |
Juraj Sloboda | e9fcf23 | 2018-04-23 10:14:37 +0200 | [diff] [blame] | 97 | vl_api_sr_ip6_address_t segments[n_segments]; |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 98 | }; |
| 99 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 100 | /** \brief IPv6 SR policy deletion |
| 101 | @param client_index - opaque cookie to identify the sender |
| 102 | @param context - sender context, to match reply w/ request |
| 103 | @param bsid is the bindingSID of the SR Policy |
| 104 | @param index is the index of the SR policy |
| 105 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 106 | autoreply define sr_policy_del |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 107 | { |
| 108 | u32 client_index; |
| 109 | u32 context; |
| 110 | u8 bsid_addr[16]; |
| 111 | u32 sr_policy_index; |
| 112 | }; |
| 113 | |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 114 | /** \brief IPv6 SR Set SRv6 encapsulation source |
| 115 | @param client_index - opaque cookie to identify the sender |
| 116 | @param context - sender context, to match reply w/ request |
| 117 | @param bsid is the bindingSID of the SR Policy |
| 118 | @param index is the index of the SR policy |
| 119 | */ |
| 120 | autoreply define sr_set_encap_source |
| 121 | { |
| 122 | u32 client_index; |
| 123 | u32 context; |
| 124 | u8 encaps_source[16]; |
| 125 | }; |
| 126 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 127 | /** \brief IPv6 SR steering add/del |
| 128 | @param client_index - opaque cookie to identify the sender |
| 129 | @param context - sender context, to match reply w/ request |
| 130 | @param is_del |
| 131 | @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index) |
| 132 | @param sr_policy is the index of the SR Policy (alt to bsid) |
| 133 | @param table_id is the VRF where to install the FIB entry for the BSID |
| 134 | @param prefix is the IPv4/v6 address for L3 traffic type |
| 135 | @param mask_width is the mask for L3 traffic type |
| 136 | @param sw_if_index is the incoming interface for L2 traffic |
| 137 | @param traffic_type describes the type of traffic |
| 138 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 139 | autoreply define sr_steering_add_del |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 140 | { |
| 141 | u32 client_index; |
| 142 | u32 context; |
| 143 | u8 is_del; |
| 144 | u8 bsid_addr[16]; |
| 145 | u32 sr_policy_index; |
| 146 | u32 table_id; |
| 147 | u8 prefix_addr[16]; |
| 148 | u32 mask_width; |
| 149 | u32 sw_if_index; |
| 150 | u8 traffic_type; |
| 151 | }; |
| 152 | |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 153 | /** \brief Dump the list of SR LocalSIDs |
| 154 | @param client_index - opaque cookie to identify the sender |
| 155 | @param context - sender context, to match reply w/ request |
| 156 | */ |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 157 | define sr_localsids_dump |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 158 | { |
| 159 | u32 client_index; |
| 160 | u32 context; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 161 | }; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 162 | |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 163 | define sr_localsids_details |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 164 | { |
| 165 | u32 context; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 166 | u8 address[16]; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 167 | u8 end_psp; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 168 | u16 behavior; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 169 | u32 fib_table; |
Pablo Camarillo | 1a5e301 | 2017-11-16 16:02:50 +0100 | [diff] [blame] | 170 | u8 xconnect_next_hop[16]; |
| 171 | u32 xconnect_iface_or_vrf_table; |
| 172 | }; |
Pablo Camarillo | fb38095 | 2016-12-07 18:34:18 +0100 | [diff] [blame] | 173 | |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 174 | /* |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 175 | * fd.io coding-style-patch-verification: OFF |
Pavel Kotucek | 0f971d8 | 2017-01-03 10:48:54 +0100 | [diff] [blame] | 176 | * Local Variables: |
| 177 | * eval: (c-set-style "gnu") |
| 178 | * End: |
| 179 | */ |