blob: 9e9007418b5d7b2b2957dc8b18b425cafa838238 [file] [log] [blame]
Pavel Kotucek0f971d82017-01-03 10:48:54 +01001/*
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 */
Pablo Camarillofb380952016-12-07 18:34:18 +010015
16/** \brief IPv6 SR LocalSID add/del request
Pavel Kotucek0f971d82017-01-03 10:48:54 +010017 @param client_index - opaque cookie to identify the sender
18 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010019 @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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010027*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040028autoreply define sr_localsid_add_del
Pavel Kotucek0f971d82017-01-03 10:48:54 +010029{
30 u32 client_index;
31 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +010032 u8 is_del;
33 u8 localsid_addr[16];
34 u8 end_psp;
35 u8 behavior;
36 u32 sw_if_index;
37 u32 vlan_index;
38 u32 fib_table;
39 u8 nh_addr[16];
40};
41
Pablo Camarillofb380952016-12-07 18:34:18 +010042/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040052autoreply define sr_policy_add
Pablo Camarillofb380952016-12-07 18:34:18 +010053{
54 u32 client_index;
55 u32 context;
56 u8 bsid_addr[16];
57 u32 weight;
58 u8 is_encap;
59 u8 type;
60 u32 fib_table;
Pavel Kotucek0f971d82017-01-03 10:48:54 +010061 u8 n_segments;
Pablo Camarillofb380952016-12-07 18:34:18 +010062 u8 segments[0];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010063};
64
Pablo Camarillofb380952016-12-07 18:34:18 +010065/** \brief IPv6 SR policy modification
Pavel Kotucek0f971d82017-01-03 10:48:54 +010066 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
Pablo Camarillofb380952016-12-07 18:34:18 +010068 @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.
Pavel Kotucek0f971d82017-01-03 10:48:54 +010076*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040077autoreply define sr_policy_mod
Pavel Kotucek0f971d82017-01-03 10:48:54 +010078{
79 u32 client_index;
80 u32 context;
Pablo Camarillofb380952016-12-07 18:34:18 +010081 u8 bsid_addr[16];
82 u32 sr_policy_index;
83 u32 fib_table;
84 u8 operation;
85 u32 sl_index;
86 u32 weight;
87 u8 n_segments;
88 u8 segments[0];
Pavel Kotucek0f971d82017-01-03 10:48:54 +010089};
90
Pablo Camarillofb380952016-12-07 18:34:18 +010091/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040097autoreply define sr_policy_del
Pablo Camarillofb380952016-12-07 18:34:18 +010098{
99 u32 client_index;
100 u32 context;
101 u8 bsid_addr[16];
102 u32 sr_policy_index;
103};
104
Pablo Camarillofb380952016-12-07 18:34:18 +0100105/** \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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400117autoreply define sr_steering_add_del
Pablo Camarillofb380952016-12-07 18:34:18 +0100118{
119 u32 client_index;
120 u32 context;
121 u8 is_del;
122 u8 bsid_addr[16];
123 u32 sr_policy_index;
124 u32 table_id;
125 u8 prefix_addr[16];
126 u32 mask_width;
127 u32 sw_if_index;
128 u8 traffic_type;
129};
130
Pablo Camarillofb380952016-12-07 18:34:18 +0100131/** \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
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100163/*
Pablo Camarillofb380952016-12-07 18:34:18 +0100164 * fd.io coding-style-patch-verification: ON
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100165 * Local Variables:
166 * eval: (c-set-style "gnu")
167 * End:
168 */