blob: 2c72cc55ed26bf46c4b43726410db81626923aab [file] [log] [blame]
Dave Barach0d056e52017-09-28 15:11:16 -04001/* Hey Emacs use -*- mode: C -*- */
Pavel Kotucek0f971d82017-01-03 10:48:54 +01002/*
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 */
Pablo Camarillofb380952016-12-07 18:34:18 +010016
Dave Barach0d056e52017-09-28 15:11:16 -040017vl_api_version 1.0.0
18
Pablo Camarillofb380952016-12-07 18:34:18 +010019/** \brief IPv6 SR LocalSID add/del request
Pavel Kotucek0f971d82017-01-03 10:48:54 +010020 @param client_index - opaque cookie to identify the sender
21 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010022 @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
Dave Barach0d056e52017-09-28 15:11:16 -040026 @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the
27 fib_table.
Pablo Camarillofb380952016-12-07 18:34:18 +010028 @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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010031*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040032autoreply define sr_localsid_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +010033{
34 u32 client_index;
35 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +010036 u8 is_del;
37 u8 localsid_addr[16];
38 u8 end_psp;
39 u8 behavior;
40 u32 sw_if_index;
41 u32 vlan_index;
42 u32 fib_table;
43 u8 nh_addr[16];
44};
45
Pablo Camarillofb380952016-12-07 18:34:18 +010046/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040056autoreply define sr_policy_add
Pablo Camarillofb380952016-12-07 18:34:18 +010057{
58 u32 client_index;
59 u32 context;
60 u8 bsid_addr[16];
61 u32 weight;
62 u8 is_encap;
63 u8 type;
64 u32 fib_table;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010065 u8 n_segments;
Pablo Camarillofb380952016-12-07 18:34:18 +010066 u8 segments[0];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010067};
68
Pablo Camarillofb380952016-12-07 18:34:18 +010069/** \brief IPv6 SR policy modification
Pavel Kotucek0f971d82017-01-03 10:48:54 +010070 @param client_index - opaque cookie to identify the sender
71 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010072 @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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010080*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040081autoreply define sr_policy_mod
Pavel Kotucek0f971d82017-01-03 10:48:54 +010082{
83 u32 client_index;
84 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +010085 u8 bsid_addr[16];
86 u32 sr_policy_index;
87 u32 fib_table;
88 u8 operation;
89 u32 sl_index;
90 u32 weight;
91 u8 n_segments;
92 u8 segments[0];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010093};
94
Pablo Camarillofb380952016-12-07 18:34:18 +010095/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400101autoreply define sr_policy_del
Pablo Camarillofb380952016-12-07 18:34:18 +0100102{
103 u32 client_index;
104 u32 context;
105 u8 bsid_addr[16];
106 u32 sr_policy_index;
107};
108
Pablo Camarillofb380952016-12-07 18:34:18 +0100109/** \brief IPv6 SR steering add/del
110 @param client_index - opaque cookie to identify the sender
111 @param context - sender context, to match reply w/ request
112 @param is_del
113 @param bsid is the bindingSID of the SR Policy (alt to sr_policy_index)
114 @param sr_policy is the index of the SR Policy (alt to bsid)
115 @param table_id is the VRF where to install the FIB entry for the BSID
116 @param prefix is the IPv4/v6 address for L3 traffic type
117 @param mask_width is the mask for L3 traffic type
118 @param sw_if_index is the incoming interface for L2 traffic
119 @param traffic_type describes the type of traffic
120*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400121autoreply define sr_steering_add_del
Pablo Camarillofb380952016-12-07 18:34:18 +0100122{
123 u32 client_index;
124 u32 context;
125 u8 is_del;
126 u8 bsid_addr[16];
127 u32 sr_policy_index;
128 u32 table_id;
129 u8 prefix_addr[16];
130 u32 mask_width;
131 u32 sw_if_index;
132 u8 traffic_type;
133};
134
Pablo Camarillofb380952016-12-07 18:34:18 +0100135/** \brief Dump the list of SR LocalSIDs
136 @param client_index - opaque cookie to identify the sender
137 @param context - sender context, to match reply w/ request
138*/
139/**define sr_localsids_dump
140{
141 u32 client_index;
142 u32 context;
143};*/
144
145/** \brief Details about a single SR LocalSID
146 @param context - returned sender context, to match reply w/ request
147 @param localsid_addr IPv6 address of the localsid
148 @param behavior Type of behavior (function) for this localsid
149 @param end_psp Boolean of whether decapsulation is allowed in this function
150 @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table.
151 @param vlan_index Only for L2 xconnect. Outgoing VLAN tag.
152 @param fib_table FIB table in which we should install the localsid entry
153 @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect.
154*/
155/**manual_endian define sr_localsid_details
156{
157 u32 context;
158 u8 localsid_addr[16];
159 u8 behavior;
160 u8 end_psp;
161 u32 sw_if_index;
162 u32 vlan_index;
163 u32 fib_table;
164 u8 nh_addr[16];
165};*/
166
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100167/*
Dave Barach0d056e52017-09-28 15:11:16 -0400168 * fd.io coding-style-patch-verification: OFF
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100169 * Local Variables:
170 * eval: (c-set-style "gnu")
171 * End:
172 */