2 * Copyright (C) 2013 Realtek Semiconductor Corp.
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
10 * Purpose : RTL8367/RTL8367C switch high-level API
12 * Feature : The file includes Leaky module high-layer API defination
16 #ifndef __RTK_API_LEAKY_H__
17 #define __RTK_API_LEAKY_H__
20 typedef enum rtk_leaky_type_e
30 LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS
,
35 LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS
,
83 * type - Packet type for VLAN leaky.
84 * enable - Leaky status.
89 * RT_ERR_FAILED - Failed
90 * RT_ERR_SMI - SMI access error
91 * RT_ERR_INPUT - Invalid input parameters.
92 * RT_ERR_ENABLE - Invalid enable input
94 * This API can set VLAN leaky for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
95 * The leaky frame types are as following:
100 * - LEAKY_UNDEF_BRG_04,
101 * - LEAKY_UNDEF_BRG_05,
102 * - LEAKY_UNDEF_BRG_06,
103 * - LEAKY_UNDEF_BRG_07,
104 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
105 * - LEAKY_UNDEF_BRG_09,
106 * - LEAKY_UNDEF_BRG_0A,
107 * - LEAKY_UNDEF_BRG_0B,
108 * - LEAKY_UNDEF_BRG_0C,
109 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
111 * - LEAKY_UNDEF_BRG_0F,
112 * - LEAKY_BRG_MNGEMENT,
113 * - LEAKY_UNDEFINED_11,
114 * - LEAKY_UNDEFINED_12,
115 * - LEAKY_UNDEFINED_13,
116 * - LEAKY_UNDEFINED_14,
117 * - LEAKY_UNDEFINED_15,
118 * - LEAKY_UNDEFINED_16,
119 * - LEAKY_UNDEFINED_17,
120 * - LEAKY_UNDEFINED_18,
121 * - LEAKY_UNDEFINED_19,
122 * - LEAKY_UNDEFINED_1A,
123 * - LEAKY_UNDEFINED_1B,
124 * - LEAKY_UNDEFINED_1C,
125 * - LEAKY_UNDEFINED_1D,
126 * - LEAKY_UNDEFINED_1E,
127 * - LEAKY_UNDEFINED_1F,
130 * - LEAKY_UNDEF_GARP_22,
131 * - LEAKY_UNDEF_GARP_23,
132 * - LEAKY_UNDEF_GARP_24,
133 * - LEAKY_UNDEF_GARP_25,
134 * - LEAKY_UNDEF_GARP_26,
135 * - LEAKY_UNDEF_GARP_27,
136 * - LEAKY_UNDEF_GARP_28,
137 * - LEAKY_UNDEF_GARP_29,
138 * - LEAKY_UNDEF_GARP_2A,
139 * - LEAKY_UNDEF_GARP_2B,
140 * - LEAKY_UNDEF_GARP_2C,
141 * - LEAKY_UNDEF_GARP_2D,
142 * - LEAKY_UNDEF_GARP_2E,
143 * - LEAKY_UNDEF_GARP_2F,
145 * - LEAKY_IPMULTICAST.
150 extern rtk_api_ret_t
rtk_leaky_vlan_set(rtk_leaky_type_t type
, rtk_enable_t enable
);
157 * type - Packet type for VLAN leaky.
159 * pEnable - Leaky status.
162 * RT_ERR_FAILED - Failed
163 * RT_ERR_SMI - SMI access error
164 * RT_ERR_INPUT - Invalid input parameters.
166 * This API can get VLAN leaky status for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
167 * The leaky frame types are as following:
172 * - LEAKY_UNDEF_BRG_04,
173 * - LEAKY_UNDEF_BRG_05,
174 * - LEAKY_UNDEF_BRG_06,
175 * - LEAKY_UNDEF_BRG_07,
176 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
177 * - LEAKY_UNDEF_BRG_09,
178 * - LEAKY_UNDEF_BRG_0A,
179 * - LEAKY_UNDEF_BRG_0B,
180 * - LEAKY_UNDEF_BRG_0C,
181 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
183 * - LEAKY_UNDEF_BRG_0F,
184 * - LEAKY_BRG_MNGEMENT,
185 * - LEAKY_UNDEFINED_11,
186 * - LEAKY_UNDEFINED_12,
187 * - LEAKY_UNDEFINED_13,
188 * - LEAKY_UNDEFINED_14,
189 * - LEAKY_UNDEFINED_15,
190 * - LEAKY_UNDEFINED_16,
191 * - LEAKY_UNDEFINED_17,
192 * - LEAKY_UNDEFINED_18,
193 * - LEAKY_UNDEFINED_19,
194 * - LEAKY_UNDEFINED_1A,
195 * - LEAKY_UNDEFINED_1B,
196 * - LEAKY_UNDEFINED_1C,
197 * - LEAKY_UNDEFINED_1D,
198 * - LEAKY_UNDEFINED_1E,
199 * - LEAKY_UNDEFINED_1F,
202 * - LEAKY_UNDEF_GARP_22,
203 * - LEAKY_UNDEF_GARP_23,
204 * - LEAKY_UNDEF_GARP_24,
205 * - LEAKY_UNDEF_GARP_25,
206 * - LEAKY_UNDEF_GARP_26,
207 * - LEAKY_UNDEF_GARP_27,
208 * - LEAKY_UNDEF_GARP_28,
209 * - LEAKY_UNDEF_GARP_29,
210 * - LEAKY_UNDEF_GARP_2A,
211 * - LEAKY_UNDEF_GARP_2B,
212 * - LEAKY_UNDEF_GARP_2C,
213 * - LEAKY_UNDEF_GARP_2D,
214 * - LEAKY_UNDEF_GARP_2E,
215 * - LEAKY_UNDEF_GARP_2F,
217 * - LEAKY_IPMULTICAST.
222 extern rtk_api_ret_t
rtk_leaky_vlan_get(rtk_leaky_type_t type
, rtk_enable_t
*pEnable
);
225 * rtk_leaky_portIsolation_set
227 * Set port isolation leaky.
229 * type - Packet type for port isolation leaky.
230 * enable - Leaky status.
235 * RT_ERR_FAILED - Failed
236 * RT_ERR_SMI - SMI access error
237 * RT_ERR_INPUT - Invalid input parameters.
238 * RT_ERR_ENABLE - Invalid enable input
240 * This API can set port isolation leaky for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
241 * The leaky frame types are as following:
246 * - LEAKY_UNDEF_BRG_04,
247 * - LEAKY_UNDEF_BRG_05,
248 * - LEAKY_UNDEF_BRG_06,
249 * - LEAKY_UNDEF_BRG_07,
250 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
251 * - LEAKY_UNDEF_BRG_09,
252 * - LEAKY_UNDEF_BRG_0A,
253 * - LEAKY_UNDEF_BRG_0B,
254 * - LEAKY_UNDEF_BRG_0C,
255 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
257 * - LEAKY_UNDEF_BRG_0F,
258 * - LEAKY_BRG_MNGEMENT,
259 * - LEAKY_UNDEFINED_11,
260 * - LEAKY_UNDEFINED_12,
261 * - LEAKY_UNDEFINED_13,
262 * - LEAKY_UNDEFINED_14,
263 * - LEAKY_UNDEFINED_15,
264 * - LEAKY_UNDEFINED_16,
265 * - LEAKY_UNDEFINED_17,
266 * - LEAKY_UNDEFINED_18,
267 * - LEAKY_UNDEFINED_19,
268 * - LEAKY_UNDEFINED_1A,
269 * - LEAKY_UNDEFINED_1B,
270 * - LEAKY_UNDEFINED_1C,
271 * - LEAKY_UNDEFINED_1D,
272 * - LEAKY_UNDEFINED_1E,
273 * - LEAKY_UNDEFINED_1F,
276 * - LEAKY_UNDEF_GARP_22,
277 * - LEAKY_UNDEF_GARP_23,
278 * - LEAKY_UNDEF_GARP_24,
279 * - LEAKY_UNDEF_GARP_25,
280 * - LEAKY_UNDEF_GARP_26,
281 * - LEAKY_UNDEF_GARP_27,
282 * - LEAKY_UNDEF_GARP_28,
283 * - LEAKY_UNDEF_GARP_29,
284 * - LEAKY_UNDEF_GARP_2A,
285 * - LEAKY_UNDEF_GARP_2B,
286 * - LEAKY_UNDEF_GARP_2C,
287 * - LEAKY_UNDEF_GARP_2D,
288 * - LEAKY_UNDEF_GARP_2E,
289 * - LEAKY_UNDEF_GARP_2F,
291 * - LEAKY_IPMULTICAST.
296 extern rtk_api_ret_t
rtk_leaky_portIsolation_set(rtk_leaky_type_t type
, rtk_enable_t enable
);
299 * rtk_leaky_portIsolation_get
301 * Get port isolation leaky.
303 * type - Packet type for port isolation leaky.
305 * pEnable - Leaky status.
308 * RT_ERR_FAILED - Failed
309 * RT_ERR_SMI - SMI access error
310 * RT_ERR_INPUT - Invalid input parameters.
312 * This API can get port isolation leaky status for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
313 * The leaky frame types are as following:
318 * - LEAKY_UNDEF_BRG_04,
319 * - LEAKY_UNDEF_BRG_05,
320 * - LEAKY_UNDEF_BRG_06,
321 * - LEAKY_UNDEF_BRG_07,
322 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
323 * - LEAKY_UNDEF_BRG_09,
324 * - LEAKY_UNDEF_BRG_0A,
325 * - LEAKY_UNDEF_BRG_0B,
326 * - LEAKY_UNDEF_BRG_0C,
327 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
329 * - LEAKY_UNDEF_BRG_0F,
330 * - LEAKY_BRG_MNGEMENT,
331 * - LEAKY_UNDEFINED_11,
332 * - LEAKY_UNDEFINED_12,
333 * - LEAKY_UNDEFINED_13,
334 * - LEAKY_UNDEFINED_14,
335 * - LEAKY_UNDEFINED_15,
336 * - LEAKY_UNDEFINED_16,
337 * - LEAKY_UNDEFINED_17,
338 * - LEAKY_UNDEFINED_18,
339 * - LEAKY_UNDEFINED_19,
340 * - LEAKY_UNDEFINED_1A,
341 * - LEAKY_UNDEFINED_1B,
342 * - LEAKY_UNDEFINED_1C,
343 * - LEAKY_UNDEFINED_1D,
344 * - LEAKY_UNDEFINED_1E,
345 * - LEAKY_UNDEFINED_1F,
348 * - LEAKY_UNDEF_GARP_22,
349 * - LEAKY_UNDEF_GARP_23,
350 * - LEAKY_UNDEF_GARP_24,
351 * - LEAKY_UNDEF_GARP_25,
352 * - LEAKY_UNDEF_GARP_26,
353 * - LEAKY_UNDEF_GARP_27,
354 * - LEAKY_UNDEF_GARP_28,
355 * - LEAKY_UNDEF_GARP_29,
356 * - LEAKY_UNDEF_GARP_2A,
357 * - LEAKY_UNDEF_GARP_2B,
358 * - LEAKY_UNDEF_GARP_2C,
359 * - LEAKY_UNDEF_GARP_2D,
360 * - LEAKY_UNDEF_GARP_2E,
361 * - LEAKY_UNDEF_GARP_2F,
363 * - LEAKY_IPMULTICAST.
368 extern rtk_api_ret_t
rtk_leaky_portIsolation_get(rtk_leaky_type_t type
, rtk_enable_t
*pEnable
);
370 #endif /* __RTK_API_LEAKY_H__ */