Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 Cisco and/or its affiliates. Licensed under the |
| 3 | * Apache License, Version 2.0 (the "License"); you may not use this file |
| 4 | * except in compliance with the License. You may obtain a copy of the |
| 5 | * 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, WITHOUT |
| 11 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | * License for the specific language governing permissions and limitations |
| 13 | * under the License. |
| 14 | */ |
| 15 | |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 16 | option version = "2.0.0"; |
| 17 | |
| 18 | import "vnet/interface_types.api"; |
| 19 | import "vnet/ip/ip_types.api"; |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 20 | |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 21 | /** \brief MPLS SR policy add |
| 22 | @param client_index - opaque cookie to identify the sender |
| 23 | @param context - sender context, to match reply w/ request |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 24 | @param bsid - is the bindingSID of the SR Policy. MPLS label (20bit) |
| 25 | @param weight - is the weight of the sid list. optional. |
| 26 | @param is_spray - is the type of the SR policy. (0.Default // 1.Spray) |
| 27 | @param segments - vector of labels (20bit) composing the segment list |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 28 | */ |
Ole Troan | 9d42087 | 2017-10-12 13:06:35 +0200 | [diff] [blame] | 29 | autoreply define sr_mpls_policy_add |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 30 | { |
| 31 | u32 client_index; |
| 32 | u32 context; |
| 33 | u32 bsid; |
| 34 | u32 weight; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 35 | bool is_spray; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 36 | u8 n_segments; |
| 37 | u32 segments[n_segments]; |
| 38 | }; |
| 39 | |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 40 | enum sr_mpls_policy_op |
| 41 | { |
| 42 | SR_MPLS_POLICY_OP_API_NONE = 0, |
| 43 | SR_MPLS_POLICY_OP_API_ADD = 1, |
| 44 | SR_MPLS_POLICY_OP_API_DEL = 2, |
| 45 | SR_MPLS_POLICY_OP_API_MOD = 3, |
| 46 | |
| 47 | }; |
| 48 | |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 49 | /** \brief MPLS SR policy modification |
| 50 | @param client_index - opaque cookie to identify the sender |
| 51 | @param context - sender context, to match reply w/ request |
| 52 | @param bsid is the bindingSID of the SR Policy. MPLS label (20bit) |
| 53 | @param sr_policy_index is the index of the SR policy |
| 54 | @param fib_table is the VRF where to install the FIB entry for the BSID |
| 55 | @param operation is the operation to perform (among the top ones) |
| 56 | @param segments is a vector of MPLS labels composing the segment list |
| 57 | @param sl_index is the index of the Segment List to modify/delete |
| 58 | @param weight is the weight of the sid list. optional. |
| 59 | @param is_encap Mode. Encapsulation or SRH insertion. |
| 60 | */ |
| 61 | autoreply define sr_mpls_policy_mod |
| 62 | { |
| 63 | u32 client_index; |
| 64 | u32 context; |
| 65 | u32 bsid; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 66 | vl_api_sr_mpls_policy_op_t operation; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 67 | u32 sl_index; |
| 68 | u32 weight; |
| 69 | u8 n_segments; |
| 70 | u32 segments[n_segments]; |
| 71 | }; |
| 72 | |
| 73 | /** \brief MPLS SR policy deletion |
| 74 | @param client_index - opaque cookie to identify the sender |
| 75 | @param context - sender context, to match reply w/ request |
| 76 | @param bsid is the bindingSID of the SR Policy. MPLS label (20bit) |
| 77 | */ |
| 78 | autoreply define sr_mpls_policy_del |
| 79 | { |
| 80 | u32 client_index; |
| 81 | u32 context; |
| 82 | u32 bsid; |
| 83 | }; |
| 84 | |
| 85 | /** \brief MPLS SR steering add/del |
| 86 | @param client_index - opaque cookie to identify the sender |
| 87 | @param context - sender context, to match reply w/ request |
| 88 | @param is_del |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 89 | @param bsid - is the bindingSID of the SR Policy (~0 is no bsid) |
| 90 | @param table_id - is the VRF where to install the FIB entry for the BSID |
| 91 | @param prefix - is the IPv4/v6 address for L3 traffic type. |
| 92 | @param mask_width - is the mask for L3 traffic type |
| 93 | @param next_hop - describes the next_hop (in case no BSID) |
| 94 | @param color - describes the color |
| 95 | @param co_bits - are the CO_bits of the steering policy |
| 96 | @param vpn_label - is an additonal last VPN label. (~0 is no label) |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 97 | */ |
| 98 | autoreply define sr_mpls_steering_add_del |
| 99 | { |
| 100 | u32 client_index; |
| 101 | u32 context; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 102 | bool is_del[default = false]; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 103 | u32 bsid; |
| 104 | u32 table_id; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 105 | vl_api_prefix_t prefix; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 106 | u32 mask_width; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 107 | vl_api_address_t next_hop; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 108 | u32 color; |
| 109 | u8 co_bits; |
| 110 | u32 vpn_label; |
| 111 | }; |
| 112 | |
| 113 | /** \brief MPLS SR steering add/del |
| 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 endpoint is the endpoint of the SR policy |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 118 | @param color is the color of the sr policy |
| 119 | */ |
| 120 | autoreply define sr_mpls_policy_assign_endpoint_color |
| 121 | { |
| 122 | u32 client_index; |
| 123 | u32 context; |
| 124 | u32 bsid; |
Jakub Grajciar | 00ec401 | 2020-01-31 10:17:29 +0100 | [diff] [blame] | 125 | vl_api_address_t endpoint; |
Pablo Camarillo | 4299882 | 2017-07-13 09:41:32 +0200 | [diff] [blame] | 126 | u32 color; |
| 127 | }; |
| 128 | |
| 129 | /* |
| 130 | * fd.io coding-style-patch-verification: ON Local Variables: eval: |
| 131 | * (c-set-style "gnu") End: |
| 132 | */ |