e11dbb7ab616865a58e1659ca0d9df988f1dd2e0
[vpp.git] / src / vnet / srmpls / sr_mpls.api
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 vl_api_version 1.0 .0
17 /** \brief MPLS SR policy add
18     @param client_index - opaque cookie to identify the sender
19     @param context - sender context, to match reply w/ request
20     @param bsid is the bindingSID of the SR Policy. MPLS label (20bit)
21     @param weight is the weight of the sid list. optional.
22     @param type is the type of the SR policy. (0.Default // 1.Spray)
23     @param segments vector of labels (20bit) composing the segment list
24 */
25   autoreply define sr_mpls_policy_add
26 {
27   u32 client_index;
28   u32 context;
29   u32 bsid;
30   u32 weight;
31   u8 type;
32   u8 n_segments;
33   u32 segments[n_segments];
34 };
35
36 /** \brief MPLS SR policy modification
37     @param client_index - opaque cookie to identify the sender
38     @param context - sender context, to match reply w/ request
39     @param bsid is the bindingSID of the SR Policy. MPLS label (20bit)
40     @param sr_policy_index is the index of the SR policy
41     @param fib_table is the VRF where to install the FIB entry for the BSID
42     @param operation is the operation to perform (among the top ones)
43     @param segments is a vector of MPLS labels composing the segment list
44     @param sl_index is the index of the Segment List to modify/delete
45     @param weight is the weight of the sid list. optional.
46     @param is_encap Mode. Encapsulation or SRH insertion.
47 */
48 autoreply define sr_mpls_policy_mod
49 {
50   u32 client_index;
51   u32 context;
52   u32 bsid;
53   u8 operation;
54   u32 sl_index;
55   u32 weight;
56   u8 n_segments;
57   u32 segments[n_segments];
58 };
59
60 /** \brief MPLS SR policy deletion
61     @param client_index - opaque cookie to identify the sender
62     @param context - sender context, to match reply w/ request
63     @param bsid is the bindingSID of the SR Policy. MPLS label (20bit)
64 */
65 autoreply define sr_mpls_policy_del
66 {
67   u32 client_index;
68   u32 context;
69   u32 bsid;
70 };
71
72 /** \brief MPLS SR steering add/del
73     @param client_index - opaque cookie to identify the sender
74     @param context - sender context, to match reply w/ request
75     @param is_del
76     @param bsid is the bindingSID of the SR Policy (~0 is no bsid)
77     @param table_id is the VRF where to install the FIB entry for the BSID
78     @param prefix is the IPv4/v6 address for L3 traffic type. If IPv4 (first 4B).
79     @param mask_width is the mask for L3 traffic type
80     @param sw_if_index is the incoming interface for L2 traffic
81     @param traffic_type describes the type of traffic
82     @param next_hop describes the next_hop (in case no BSID)
83     @param nh_type describes type of NH (IPv4=4, IPv6=6)
84     @param color describes the color
85     @param co_bits are the CO_bits of the steering policy
86     @param vpn_label is an additonal last VPN label. (~0 is no label)
87 */
88 autoreply define sr_mpls_steering_add_del
89 {
90   u32 client_index;
91   u32 context;
92   u8 is_del;
93   u32 bsid;
94   u32 table_id;
95   u8 prefix_addr[16];
96   u32 mask_width;
97   u8 traffic_type;
98   u8 next_hop[16];
99   u8 nh_type;
100   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
110     @param endpoint_type describes type of NH (IPv4=4, IPv6=6)
111     @param color is the color of the sr policy
112 */
113 autoreply define sr_mpls_policy_assign_endpoint_color
114 {
115   u32 client_index;
116   u32 context;
117   u32 bsid;
118   u8 endpoint[16];
119   u8 endpoint_type;
120   u32 color;
121 };
122
123 /*
124  * fd.io coding-style-patch-verification: ON Local Variables: eval:
125  * (c-set-style "gnu") End:
126  */