FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
sr_mpls.api
Go to the documentation of this file.
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 
16 option version = "3.0.0";
17 
18 import "vnet/interface_types.api";
19 import "vnet/ip/ip_types.api";
20 import "vnet/srv6/sr_types.api";
21 
22 /** \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
25  @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
29 */
30 autoreply define sr_mpls_policy_add
31 {
36  bool is_spray;
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 */
53 autoreply define sr_mpls_policy_mod
54 {
58  vl_api_sr_policy_op_t operation;
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 */
70 autoreply define sr_mpls_policy_del
71 {
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
81  @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)
89 */
90 autoreply define sr_mpls_steering_add_del
91 {
94  bool is_del[default = false];
97  vl_api_prefix_t prefix;
99  vl_api_address_t next_hop;
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
110  @param color is the color of the sr policy
111 */
113 {
117  vl_api_address_t endpoint;
119 };
120 
121 /*
122  * fd.io coding-style-patch-verification: ON Local Variables: eval:
123  * (c-set-style "gnu") End:
124  */
vl_api_sr_mpls_policy_add_t::segments
u32 segments[n_segments]
Definition: sr_mpls.api:38
vl_api_sr_mpls_steering_add_del_t::is_del
bool is_del[default=false]
Definition: sr_mpls.api:94
vl_api_sr_mpls_policy_mod_t::client_index
u32 client_index
Definition: sr_mpls.api:55
sr_mpls_policy_assign_endpoint_color
int sr_mpls_policy_assign_endpoint_color(mpls_label_t bsid, ip46_address_t *endpoint, u8 endpoint_type, u32 color)
Update the Endpoint,Color tuple of an SR policy.
Definition: sr_mpls_policy.c:671
vl_api_sr_mpls_policy_add_t
MPLS SR policy add.
Definition: sr_mpls.api:30
vl_api_sr_mpls_steering_add_del_t::table_id
u32 table_id
Definition: sr_mpls.api:96
vl_api_sr_mpls_policy_add_t::weight
u32 weight
Definition: sr_mpls.api:35
vl_api_sr_mpls_policy_del_t::bsid
u32 bsid
Definition: sr_mpls.api:74
vl_api_sr_mpls_steering_add_del_t::client_index
u32 client_index
Definition: sr_mpls.api:92
vl_api_sr_mpls_policy_assign_endpoint_color_t
MPLS SR steering add/del.
Definition: sr_mpls.api:112
vl_api_sr_mpls_policy_mod_t::n_segments
u8 n_segments
Definition: sr_mpls.api:61
vl_api_sr_mpls_policy_assign_endpoint_color_t::context
u32 context
Definition: sr_mpls.api:115
vl_api_sr_mpls_policy_add_t::client_index
u32 client_index
Definition: sr_mpls.api:32
vl_api_sr_mpls_policy_assign_endpoint_color_t::client_index
u32 client_index
Definition: sr_mpls.api:114
vl_api_sr_mpls_policy_assign_endpoint_color_t::endpoint
vl_api_address_t endpoint
Definition: sr_mpls.api:117
vl_api_sr_mpls_policy_mod_t::sl_index
u32 sl_index
Definition: sr_mpls.api:59
vl_api_sr_mpls_steering_add_del_t::next_hop
vl_api_address_t next_hop
Definition: sr_mpls.api:99
vl_api_sr_mpls_steering_add_del_t
MPLS SR steering add/del.
Definition: sr_mpls.api:90
vl_api_sr_mpls_policy_mod_t::weight
u32 weight
Definition: sr_mpls.api:60
vl_api_sr_mpls_policy_add_t::context
u32 context
Definition: sr_mpls.api:33
sr_mpls_policy_add
int sr_mpls_policy_add(mpls_label_t bsid, mpls_label_t *segments, u8 behavior, u32 weight)
Create a new SR policy.
Definition: sr_mpls_policy.c:152
vl_api_sr_mpls_steering_add_del_t::co_bits
u8 co_bits
Definition: sr_mpls.api:101
vl_api_sr_mpls_steering_add_del_t::bsid
u32 bsid
Definition: sr_mpls.api:95
vl_api_sr_mpls_policy_add_t::n_segments
u8 n_segments
Definition: sr_mpls.api:37
vl_api_sr_mpls_steering_add_del_t::color
u32 color
Definition: sr_mpls.api:100
vl_api_sr_mpls_policy_assign_endpoint_color_t::bsid
u32 bsid
Definition: sr_mpls.api:116
vl_api_sr_mpls_steering_add_del_t::vpn_label
u32 vpn_label
Definition: sr_mpls.api:102
vl_api_sr_mpls_policy_add_t::bsid
u32 bsid
Definition: sr_mpls.api:34
vl_api_sr_mpls_policy_mod_t::bsid
u32 bsid
Definition: sr_mpls.api:57
vl_api_sr_mpls_policy_mod_t::context
u32 context
Definition: sr_mpls.api:56
vl_api_sr_mpls_policy_assign_endpoint_color_t::color
u32 color
Definition: sr_mpls.api:118
vl_api_sr_mpls_steering_add_del_t::mask_width
u32 mask_width
Definition: sr_mpls.api:98
vl_api_sr_mpls_policy_mod_t::operation
vl_api_sr_policy_op_t operation
Definition: sr_mpls.api:58
u32
unsigned int u32
Definition: types.h:88
vl_api_sr_mpls_policy_del_t
MPLS SR policy deletion.
Definition: sr_mpls.api:70
version
option version
Definition: sr_mpls.api:16
vl_api_sr_mpls_steering_add_del_t::context
u32 context
Definition: sr_mpls.api:93
u8
unsigned char u8
Definition: types.h:56
vl_api_sr_mpls_policy_del_t::client_index
u32 client_index
Definition: sr_mpls.api:72
vl_api_sr_mpls_policy_add_t::is_spray
bool is_spray
Definition: sr_mpls.api:36
sr_mpls_policy_del
int sr_mpls_policy_del(mpls_label_t bsid)
Delete a SR policy.
Definition: sr_mpls_policy.c:207
vl_api_sr_mpls_policy_mod_t::segments
u32 segments[n_segments]
Definition: sr_mpls.api:62
vl_api_sr_mpls_steering_add_del_t::prefix
vl_api_prefix_t prefix
Definition: sr_mpls.api:97
vl_api_sr_mpls_policy_mod_t
MPLS SR policy modification.
Definition: sr_mpls.api:53
sr_mpls_policy_mod
int sr_mpls_policy_mod(mpls_label_t bsid, u8 operation, mpls_label_t *segments, u32 sl_index, u32 weight)
Modify an existing SR policy.
Definition: sr_mpls_policy.c:299
vl_api_sr_mpls_policy_del_t::context
u32 context
Definition: sr_mpls.api:73