FD.io VPP  v17.07.01-10-g3be13f0
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 autoreply define sr_localsid_add_del
29 {
33  u8 localsid_addr[16];
39  u8 nh_addr[16];
40 };
41 
42 /** \brief IPv6 SR policy add
43  @param client_index - opaque cookie to identify the sender
44  @param context - sender context, to match reply w/ request
45  @param bsid is the bindingSID of the SR Policy
46  @param weight is the weight of the sid list. optional.
47  @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
48  @param type is the type of the SR policy. (0.Default // 1.Spray)
49  @param fib_table is the VRF where to install the FIB entry for the BSID
50  @param segments is a vector of IPv6 address composing the segment list
51 */
52 autoreply define sr_policy_add
53 {
56  u8 bsid_addr[16];
62  u8 segments[0];
63 };
64 
65 /** \brief IPv6 SR policy modification
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
69  @param sr_policy_index is the index of the SR policy
70  @param fib_table is the VRF where to install the FIB entry for the BSID
71  @param operation is the operation to perform (among the top ones)
72  @param segments is a vector of IPv6 address composing the segment list
73  @param sl_index is the index of the Segment List to modify/delete
74  @param weight is the weight of the sid list. optional.
75  @param is_encap Mode. Encapsulation or SRH insertion.
76 */
77 autoreply define sr_policy_mod
78 {
81  u8 bsid_addr[16];
88  u8 segments[0];
89 };
90 
91 /** \brief IPv6 SR policy deletion
92  @param client_index - opaque cookie to identify the sender
93  @param context - sender context, to match reply w/ request
94  @param bsid is the bindingSID of the SR Policy
95  @param index is the index of the SR policy
96 */
97 autoreply define sr_policy_del
98 {
101  u8 bsid_addr[16];
103 };
104 
105 /** \brief IPv6 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 is_del
109  @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
110  @param sr_policy is the index of the SR Policy (alt to bsid)
111  @param table_id is the VRF where to install the FIB entry for the BSID
112  @param prefix is the IPv4/v6 address for L3 traffic type
113  @param mask_width is the mask for L3 traffic type
114  @param sw_if_index is the incoming interface for L2 traffic
115  @param traffic_type describes the type of traffic
116 */
117 autoreply define sr_steering_add_del
118 {
122  u8 bsid_addr[16];
125  u8 prefix_addr[16];
129 };
130 
131 /** \brief Dump the list of SR LocalSIDs
132  @param client_index - opaque cookie to identify the sender
133  @param context - sender context, to match reply w/ request
134 */
135 /**define sr_localsids_dump
136 {
137  u32 client_index;
138  u32 context;
139 };*/
140 
141 /** \brief Details about a single SR LocalSID
142  @param context - returned sender context, to match reply w/ request
143  @param localsid_addr IPv6 address of the localsid
144  @param behavior Type of behavior (function) for this localsid
145  @param end_psp Boolean of whether decapsulation is allowed in this function
146  @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table.
147  @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
148  @param fib_table FIB table in which we should install the localsid entry
149  @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect.
150 */
151 /**manual_endian define sr_localsid_details
152 {
153  u32 context;
154  u8 localsid_addr[16];
155  u8 behavior;
156  u8 end_psp;
157  u32 sw_if_index;
158  u32 vlan_index;
159  u32 fib_table;
160  u8 nh_addr[16];
161 };*/
162 
163 /*
164  * fd.io coding-style-patch-verification: ON
165  * Local Variables:
166  * eval: (c-set-style "gnu")
167  * End:
168  */
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.
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.
unsigned int u32
Definition: types.h:88
unsigned char u8
Definition: types.h:56
int sr_policy_del(ip6_address_t *bsid, u32 index)
Delete a SR policy.