blob: 742f135d49319ea174ec4278cc4eac34770c80e3 [file] [log] [blame]
Pablo Camarillo42998822017-07-13 09:41:32 +02001/*
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 Grajciar0938eba2020-03-04 13:08:27 +010016option version = "3.0.0";
Jakub Grajciar00ec4012020-01-31 10:17:29 +010017
18import "vnet/interface_types.api";
19import "vnet/ip/ip_types.api";
Jakub Grajciar0938eba2020-03-04 13:08:27 +010020import "vnet/srv6/sr_types.api";
Ole Troan9d420872017-10-12 13:06:35 +020021
Pablo Camarillo42998822017-07-13 09:41:32 +020022/** \brief MPLS SR policy add
23 @param client_index - opaque cookie to identify the sender
24 @param context - sender context, to match reply w/ request
Jakub Grajciar00ec4012020-01-31 10:17:29 +010025 @param bsid - is the bindingSID of the SR Policy. MPLS label (20bit)
26 @param weight - is the weight of the sid list. optional.
27 @param is_spray - is the type of the SR policy. (0.Default // 1.Spray)
28 @param segments - vector of labels (20bit) composing the segment list
Pablo Camarillo42998822017-07-13 09:41:32 +020029*/
Ole Troan9d420872017-10-12 13:06:35 +020030autoreply define sr_mpls_policy_add
Pablo Camarillo42998822017-07-13 09:41:32 +020031{
32 u32 client_index;
33 u32 context;
34 u32 bsid;
35 u32 weight;
Jakub Grajciar00ec4012020-01-31 10:17:29 +010036 bool is_spray;
Pablo Camarillo42998822017-07-13 09:41:32 +020037 u8 n_segments;
38 u32 segments[n_segments];
39};
40
41/** \brief MPLS SR policy modification
42 @param client_index - opaque cookie to identify the sender
43 @param context - sender context, to match reply w/ request
44 @param bsid is the bindingSID of the SR Policy. MPLS label (20bit)
45 @param sr_policy_index is the index of the SR policy
46 @param fib_table is the VRF where to install the FIB entry for the BSID
47 @param operation is the operation to perform (among the top ones)
48 @param segments is a vector of MPLS labels composing the segment list
49 @param sl_index is the index of the Segment List to modify/delete
50 @param weight is the weight of the sid list. optional.
51 @param is_encap Mode. Encapsulation or SRH insertion.
52*/
53autoreply define sr_mpls_policy_mod
54{
55 u32 client_index;
56 u32 context;
57 u32 bsid;
Jakub Grajciar0938eba2020-03-04 13:08:27 +010058 vl_api_sr_policy_op_t operation;
Pablo Camarillo42998822017-07-13 09:41:32 +020059 u32 sl_index;
60 u32 weight;
61 u8 n_segments;
62 u32 segments[n_segments];
63};
64
65/** \brief MPLS SR policy deletion
66 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
68 @param bsid is the bindingSID of the SR Policy. MPLS label (20bit)
69*/
70autoreply define sr_mpls_policy_del
71{
72 u32 client_index;
73 u32 context;
74 u32 bsid;
75};
76
77/** \brief MPLS SR steering add/del
78 @param client_index - opaque cookie to identify the sender
79 @param context - sender context, to match reply w/ request
80 @param is_del
Jakub Grajciar00ec4012020-01-31 10:17:29 +010081 @param bsid - is the bindingSID of the SR Policy (~0 is no bsid)
82 @param table_id - is the VRF where to install the FIB entry for the BSID
83 @param prefix - is the IPv4/v6 address for L3 traffic type.
84 @param mask_width - is the mask for L3 traffic type
85 @param next_hop - describes the next_hop (in case no BSID)
86 @param color - describes the color
87 @param co_bits - are the CO_bits of the steering policy
88 @param vpn_label - is an additonal last VPN label. (~0 is no label)
Pablo Camarillo42998822017-07-13 09:41:32 +020089*/
90autoreply define sr_mpls_steering_add_del
91{
92 u32 client_index;
93 u32 context;
Jakub Grajciar00ec4012020-01-31 10:17:29 +010094 bool is_del[default = false];
Pablo Camarillo42998822017-07-13 09:41:32 +020095 u32 bsid;
96 u32 table_id;
Jakub Grajciar00ec4012020-01-31 10:17:29 +010097 vl_api_prefix_t prefix;
Pablo Camarillo42998822017-07-13 09:41:32 +020098 u32 mask_width;
Jakub Grajciar00ec4012020-01-31 10:17:29 +010099 vl_api_address_t next_hop;
Pablo Camarillo42998822017-07-13 09:41:32 +0200100 u32 color;
101 u8 co_bits;
102 u32 vpn_label;
103};
104
105/** \brief MPLS SR steering add/del
106 @param client_index - opaque cookie to identify the sender
107 @param context - sender context, to match reply w/ request
108 @param bsid is the bindingSID of the SR Policy
109 @param endpoint is the endpoint of the SR policy
Pablo Camarillo42998822017-07-13 09:41:32 +0200110 @param color is the color of the sr policy
111*/
112autoreply define sr_mpls_policy_assign_endpoint_color
113{
114 u32 client_index;
115 u32 context;
116 u32 bsid;
Jakub Grajciar00ec4012020-01-31 10:17:29 +0100117 vl_api_address_t endpoint;
Pablo Camarillo42998822017-07-13 09:41:32 +0200118 u32 color;
119};
120
121/*
122 * fd.io coding-style-patch-verification: ON Local Variables: eval:
123 * (c-set-style "gnu") End:
124 */