FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
sr.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 option version = "1.0.1";
18 
19 /** \brief IPv6 SR LocalSID add/del request
20  @param client_index - opaque cookie to identify the sender
21  @param context - sender context, to match reply w/ request
22  @param is_del Boolean of whether its a delete instruction
23  @param localsid_addr IPv6 address of the localsid
24  @param end_psp Boolean of whether decapsulation is allowed in this function
25  @param behavior Type of behavior (function) for this localsid
26  @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
27  fib_table.
28  @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
29  @param fib_table FIB table in which we should install the localsid entry
30  @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect.
31 */
32 autoreply define sr_localsid_add_del
33 {
37  u8 localsid_addr[16];
43  u8 nh_addr[16];
44 };
45 
46 /** \brief IPv6 SR policy add
47  @param client_index - opaque cookie to identify the sender
48  @param context - sender context, to match reply w/ request
49  @param bsid is the bindingSID of the SR Policy
50  @param weight is the weight of the sid list. optional.
51  @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation)
52  @param type is the type of the SR policy. (0.Default // 1.Spray)
53  @param fib_table is the VRF where to install the FIB entry for the BSID
54  @param segments is a vector of IPv6 address composing the segment list
55 */
56 autoreply define sr_policy_add
57 {
60  u8 bsid_addr[16];
66  u8 segments[0];
67 };
68 
69 /** \brief IPv6 SR policy modification
70  @param client_index - opaque cookie to identify the sender
71  @param context - sender context, to match reply w/ request
72  @param bsid is the bindingSID of the SR Policy
73  @param sr_policy_index is the index of the SR policy
74  @param fib_table is the VRF where to install the FIB entry for the BSID
75  @param operation is the operation to perform (among the top ones)
76  @param segments is a vector of IPv6 address composing the segment list
77  @param sl_index is the index of the Segment List to modify/delete
78  @param weight is the weight of the sid list. optional.
79  @param is_encap Mode. Encapsulation or SRH insertion.
80 */
81 autoreply define sr_policy_mod
82 {
85  u8 bsid_addr[16];
92  u8 segments[0];
93 };
94 
95 /** \brief IPv6 SR policy deletion
96  @param client_index - opaque cookie to identify the sender
97  @param context - sender context, to match reply w/ request
98  @param bsid is the bindingSID of the SR Policy
99  @param index is the index of the SR policy
100 */
101 autoreply define sr_policy_del
102 {
105  u8 bsid_addr[16];
107 };
108 
109 /** \brief IPv6 SR Set SRv6 encapsulation source
110  @param client_index - opaque cookie to identify the sender
111  @param context - sender context, to match reply w/ request
112  @param bsid is the bindingSID of the SR Policy
113  @param index is the index of the SR policy
114 */
115 autoreply define sr_set_encap_source
116 {
119  u8 encaps_source[16];
120 };
121 
122 /** \brief IPv6 SR steering add/del
123  @param client_index - opaque cookie to identify the sender
124  @param context - sender context, to match reply w/ request
125  @param is_del
126  @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
127  @param sr_policy is the index of the SR Policy (alt to bsid)
128  @param table_id is the VRF where to install the FIB entry for the BSID
129  @param prefix is the IPv4/v6 address for L3 traffic type
130  @param mask_width is the mask for L3 traffic type
131  @param sw_if_index is the incoming interface for L2 traffic
132  @param traffic_type describes the type of traffic
133 */
134 autoreply define sr_steering_add_del
135 {
139  u8 bsid_addr[16];
142  u8 prefix_addr[16];
146 };
147 
148 /** \brief Dump the list of SR LocalSIDs
149  @param client_index - opaque cookie to identify the sender
150  @param context - sender context, to match reply w/ request
151 */
152 define sr_localsids_dump
153 {
156 };
157 
158 define sr_localsids_details
159 {
161  u8 address[16];
165  u8 xconnect_next_hop[16];
167 };
168 
169 /*
170  * fd.io coding-style-patch-verification: OFF
171  * Local Variables:
172  * eval: (c-set-style "gnu")
173  * End:
174  */
option version
Definition: sr.api:17
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 short u16
Definition: types.h:57
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.