FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
sr.api
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the 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,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /** \brief IPv6 SR LocalSID add/del request
17  @param client_index - opaque cookie to identify the sender
18  @param context - sender context, to match reply w/ request
19  @param is_del Boolean of whether its a delete instruction
20  @param localsid_addr IPv6 address of the localsid
21  @param end_psp Boolean of whether decapsulation is allowed in this function
22  @param behavior Type of behavior (function) for this localsid
23  @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table.
24  @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
25  @param fib_table FIB table in which we should install the localsid entry
26  @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect.
27 */
28 define sr_localsid_add_del
29 {
33  u8 localsid_addr[16];
39  u8 nh_addr[16];
40 };
41 
42 /** \brief IPv6 SR LocalSID add/del request response
43  @param context - sender context, to match reply w/ request
44  @param retval - return value for request
45 */
46 define sr_localsid_add_del_reply
47 {
50 };
51 
52 /** \brief IPv6 SR policy add
53  @param client_index - opaque cookie to identify the sender
54  @param context - sender context, to match reply w/ request
55  @param bsid is the bindingSID of the SR Policy
56  @param weight is the weight of the sid list. optional.
57  @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
58  @param type is the type of the SR policy. (0.Default // 1.Spray)
59  @param fib_table is the VRF where to install the FIB entry for the BSID
60  @param segments is a vector of IPv6 address composing the segment list
61 */
63 {
66  u8 bsid_addr[16];
72  u8 segments[0];
73 };
74 
75 /** \brief IPv6 SR Policy add request response
76  @param context - sender context, to match reply w/ request
77  @param retval - return value for request
78 */
79 define sr_policy_add_reply
80 {
83 };
84 
85 /** \brief IPv6 SR policy modification
86  @param client_index - opaque cookie to identify the sender
87  @param context - sender context, to match reply w/ request
88  @param bsid is the bindingSID of the SR Policy
89  @param sr_policy_index is the index of the SR policy
90  @param fib_table is the VRF where to install the FIB entry for the BSID
91  @param operation is the operation to perform (among the top ones)
92  @param segments is a vector of IPv6 address composing the segment list
93  @param sl_index is the index of the Segment List to modify/delete
94  @param weight is the weight of the sid list. optional.
95  @param is_encap Mode. Encapsulation or SRH insertion.
96 */
98 {
101  u8 bsid_addr[16];
108  u8 segments[0];
109 };
110 
111 /** \brief IPv6 SR Policy modification request response
112  @param context - sender context, to match reply w/ request
113  @param retval - return value for request
114 */
115 define sr_policy_mod_reply
116 {
119 };
120 
121 /** \brief IPv6 SR policy deletion
122  @param client_index - opaque cookie to identify the sender
123  @param context - sender context, to match reply w/ request
124  @param bsid is the bindingSID of the SR Policy
125  @param index is the index of the SR policy
126 */
128 {
131  u8 bsid_addr[16];
133 };
134 
135 /** \brief IPv6 SR Policy deletion request response
136  @param context - sender context, to match reply w/ request
137  @param retval - return value for request
138 */
139 define sr_policy_del_reply
140 {
143 };
144 
145 /** \brief IPv6 SR steering add/del
146  @param client_index - opaque cookie to identify the sender
147  @param context - sender context, to match reply w/ request
148  @param is_del
149  @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
150  @param sr_policy is the index of the SR Policy (alt to bsid)
151  @param table_id is the VRF where to install the FIB entry for the BSID
152  @param prefix is the IPv4/v6 address for L3 traffic type
153  @param mask_width is the mask for L3 traffic type
154  @param sw_if_index is the incoming interface for L2 traffic
155  @param traffic_type describes the type of traffic
156 */
157 define sr_steering_add_del
158 {
162  u8 bsid_addr[16];
165  u8 prefix_addr[16];
169 };
170 
171 /** \brief IPv6 SR steering add/del request response
172  @param context - sender context, to match reply w/ request
173  @param retval - return value for request
174 */
175 define sr_steering_add_del_reply
176 {
179 };
180 
181 /** \brief Dump the list of SR LocalSIDs
182  @param client_index - opaque cookie to identify the sender
183  @param context - sender context, to match reply w/ request
184 */
185 /**define sr_localsids_dump
186 {
187  u32 client_index;
188  u32 context;
189 };*/
190 
191 /** \brief Details about a single SR LocalSID
192  @param context - returned sender context, to match reply w/ request
193  @param localsid_addr IPv6 address of the localsid
194  @param behavior Type of behavior (function) for this localsid
195  @param end_psp Boolean of whether decapsulation is allowed in this function
196  @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table.
197  @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
198  @param fib_table FIB table in which we should install the localsid entry
199  @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect.
200 */
201 /**manual_endian define sr_localsid_details
202 {
203  u32 context;
204  u8 localsid_addr[16];
205  u8 behavior;
206  u8 end_psp;
207  u32 sw_if_index;
208  u32 vlan_index;
209  u32 fib_table;
210  u8 nh_addr[16];
211 };*/
212 
213 /*
214  * fd.io coding-style-patch-verification: ON
215  * Local Variables:
216  * eval: (c-set-style "gnu")
217  * End:
218  */
int i32
Definition: types.h:81
int sr_policy_del(ip6_address_t *bsid, u32 index)
Delete a SR policy.
int sr_policy_add(ip6_address_t *bsid, ip6_address_t *segments, u32 weight, u8 behavior, u32 fib_table, u8 is_encap)
Create a new SR policy.
unsigned int u32
Definition: types.h:88
unsigned char u8
Definition: types.h:56
int sr_policy_mod(ip6_address_t *bsid, u32 index, u32 fib_table, u8 operation, ip6_address_t *segments, u32 sl_index, u32 weight)
Modify an existing SR policy.