1 /*
2  * Copyright 2021-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef NETC_ETHSWT_IP_H
8 #define NETC_ETHSWT_IP_H
9 
10 /**
11  *   @file Netc_EthSwt_Ip.h
12  *   @addtogroup NETC_ETHSWT_IP NETC_ETHSWT Driver
13  *   @{
14  */
15 
16 #ifdef __cplusplus
17 extern "C"{
18 #endif
19 
20 /*==================================================================================================
21 *                                          INCLUDE FILES
22 * 1) system and project includes
23 * 2) needed interfaces from external units
24 * 3) internal and external interfaces from this unit
25 ==================================================================================================*/
26 #include "Mcal.h"
27 #include "Netc_EthSwt_Ip_Types.h"
28 #include "Netc_EthSwt_Ip_Cfg.h"
29 
30 /*==================================================================================================
31 *                                 SOURCE FILE VERSION INFORMATION
32 ==================================================================================================*/
33 #define NETC_ETHSWT_IP_VENDOR_ID                    43
34 #define NETC_ETHSWT_IP_MODULE_ID                    89
35 #define NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION     4
36 #define NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION     7
37 #define NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION  0
38 #define NETC_ETHSWT_IP_SW_MAJOR_VERSION             1
39 #define NETC_ETHSWT_IP_SW_MINOR_VERSION             0
40 #define NETC_ETHSWT_IP_SW_PATCH_VERSION             0
41 
42 /*==================================================================================================
43 *                                       FILE VERSION CHECKS
44 ==================================================================================================*/
45 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
46 
47 /* Check if current file and Mcal.h header file are of the same Autosar version */
48 #if ((NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
49      (NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION)    \
50     )
51     #error "AutoSar Version Numbers of Netc_EthSwt_Ip.h and Mcal.h are different"
52 #endif
53 #endif
54 
55 /* Checks against Netc_EthSwt_Ip_Types.h */
56 #if (NETC_ETHSWT_IP_VENDOR_ID !=  NETC_ETHSWT_IP_TYPES_VENDOR_ID)
57     #error "Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h have different vendor ids"
58 #endif
59 #if (( NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION    !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
60      ( NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION    !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
61      ( NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_REVISION_VERSION))
62      #error "AUTOSAR Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h are different"
63 #endif
64 #if (( NETC_ETHSWT_IP_SW_MAJOR_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_MAJOR_VERSION) || \
65      ( NETC_ETHSWT_IP_SW_MINOR_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_MINOR_VERSION) || \
66      ( NETC_ETHSWT_IP_SW_PATCH_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_PATCH_VERSION))
67     #error "Software Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h are different"
68 #endif
69 
70 /* Checks against Netc_EthSwt_Ip_Cfg.h */
71 #if (NETC_ETHSWT_IP_VENDOR_ID !=  NETC_ETHSWT_IP_CFG_VENDOR_ID)
72     #error "Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h have different vendor ids"
73 #endif
74 #if (( NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION    !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
75      ( NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION    !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
76      ( NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_REVISION_VERSION))
77      #error "AUTOSAR Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h are different"
78 #endif
79 #if (( NETC_ETHSWT_IP_SW_MAJOR_VERSION !=  NETC_ETHSWT_IP_CFG_SW_MAJOR_VERSION) || \
80      ( NETC_ETHSWT_IP_SW_MINOR_VERSION !=  NETC_ETHSWT_IP_CFG_SW_MINOR_VERSION) || \
81      ( NETC_ETHSWT_IP_SW_PATCH_VERSION !=  NETC_ETHSWT_IP_CFG_SW_PATCH_VERSION))
82     #error "Software Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h are different"
83 #endif
84 /*==================================================================================================
85 *                                            CONSTANTS
86 ==================================================================================================*/
87 #define NETC_ETHSWT_IP_NOMATCHEDPORTMACADDR                (255U)
88 /*==================================================================================================
89 *                                       DEFINES AND MACROS
90 ==================================================================================================*/
91 #define ETHSWT_43_NETC_START_SEC_CONFIG_DATA_UNSPECIFIED
92 #include "EthSwt_43_NETC_MemMap.h"
93 
94 /** @brief   Export NETC ETHSWT configurations. */
95 NETC_ETHSWT_CONFIG_EXT
96 
97 #define ETHSWT_43_NETC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
98 #include "EthSwt_43_NETC_MemMap.h"
99 
100 /* Base address of the registers for the MAC Ports */
101 extern Netc_EthSwt_Ip_PortBaseType* Netc_EthSwt_Ip_PortBaseTable[];
102 
103 /* Base address of the registers for the pseudo Port */
104 extern Netc_EthSwt_Ip_PseudoPortBaseType* Netc_EthSwt_Ip_PseudoPortBaseTable[];
105 extern SW_PORT0_Type *Netc_EthSwt_Ip_SW0_PortxBaseAddr[NETC_ETHSWT_NUMBER_OF_PORTS];
106 
107 /* Ingress Port Filter Entry ID for mirroing */
108 extern uint32 MirroringIngressPortFilterEntryId;
109 
110 #define NETC_ETHSWT_IP_MACADDRLEN  (6U)                             /*!< mac addr length */
111 #define NETC_ETHSWT_IP_BITMAPLEN   (24U)                            /*!< bit map length */
112 #define NETC_ETHSWT_IP_32BIT_SHIFT (32U)                            /*!< 32 bits shift */
113 #define NETC_ETHSWT_IP_24BIT_SHIFT (24U)                            /*!< 24 bits shift */
114 #define NETC_ETHSWT_IP_16BIT_SHIFT (16U)                            /*!< 16 bits shift */
115 #define NETC_ETHSWT_IP_8BIT_SHIFT  (8U)                             /*!< 8 bits shift */
116 
117 #define NETC_ETHSWT_IP_0XFF_MASK                           (0xFFU)
118 #define NETC_ETHSWT_IP_0XFFFF_MASK                         (0xFFFFU)
119 #define NETC_ETHSWT_IP_0XFFFF0000_MASK                     (0xFFFF0000UL)
120 
121 #define NETC_ETHSWT_IP_CBDR_NUM                            (2U)      /*!< number of switch commang ring */
122 #define NETC_ETHSWT_IP_CBDR_0                              (0U)      /*!< switch command ring 0 */
123 #define NETC_ETHSWT_IP_CBDR_1                              (1U)      /*!< switch command ring 1 */
124 
125 #define NETC_ETHSWT_IP_CBDR0_LENGTH                        (2U)      /*!< size of command ring 0. 2 means the size is 16 because it is in sets of 8 BDs */
126 #define NETC_ETHSWT_IP_SET_OF_BD                           (8U)       /*!< set of BD */
127 #define NETC_ETHSWT_IP_ACTUAL_CBDR0_LENGTH                 ((NETC_ETHSWT_IP_CBDR0_LENGTH) * (NETC_ETHSWT_IP_SET_OF_BD)) /*!< CBDR0 length */
128 #define NETC_ETHSWT_IP_CBDR1_LENGTH                        (2U)      /*!< size of command ring 1. 2 means the size is 16 because it is in sets of 8 BDs */
129 #define NETC_ETHSWT_IP_ACTUAL_CBDR1_LENGTH                 ((NETC_ETHSWT_IP_CBDR1_LENGTH) * 8U) /*!< CBDR1 length */
130 
131 #define NETC_ETHSWT_IP_CBD_ALIGNED_SIZE                    (128U)    /*!< 128-byte aligned memory for command buffer descriptors */
132 #define NETC_ETHSWT_IP_TABLE_ALIGNED_SIZE                  (16U)     /*!< 16-byte aligned memory for command tables */
133 
134 /* Macros for NTMP request message header */
135 #define NETC_ETHSWT_IP_CMDBD_REQFMT_PROTOCOL_VERSION       (2U)      /*!< protocol version = 0x2 */
136 #define NETC_ETHSWT_IP_CMDBD_REQFMT_NTMP_PROTOCOL_VERSION  (1U)      /*!< NTMP version is 2.0 */
137 
138 /* MDIO related defines */
139 #define NETC_ETHSWT_IP_MDIO_CLK_DIV                        (200U)   /*!< MDIO clock divisor, it has to be set to 0x40 */
140 #define NETC_ETHSWT_IP_MDIO_REG_READ_FLAG                  (0x80000003U)    /*!< An MDIO transaction is occurring, and MDIO read error occurs */
141 #define NETC_ETHSWT_IP_MDIO_REG_WRITE_FLAG                 (0x80000001U)    /*!< An MDIO transaction is occurring  */
142 /*==================================================================================================
143 *                                              ENUMS
144 ==================================================================================================*/
145 
146 /*==================================================================================================
147 *                                  STRUCTURES AND OTHER TYPEDEFS
148 ==================================================================================================*/
149 
150 /*==================================================================================================
151                                  GLOBAL VARIABLE DECLARATIONS
152 ==================================================================================================*/
153 
154 /*==================================================================================================
155                                      FUNCTION PROTOTYPES
156 ==================================================================================================*/
157 #define ETHSWT_43_NETC_START_SEC_CODE
158 #include "EthSwt_43_NETC_MemMap.h"
159 
160 /**
161 * @brief            Ethernet Switch switch initialization function.
162 * @details          Initializes the indexed swtich with a given configuration for the switch index
163 *                   EthSwt_Ip_Init shall:
164 *                   - Configure all configuration parameters (e.g. port structure, VLAN configuration, ...)
165 *                     at all ports of the switch and the switch itself.
166 *                   - Perform a soft reset
167 *
168 * @param[in]        SwitchIdx   Index of the switch within the context of the Ethernet Switch Driver
169 *                   Config      Structure for the initialization
170 *
171 * @return           Result of the operation
172 * @retval           E_OK        success
173 * @retval           E_NOT_OK    switch could not be initialized
174 */
175 Std_ReturnType Netc_EthSwt_Ip_Init(uint8 SwitchIdx, const Netc_EthSwt_Ip_ConfigType * Config);
176 
177 /**
178 * @brief            Ethernet Switch function to prepare the IPF table for PTP
179 * @details          Add hardcoded entries to the Ingress Port Filter table to redirect frames with PTP-specific DMACs
180 *
181 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
182 *
183 * @return           Result of the operation
184 * @retval           E_OK        success
185 * @retval           E_NOT_OK    entries could not be added
186 */
187 Std_ReturnType Netc_EthSwt_Ip_ConfigIngressPortFilterForTimestamping(uint8 SwitchIdx);
188 
189 /**
190 * @brief            Ethernet Switch read transceiver reg function.
191 * @details          Generic API for reading the content of a transceiver register
192 *
193 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
194 *                   SwitchPortIdx   Index of the port at the addressed switch
195 *                   RegIdx          Index of the register
196 *
197 * @param[out]       RegVal       Pointer to the register content
198 *
199 * @return           Result of the operation
200 * @retval           E_OK        success
201 * @retval           E_NOT_OK    Register could not be read
202 */
203 Std_ReturnType Netc_EthSwt_Ip_ReadTrcvRegister( uint8 SwitchIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 * RegVal );
204 
205 /**
206  * @brief   Ethernet Switch write transceiver reg function.
207  * @details Generic API for writing the content of a transceiver register
208  *
209     @param[in]      SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
210 *                   TrcvIdx         Index of the transceiver referenced by port
211 *                   RegIdx          Index of the register
212 *                   RegVal          Content for the indexed register
213  *
214  * @return Result of the operation
215  * @retval E_OK        success
216  * @retval E_NOT_OK    Register could not be written to
217  *
218  */
219 Std_ReturnType Netc_EthSwt_Ip_WriteTrcvRegister( uint8 SwitchIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal );
220 
221 /**
222  * @brief   Ethernet Switch Set switch port mode function
223  * @details Generic API for enabling/disabling ports
224  *
225     @param[in]      SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
226 *                   SwitchPortIdx   Index of the switch's port which is to be set
227 *                   PortEnable      FALSE: the port of the switch is disabled
228 *                                   TRUE: the port of the switch is enabled
229  *
230  * @return Result of the operation
231  * @retval E_OK        success
232  * @retval E_NOT_OK    The indexed switch port could not be set to PortMode
233  */
234 Std_ReturnType Netc_EthSwt_Ip_SetPortMode(uint8 SwitchIdx,
235                                           uint8 SwitchPortIdx,
236                                           boolean PortEnable);
237 
238 /**
239 * @brief            Ethernet Switch Get switch port mode function.
240 * @details          Obtains the mode of the indexed switch port
241 *                   The function EthSwt_GetPortMode shall read the mode of the indexed port of the switch.
242 *
243 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
244 *                   SwitchPortIdx   Index of the port at the addressed switch
245 *
246 * @param[out]       PortEnable     FALSE: the port of the switch is disabled
247 *                                  TRUE: the port of the switch is enabled
248 *
249 * @return           Result of the operation
250 * @retval           E_OK        success
251 * @retval           E_NOT_OK    The mode of the indexed switch port could not be obtained.
252 */
253 Std_ReturnType Netc_EthSwt_Ip_GetPortMode( uint8 SwitchIdx,
254                                            uint8 SwitchPortIdx,
255                                            boolean *PortEnable
256                                            );
257 
258 /**
259 * @brief            Ethernet Switch get baud rate function.
260 * @details          Obtains the baud rate of the indexed switch port
261 *                   The function EthSwt_GetBaudRate shall read the current baud rate of the indexed switch port.
262 *
263 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
264 *                   SwitchPortIdx   Index of the port at the addressed switch
265 *
266 * @param[out]       BaudRate     ETHTRCV_BAUD_RATE_10MBIT: 10MBit connection
267 *                                ETHTRCV_BAUD_RATE_100MBIT: 100MBit connection
268 *                                ETHTRCV_BAUD_RATE_1000MBIT: 1000MBit connection
269 *
270 * @return           Result of the operation
271 * @retval           E_OK        success
272 * @retval           E_NOT_OK    Baud rate of the indexed switch port could not be obtained
273 */
274 Std_ReturnType Netc_EthSwt_Ip_GetPortSpeed( uint8 SwitchIdx,
275                                             uint8 SwitchPortIdx,
276                                             EthTrcv_BaudRateType * BaudRate
277                                           );
278 
279 /**
280 * @brief            Ethernet Switch set baud rate function.
281 * @details          Set the baud rate of the indexed switch port
282 *                   The function EthSwt_SetBaudRate shall set the current baud rate of the indexed switch port.
283 *
284 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
285 *                   SwitchPortIdx   Index of the port at the addressed switch
286 *                   BaudRate     ETHTRCV_BAUD_RATE_10MBIT: 10MBit connection
287 *                                ETHTRCV_BAUD_RATE_100MBIT: 100MBit connection
288 *                                ETHTRCV_BAUD_RATE_1000MBIT: 1000MBit connection
289 *
290 * @return           Result of the operation
291 * @retval           E_OK        success
292 * @retval           E_NOT_OK    Baud rate of the indexed switch port could not be changed
293 */
294 Std_ReturnType Netc_EthSwt_Ip_SetPortSpeed( uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType BaudRate);
295 
296 /**
297 * @brief            Ethernet Switch get duplex mode function.
298 * @details          Obtains the duplex mode of the indexed switch port
299 *                   The function EthSwt_GetDuplexMode shall read the current duplex mode of the indexed switch
300 *                   port.
301 *
302 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
303 *                   SwitchPortIdx   Index of the port at the addressed switch
304 *
305 * @param[out]       DuplexModePtr   ETHTRCV_DUPLEX_MODE_HALF: half duplex connections
306 *                                   ETHTRCV_DUPLEXMODE_FULL: full duplex connection
307 *
308 * @return           Result of the operation
309 * @retval           E_OK        success
310 * @retval           E_NOT_OK    duplex mode of the indexed switch port could not be obtained
311 */
312 Std_ReturnType Netc_EthSwt_Ip_GetDuplexMode( uint8 SwitchIdx,
313                                              uint8 SwitchPortIdx,
314                                              EthTrcv_DuplexModeType * DuplexMode
315                                            );
316 
317 /**
318  * @brief       This function sets the MAC address of a certain
319  * @details     This will be used to set the MAC address asignated to a certain port of the switch
320  *
321  * @param[in]  SwitchIndex  the index of the switch
322  * @param[in]  PortIndex    the index of the port
323  * @param[in]  MacAddr      The physical address of the port
324  *
325  * @return     Result of the operation
326  * @retval     E_OK       Success
327  * @retval     E_NOT_OK   MAC Address could not be changed
328  */
329 Std_ReturnType Netc_EthSwt_Ip_SetMacAddr(uint8 SwitchIdx, uint8 PortIndex, const uint8 *MacAddr);
330 
331 /**
332  * @brief       This function reads the MAC address of a certain port
333  * @details     This will be used to read the MAC address asignated to a certain port of the switch
334  *
335  * @param[in]  SwitchIndex  the index of the switch
336  * @param[in]  PortIndex    the index of the port
337  * @param[out] MacAddr      The physical address of the port
338  */
339 void Netc_EthSwt_Ip_GetMacAddr(uint8 SwitchIdx, uint8 PortIndex, uint8 *MacAddr);
340 
341 /**
342 * @brief            Ethernet Switch get port MAC address function.
343 * @details          Obtains the port over which this MAC-address at the indexed switch can be reached.
344 *                   The result might be used for a DHCP-server which will need the port - MAC-resolution.
345 *                   If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot
346 *                   be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK.
347 *
348 * @param[in]        SwitchIdx    The switch index
349 *                   cbdrIndex:   Index of switch command BD rings
350 *                   Fid:         Filtering ID
351 *                   MacAddr      MAC-address for which a switch port is searched over which the node with this
352 *                                MAC-address can be reached.
353 *
354 * @param[out]       PortIdxPtr      Pointer to the port index
355 *
356 * @return           Result of the operation
357 * @retval           E_OK        success
358 * @retval           E_NOT_OK    multiple ports were found
359 */
360 Std_ReturnType Netc_EthSwt_Ip_GetPortMacAddr( uint8 SwitchIdx, uint16 Fid, const uint8 * MacAddr, uint8 * PortIdx);
361 
362 
363 /**
364 * @brief            Ethernet Switch get counter values function.
365 * @details          Reads a list with drop counter values of the corresponding port of the switch.
366 *                   The meaning of these values is described at Netc_EthSwt_Ip_CounterType.
367 *
368 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
369 *                   SwitchPortIdx   Index of the port at the addressed switch
370 *
371 * @param[out]       Counter      counter values. The meaning of these values is described at Netc_EthSwt_Ip_CounterType
372 *
373 * @return           Result of the operation
374 * @retval           E_OK        success
375 * @retval           E_NOT_OK    counter values read failure
376 */
377 Std_ReturnType Netc_EthSwt_Ip_GetCounters( uint8 SwitchIdx, uint8 SwitchPortIdx, Netc_EthSwt_Ip_CounterType *Counter );
378 
379 /**
380  * @brief         Ethernet Switch get single counter value function.
381  * @details       Reads a single drop counter value of the corresponding port of the switch.
382  *                The meaning of these values is described at Netc_EthSwt_Ip_SingleCounterType.
383  *
384  * @param[in]     SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
385  *                SwitchPortIdx   Index of the port at the addressed switch
386  *
387  * @param[in]    Counter         single counter register offset
388  *
389  * @return       Single counter value. The meaning of these values is described at Netc_EthSwt_Ip_SingleCounterType.
390  */
391 Netc_EthSwt_Ip_CounterValueType Netc_EthSwt_Ip_GetCounter( uint8 SwitchIdx, uint8 SwitchPortIdx, Netc_EthSwt_Ip_SingleCounterType Counter );
392 
393 /**
394 * @brief            Ethernet switch enable VLAN function.
395 * @details          Enables or disables a pre-configured VLAN at a certain port of a switch.
396 *
397 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
398 *                   SwitchPortIdx   Index of the port at the addressed switch
399 *                   VlanId          VLAN-ID to a preconfigured configuration on the given ingress port
400 *                   Enable          1 = VLAN-configuration enabled
401 *                                   0 = VLAN-configuration disabled (frames with given VLAN-ID will be dropped)
402 *
403 * @return           Result of the operation
404 * @retval           E_OK        success
405 * @retval           E_NOT_OK    Query command error or no mached Vlan ID entry found
406 */
407 Std_ReturnType Netc_EthSwt_Ip_EnableVlan( uint8 SwitchIdx, uint8 SwitchPortIdx, uint16 VlanId, boolean Enable );
408 
409 /**
410 * @brief            Ethernet switch set MAC learning mode function.
411 * @details          Sets the MAC learning mode in one of the tree modes:
412 *                   1) HW learning enabled
413 *                   2) Hardware learning disabled
414 *
415 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
416 * @param[in]        MacLearningMode Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware
417 *
418 * @return           Result of the operation
419 * @retval           E_OK        success
420 * @retval           E_NOT_OK    MAC learning mode could not be set
421 */
422 Std_ReturnType Netc_EthSwt_Ip_SetMacLearningMode( uint8 SwitchIdx, Netc_EthSwt_Ip_MacLearningOptionType MacLearningMode );
423 
424 /**
425 * @brief            Ethernet switch get MAC learning mode function.
426 * @details          Returns the MAC learning mode:
427 *                   1) HW learning enabled
428 *                   2) Hardware learning disabled
429 *
430 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
431 *
432 * @param[out]       MacLearningMode Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware
433 *
434 * @return           Result of the operation
435 * @retval           E_OK        success
436 * @retval           E_NOT_OK    MAC learning mode could not be read
437 */
438 Std_ReturnType Netc_EthSwt_Ip_GetMacLearningMode( uint8 SwitchIdx, Netc_EthSwt_Ip_MacLearningOptionType * MacLearningMode );
439 
440 /**
441 * @brief            Ethernet switch get loopback state function.
442 * @details          Obtain the current status of the port loopback for the indexed external Ethernet switch port
443 *
444 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
445 * @param[in]        SwitchPortIdx   Index of the port at the addressed switch
446 *
447 * @param[out]       LoopbackEnable  Pointer to the memory where the port loopback mode true/false
448 *
449 * @return           Result of the operation
450 * @retval           E_OK        the requested port loopback state for the indexed Ethernet switch port was set successfully.
451 * @retval           E_NOT_OK    the port loopback configuration for the indexed Ethernet switch returned not successfully.
452 *                               (i.e. indexed ethernet switch is not available)
453 */
454 Std_ReturnType Netc_EthSwt_Ip_PortGetLoopbackMode( uint8 SwitchIdx,
455                                                    uint8 SwitchPortIdx,
456                                                    boolean * LoopbackEnable
457                                                   );
458 
459 /**
460 * @brief            Ethernet switch set loopback state function.
461 * @details          Set the current state of port loopback for the indexed Ethernet external switch port
462 *
463 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
464 *                   SwitchPortIdx   Index of the port at the addressed switch
465 *                   LoopbackEnable  Contain the requested port loopback mode
466 *
467 * @return           Result of the operation
468 * @retval           E_OK        the port loopback state for the indexed Ethernet switch port was set successfully.
469 * @retval           E_NOT_OK    the port loopback configuration for the indexed Ethernet switch was not set successfully.
470 *                               (i.e. indexed ethernet switch is not available)
471 */
472 Std_ReturnType Netc_EthSwt_Ip_PortSetLoopbackMode( uint8 SwitchIdx,
473                                                    uint8 SwitchPortIdx,
474                                                    boolean LoopbackEnable
475                                                   );
476 
477 /**
478  * @brief            Reset configuration of switch
479  * @details          External function for reseting the learned entries from the FDB table of the switch..
480  *
481  * @param[in]        SwitchIdx  Index of the switch within the context of the Ethernet Switch Driver
482  *
483  * @return           Result of the operation
484  * @retval           E_OK :  reset dynamic FDB entries successfully
485  * @retval           E_NOT_OK : fail to reset dynamic FDB entries
486  */
487 Std_ReturnType Netc_EthSwt_Ip_ResetConfiguration(uint8 SwitchIdx);
488 
489 /**
490  * @brief            Get Fdb Table Entry List function
491  * @details          External function for getting existing FDB table entries in command ring 0.
492  *                   Provide the static entries first and then the dynamic entries if the value of NumberOfElements is not 0.
493  *
494  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
495  * @param[in]        NumberOfElements Maximum number of entries which can be written into the FdbTableList
496  * @param[out]       NumberOfElements Number of available entries which are currently be written into the FdbTableList
497  * @param[out]       FdbTableList     A pointer points to a list of FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
498  *
499  * @return           Result of the operation
500  * @retval           0 :  success
501  * @retval           others : fail
502  */
503 Std_ReturnType Netc_EthSwt_Ip_GetFdbTable(uint8 SwitchIdx, uint16 * NumberOfElements, Netc_EthSwt_Ip_FdbEntryDataType * FdbTableList);
504 
505 /**
506  * @brief            Search Fdb Table Entry function
507  * @details          External function for searching existing FDB table entries one by one in command ring 0.
508  *
509  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
510  * @param[in]        ResumeEntryId      To start the search, ResumeEntryId should be set to 0xFFFFFFFF
511  * @param[in]        SearchCriteriaData The data of match criteria and match data. To start a specific search, you have to fill in SearchCriteriaData with Netc_EthSwt_Ip_FDBTableMatchCriteriaDataType
512  *                                      and its corresponding match data (ACTE data, CFGE data or KEYE data).
513  * @param[out]       ResumeEntryId      The next valid Entry ID that is used to continue the search. If ResumeEntryId equals 0xFFFFFFFF, then that means (a)the search is completed
514  *                                      or (b)there is no matched entry found.
515  * @param[out]       FdbTableEntry      A pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType.
516  *
517  * @return           Result of the operation
518  * @retval           0 :  success
519  * @retval           others : fail
520  */
521 Std_ReturnType Netc_EthSwt_Ip_SearchFdbTable( uint8 SwitchIdx,
522                                               uint32 * ResumeEntryId,
523                                               const Netc_EthSwt_Ip_FDBTableSearchCriteriaDataType * SearchCriteriaData,
524                                               Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
525                                             );
526 
527 /**
528  * @brief            Query Fdb Table Entry function
529  * @details          External function for querying one FDB entry with "Exact Match Key Element Match" access method.
530  *                   That means only "Exact Match Key Element Match" access method is supported.
531  *
532  * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
533  * @param[out]       MatchedEntries  Number of matched entry
534  * @param[in]        FdbTableEntry   Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
535  *                                   which provides the data for "query" operation
536  * @param[out]       FdbTableEntry   A pointer that returns the data of a matched entry by "query" operation
537  *                                   The data is valid only when MatchedEntries equals 1.
538  *
539  * @return           Result of the operation
540  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
541  * @retval           others : fail
542  */
543 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryFdbTableEntry( uint8 SwitchIdx,
544                                                                  uint32 *MatchedEntries,
545                                                                  Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
546                                                                );
547 
548 /**
549  * @brief            Delete Fdb Table Entry function
550  * @details          External function for deleting one FDB entry with "Exact Match Key Element Match" access method.
551  *                   That means only "Exact Match Key Element Match" access method is supported.
552  *
553  * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
554  * @param[out]       MatchedEntries  Number of matched entry
555  * @param[in]        FdbTableEntry   Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
556  *
557  * @return           Result of the operation
558  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
559  * @retval           others : fail
560  */
561 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteFdbTableEntry( uint8 SwitchIdx,
562                                                                   uint32 *MatchedEntries,
563                                                                   const Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
564                                                                 );
565 
566 /**
567  * @brief            Add or Update Fdb Table Entry function
568  * @details          External function for adding or updating one FDB entry with "Exact Match Key Element Match" access method.
569  *                   That means only "Exact Match Key Element Match" access method is supported.
570  *
571  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
572  * @param[in]        Cmd              Add, Update and AddOrUpdate commands are supported
573  * @param[out]       MatchedEntries   Number of matched entries
574  * @param[in]        FdbTableEntry    Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
575  *
576  * @return           Result of the operation
577  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
578  * @retval           others : fail
579  */
580 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateFdbTableEntry( uint8 SwitchIdx, Netc_EthSwt_Ip_CommandsType Cmd, uint32 *MatchedEntries, const Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry);
581 
582 /**
583  * @brief   Query the Switch Hardware Version
584  * @details External function for Query Switch Hardware Version
585  *
586  * @param[in]  SwitchIdx  Index of the switch within the context of the Ethernet Switch Driver
587  * @param[out] HwVersion  The switch hardware version.
588  *
589  * @return Result of the operation
590  * @retval E_OK : success
591  */
592 Std_ReturnType Netc_EthSwt_Ip_GetSwitchIdentifier(uint8 SwitchIdx, uint32 *HwVersion);
593 
594 /**
595  * @brief            Get Vlan filter Table Entry List function
596  * @details          External function for getting existing Vlan filter table entries in command ring 0.
597  *
598  * @param[in]        SwitchIdx               Index of the switch within the context of the Ethernet Switch Driver
599  * @param[in]        NumberOfElements        Maximum number of entries which can be written into the VlanFilterTableList
600  * @param[out]       NumberOfElements        Number of available entries which are currently be written into the VlanFilterTableList
601  * @param[out]       VlanFilterTableList     A pointer points to a list of Vlan filter entry structure Netc_EthSwt_Ip_VlanFilterEntryDataType
602  *
603  * @return           Result of the operation
604  * @retval           0 :  success
605  * @retval           others : fail
606  */
607 Std_ReturnType Netc_EthSwt_Ip_GetVlanFilterTable( uint8 SwitchIdx, uint16 * NumberOfElements, Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableList );
608 
609 /**
610  * @brief            Add or Update Vlan Filter Table Entry function
611  * @details          External function for adding or updating one Vlan Filter entry to command ring with "Exact Match Key Element Match" access method.
612  *                   That means only "Exact Match Key Element Match" access method is supported.
613  *
614  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
615  * @param[in]        Cmd                    Add, Update and AddOrUpdate commands are supported
616  * @param[out]       MatchedEntries         Number of matched entries
617  * @param[in]        VlanFilterTableEntry:  Pointer points to a Vlan Filter entry structure Netc_EthSwt_Ip_VlanFilterEntryDataType
618  *
619  * @return           Result of the operation
620  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
621  * @retval           others : fail
622  */
623 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateVlanFilterTableEntry( uint8 SwitchIdx,
624                                                                               Netc_EthSwt_Ip_CommandsType Cmd,
625                                                                               uint32 *MatchedEntries,
626                                                                               const Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableEntry
627                                                                             );
628 
629 /**
630  * @brief            Query Vlan Filter Table Entry function
631  * @details          External function for querying one Vlan Filter entry with "full query" and "Exact Match Key Element Match" access method.
632  *                   That means only "Exact Match Key Element Match" access method is supported.
633  *
634  * @param[in]        SwitchIdx                Index of the switch within the context of the Ethernet Switch Driver
635  * @param[out]       MatchedEntries           Number of matched entries
636  * @param[in]        VlanFilterTableEntry:    A pointer that provides the data needed by "query" operation, like Vlan Filter entry Id
637  * @param[out]       VlanFilterTableEntry:    A pointer that returns the data of a matched entry by "query" operation
638  *                                            The data is valid only when MatchedEntries equals 1.
639  *
640  * @return           Result of the operation
641  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
642  * @retval           others : fail
643  */
644 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryVlanFilterTableEntry( uint8 SwitchIdx,
645                                                                         uint32 *MatchedEntries,
646                                                                         Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableEntry
647                                                                       );
648 
649 /**
650  * @brief            Delete Vlan Filter Table Entry function
651  * @details          External function for deleting one Vlan Filter entry with "Exact Match Key Element Match" access method.
652  *
653  * @param[in]        SwitchIdx                Index of the switch within the context of the Ethernet Switch Driver
654  * @param[out]       MatchedEntries           Number of matched entries
655  * @param[in]        VlanFilterTableEntryId:  Vlan Filter entry Id
656  *
657  * @return           Result of the operation
658  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
659  * @retval           others : fail
660  */
661 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteVlanFilterTableEntry( uint8 SwitchIdx,
662                                                                          uint32 *MatchedEntries,
663                                                                          uint32 VlanFilterTableEntryId
664                                                                        );
665 
666 /**
667  * @brief            Query Egress Count Table Entry function
668  * @details          External function for querying one Egress Count entry with "Entry Id Match" access method.
669  *
670  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
671  * @param[out]       EntryId                Egress Counter Entry ID (EC_EID), an index to an entry in Egress Count Table.
672  *                                          The EC_EID is specified in the Egress Treatment table.
673  * @param[out]       MatchedEntries         Number of matched entries
674  * @param[out]       StatisticsData:        Pointer points to an Egress Count entry structure Netc_EthSwt_Ip_ECTableStatisticsDataType.
675  *                                          It contains the data of Enqueued Frame Count and Rejected Frame Count.
676  *
677  * @return           Result of the operation
678  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
679  * @retval           others : fail
680  */
681 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressCountTableEntry( uint8 SwitchIdx,
682                                                                          uint32 EntryId,
683                                                                          uint32 *MatchedEntries,
684                                                                          Netc_EthSwt_Ip_ECTableStatisticsDataType *StatisticsData
685                                                                        );
686 
687 /**
688  * @brief            Reset Egress Count Table Entry function
689  * @details          External function for reseting one Egress Count entry with "Entry Id Match" access method.
690  *
691  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
692  * @param[out]       EntryId                Egress Counter Entry ID (EC_EID), an index to an entry in Egress Count Table.
693  *                                          The EC_EID is specified in the Egress Treatment table.
694  * @param[out]       MatchedEntries         Number of matched entries.
695  *                                          1: found a matched entry and reset the statistics data of the entry successfully.
696  *                                          0: no matched entry found.
697  *
698  * @return           Result of the operation
699  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
700  * @retval           others : fail
701  */
702 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_ResetEgressCountTableEntry( uint8 SwitchIdx,
703                                                                          uint32 EntryId,
704                                                                          uint32 *MatchedEntries
705                                                                        );
706 
707 /**
708  * @brief            Add or Update Egress Treatment Table Entry function
709  * @details          External function for adding or updating one Egress Treatment entry to command ring with "Entry Id Match" access method.
710  *                   That means only "Entry Id Match" access method is supported.
711  *
712  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
713  * @param[in]        Cmd                        Add, Update and AddOrUpdate commands are supported
714  * @param[out]       MatchedEntries             Number of matched entries
715  * @param[in]        EgressTreatmentTableEntry: Pointer points to a Egress Treatment entry structure Netc_EthSwt_Ip_EgressTreatmentEntryDataType
716  *
717  * @return           Result of the operation
718  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
719  * @retval           others : fail
720  */
721 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateEgressTreatmentTableEntry( uint8 SwitchIdx,
722                                                                                    Netc_EthSwt_Ip_CommandsType Cmd,
723                                                                                    uint32 *MatchedEntries,
724                                                                                    const Netc_EthSwt_Ip_EgressTreatmentEntryDataType * EgressTreatmentTableEntry
725                                                                                  );
726 
727 /**
728  * @brief            Query Egress Treatment Table Entry function
729  * @details          External function for querying one Egress Treatment entry with "Entry Id Match" access method.
730  *
731  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
732  * @param[in]        EgressTreatmentTableEntry      A pointer that provides the data needed by "query" operation
733  * @param[out]       MatchedEntries                 Number of matched entries
734  * @param[out]       EgressTreatmentTableEntry      A pointer that returns the data of a matched entry by "query" operation
735  *                                                  The data is valid only when MatchedEntries equals 1.
736  *
737  * @return           Result of the operation
738  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
739  * @retval           others : fail
740  */
741 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressTreatmentTableEntry( uint8 SwitchIdx,
742                                                                              uint32 *MatchedEntries,
743                                                                              Netc_EthSwt_Ip_EgressTreatmentEntryDataType * EgressTreatmentTableEntry
744                                                                            );
745 
746 /**
747  * @brief            Delete Egress Treatment Table Entry function
748  * @details          External function for deleting one Egress Treatment entry with "Entry Id Match" access method.
749  *
750  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
751  * @param[in]        EgressTreatmentTableEntryId    Egress Treatment Entry ID, an index to an entry in Egress Treatment Table.
752  * @param[out]       MatchedEntries                 Number of matched entries
753  *
754  * @return           Result of the operation
755  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
756  * @retval           others : fail
757  */
758 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteEgressTreatmentTableEntry( uint8 SwitchIdx,
759                                                                               uint32 EgressTreatmentTableEntryId,
760                                                                               uint32 *MatchedEntries
761                                                                             );
762 /**
763  * @brief            Add or Update Frame Modification Table Entry function
764  * @details          External function for adding or updating one Frame Modification entry to command ring with "Entry Id Match" access method.
765  *                   That means only "Entry Id Match" access method is supported.
766  *
767  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
768  * @param[in]        Cmd                        Add, Update and AddOrUpdate commands are supported
769  * @param[out]       MatchedEntries             Number of matched entries
770  * @param[in]        FrmModificationTableEntry: Pointer points to a Frame Modification entry structure Netc_EthSwt_Ip_FrmModificationEntryDataType
771  *
772  * @return           Result of the operation
773  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
774  * @retval           others : fail
775  */
776 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateFrmModificationTableEntry( uint8 SwitchIdx,
777                                                                                    Netc_EthSwt_Ip_CommandsType Cmd,
778                                                                                    uint32 *MatchedEntries,
779                                                                                    const Netc_EthSwt_Ip_FrmModificationEntryDataType * FrmModificationTableEntry
780                                                                                  );
781 
782 /**
783  * @brief            Query Frame Modification Table Entry function
784  * @details          External function for querying one Frame Modification entry with "Entry Id Match" access method.
785  *
786  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
787  * @param[in]        FrmModificationTableEntry      A pointer that provides the data needed by "query" operation
788  * @param[out]       MatchedEntries                 Number of matched entries
789  * @param[out]       FrmModificationTableEntry      A pointer that returns the data of a matched entry by "query" operation
790  *                                                  The data is valid only when MatchedEntries equals 1.
791  *
792  * @return           Result of the operation
793  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
794  * @retval           others : fail
795  */
796 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryFrmModificationTableEntry( uint8 SwitchIdx,
797                                                                              uint32 *MatchedEntries,
798                                                                              Netc_EthSwt_Ip_FrmModificationEntryDataType * FrmModificationTableEntry
799                                                                             );
800 
801 /**
802  * @brief            Delete Frame Modification Table Entry function
803  * @details          External function for deleting one Frame Modification entry with "Entry Id Match" access method.
804  *
805  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
806  * @param[in]        FrmModificationEntryID         Frame Modification Entry ID, an index to an entry in Frame Modification Table.
807  * @param[out]       MatchedEntries                 Number of matched entries
808  *
809  * @return           Result of the operation
810  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
811  * @retval           others : fail
812  */
813 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteFrmModificationTableEntry( uint8 SwitchIdx,
814                                                                               uint32 FrmModificationEntryID,
815                                                                               uint32 *MatchedEntries
816                                                                             );
817 
818 /**
819  * @brief            Add Ingress Port Filter Table Entry function
820  * @details          External function for adding ingress port filter table entry to command ring with "NETC_ETHSWT_TERNARY_MATCH_KEY_ELEMENT_MATCH" access method.
821  *
822  * @param[in]        SwitchIdx                    Index of the switch within the context of the Ethernet Switch Driver
823  * @param[out]       MatchedEntries               Number of matched entries
824  * @param[in]        IngressPortFilterTableEntry  Pointer points to an ingress port filter table entry structure Netc_EthSwt_Ip_IngressPortFilterEntryDataType
825  *
826  * @return           Result of the operation
827  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
828  * @retval           others : fail
829  */
830 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddIngressPortFilterTableEntry( uint8 SwitchIdx,
831                                                                              uint32 *MatchedEntries,
832                                                                              Netc_EthSwt_Ip_IngressPortFilterEntryDataType * IngressPortFilterTableEntry
833                                                                            );
834 
835 /**
836  * @brief            Query Ingress Port Filter Table Entry function
837  * @details          External function for querying one Ingress Port Filter Table entry with "Entry Id Match" access method.
838  *
839  * @param[in]        SwitchIdx                        Index of the switch within the context of the Ethernet Switch Driver
840  * @param[in]        IngressPortFilterTableEntry      A pointer that provides the data needed by "query" operation, Entry_ID specifically
841  * @param[out]       MatchedEntries                   Number of matched entries
842  * @param[out]       IngressPortFilterTableEntry      A pointer that returns the data of a matched entry by "query" operation
843  *                                                    The data is valid only when MatchedEntries equals 1.
844  *
845  * @return           Result of the operation
846  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
847  * @retval           others : fail
848  */
849 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressPortFilterTableEntry( uint8 SwitchIdx,
850                                                                                uint32 *MatchedEntries,
851                                                                                Netc_EthSwt_Ip_IngressPortFilterEntryDataType * IngressPortFilterTableEntry
852                                                                              );
853 
854 /**
855  * @brief            Delete Ingress Port Filter Table Entry function
856  * @details          External function for deleting one Ingress Port Filter entry with "Entry Id Match" access method.
857  *
858  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
859  * @param[in]        IngressPortFilterEntry         Ingress Port Filter Entry ID
860  * @param[out]       MatchedEntries                 Number of matched entries
861  *
862  * @return           Result of the operation
863  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
864  * @retval           others : fail
865  */
866 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressPortFilterTableEntry( uint8 SwitchIdx,
867                                                                                 uint32 *MatchedEntries,
868                                                                                 uint32 IngressPortFilterEntry
869                                                                               );
870 
871 /**
872  * @brief            Enable Ingress Port Filter Table Entry lookup function for ports
873  * @details          External function for enabling Ingress Port Filter entry lookup functions for ports.
874  *
875  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
876  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
877  * @param[in]        Enable                         Enable or disable the lookup function
878  *
879  * @return           Result of the operation
880  * @retval           E_OK : success
881  * @retval           others : fail
882  */
883 Std_ReturnType Netc_EthSwt_Ip_EnableIngressPortFiltering( uint8 SwitchIdx, uint8 SwitchPortIdx, boolean Enable );
884 
885 /**
886  * @brief            Enable/disable Switch mirroring
887  * @details          External function for setting mirroring state for the switch.
888  *
889  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
890  * @param[in]        MirrorState                    0: switch mirroring disabled. 1: switch mirroring enabled.
891  *
892  * @return           Result of the operation
893  * @retval           E_OK : success
894  * @retval           others : fail
895  */
896 Std_ReturnType Netc_EthSwt_Ip_SetMirrorState( uint8 SwitchIdx, Netc_EthSwt_Ip_SwitchMirrorStateType MirrorState );
897 
898 /**
899  * @brief            Obtain Switch mirroring state
900  * @details          External function for obtaining mirroring state of the switch.
901  *
902  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
903  * @param[out]       MirrorStatePtr                 0: switch mirroring disabled. 1: switch mirroring enabled.
904  *
905  * @return           Result of the operation
906  * @retval           E_OK : success
907  * @retval           others : fail
908  */
909 Std_ReturnType Netc_EthSwt_Ip_GetMirrorState( uint8 SwitchIdx, Netc_EthSwt_Ip_SwitchMirrorStateType *MirrorStatePtr );
910 
911 /**
912  * @brief            Write mirror configuration
913  * @details          External function for writing mirror configuration to the switch.
914  *
915  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
916  * @param[in]        MirrorConfigurationPtr         A Netc_EthSwt_Ip_SwitchMirrorCfgType pointer with the configuration data of mirroring
917  *
918  * @return           Result of the operation
919  * @retval           E_OK : success
920  * @retval           others : fail
921  */
922 Std_ReturnType Netc_EthSwt_Ip_WriteMirrorConfiguration( uint8 MirroredSwitchIdx, const Netc_EthSwt_Ip_SwitchMirrorCfgType* MirrorConfigurationPtr );
923 
924 /**
925  * @brief            Read mirror configuration
926  * @details          External function for obtaining mirror configuration of the switch.
927  *
928  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
929  * @param[out]       MirrorConfigurationPtr         A Netc_EthSwt_Ip_SwitchMirrorCfgType pointer with the configuration data of mirroring
930  *
931  * @return           Result of the operation
932  * @retval           E_OK : success
933  * @retval           others : fail
934  */
935 Std_ReturnType Netc_EthSwt_Ip_ReadMirrorConfiguration( uint8 MirroredSwitchIdx, Netc_EthSwt_Ip_SwitchMirrorCfgType* MirrorConfigurationPtr );
936 
937 /**
938  * @brief            Delete mirror configuration
939  * @details          External function for deleting the mirror configuration of the switch.
940  *
941  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
942  *
943  * @return           Result of the operation
944  * @retval           E_OK : success
945  * @retval           others : fail
946  */
947 Std_ReturnType Netc_EthSwt_Ip_DeleteMirrorConfiguration( uint8 MirroredSwitchIdx );
948 
949 /**
950  * @brief            Set the credit based shaper slope
951  * @details          Set the idle slope for the credit based shaper
952  *
953  * Parameters:
954  * -[in]     SwitchIdx           Index of the switch within the context of the Ethernet Switch Driver
955  * -[in]     SwitchPortIdx   Index of the port at the addressed switch
956  * -[in]     TrafficClass        The value range is 0 to 7
957  * -[in]     idleSlope            Idleslope is the rate of credits that is accumulated (in bits per second)  when there  is  at  least  one packet waiting for transmission.
958  *
959  * @return           Result of the operation
960  * @retval           E_OK : success
961  * @retval           others : fail
962  */
963 Std_ReturnType Netc_EthSwt_Ip_ConfigureCreditBasedShaper(uint8 SwitchIdx, const uint8 SwitchPortIdx, const uint8 TrafficClass, const uint64 idleSlope);
964 
965 /**
966  * @brief            Enable credit based shaper
967  * @details          The credit base shaper TrafficClass is Enable/Disable
968  *
969  * Parameters:
970  * -[in]     SwitchIdx            Index of the switch within the context of the Ethernet Switch Driver
971  * -[in]     SwitchPortIdx    Index of the port at the addressed switch
972  * -[in]     TrafficClass         The value range is 0 to 7
973  * -[in]     Enable                  TRUE: enable credit based shaper on the port. FALSE: disable credit based shaper on the port.
974  *
975  * @return           Result of the operation
976  * @retval           E_OK : success
977  * @retval           others : fail
978  */
979 Std_ReturnType Netc_EthSwt_Ip_EnableCreditBasedShaper(uint8 SwitchIdx, const uint8 SwitchPortIdx, const uint8 TrafficClass, const boolean Enable);
980 
981 /**
982  * @brief            Add or Update Time Gate Scheduling Table Entry function
983  * @details          External function for adding/updating time gate scheduling table entry to command ring with "NETC_ETHSWT_ENTRY_ID_MATCH" access method.
984  *
985  * @param[in]        SwitchIdx                    Index of the switch within the context of the Ethernet Switch Driver
986  * @param[in]        TimeGateSchedulingTableEntry Pointer points to an time gate scheduling table entry structure Netc_EthSwt_Ip_TimeGateSchedulingEntryDataType
987  *
988  * @return           Result of the operation
989  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
990  * @retval           others : fail
991  */
992 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateTimeGateSchedulingTableEntry( uint8 SwitchIdx,
993                                                                                       const Netc_EthSwt_Ip_TimeGateSchedulingEntryDataType *TimeGateSchedulingTableEntry
994                                                                                     );
995 
996 /**
997  * @brief            Enable or disable Time Gate Scheduling on a switch port.
998  * @details          External function for enabling/disabling time gate scheduling on a switch port.
999  *
1000  * @param[in]        SwitchIdx            Index of the switch within the context of the Ethernet Switch Driver
1001  * @param[in]        SwitchPortIdx        Index of the port at the addressed switch
1002  * @param[in]        Enable               Enable or disable the time gate scheduling
1003  *
1004  * @return           Result of the operation
1005  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1006  * @retval           others : fail
1007  */
1008 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_ConfigPortTimeGateScheduling( uint8 SwitchIdx,
1009                                                                            uint8 SwitchPortIdx,
1010                                                                            boolean Enable
1011                                                                          );
1012 
1013 /**
1014  * @brief            Set the mac layer duplex mode on a switch port.
1015  * @details
1016  *
1017  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1018  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1019  * @param[in]        EthSwtPortMacLayerDuplexMode   1 : full duplex mode; 0 : half duplex mode
1020  *
1021  * @return          Result of the operation
1022  * @retval          E_OK        success
1023  * @retval          E_NOT_OK    fail to set the duplx mode
1024  */
1025 Std_ReturnType Netc_EthSwt_Ip_SetPortMacLayerDuplexMode( uint8 SwitchIdx,
1026                                                          uint8 SwitchPortIdx,
1027                                                          Netc_EthSwt_Ip_PortDuplexType EthSwtPortMacLayerDuplexMode
1028                                                        );
1029 /**
1030  * @brief            Periodically called function to age the FDB entries.
1031  * @details
1032  *
1033  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1034  *
1035  */
1036 void Netc_EthSwt_Ip_MainFunction( uint8 SwitchIdx );
1037 
1038 /*
1039  * @brief            Set the pruning mode on a switch port.
1040  * @details
1041  *
1042  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1043  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1044  * @param[in]        PruningEnable                  TRUE : pruning is enabled; FALSE : pruning is disabled;
1045  *
1046  * @return          Result of the operation
1047  * @retval          E_OK        success
1048  * @retval          E_NOT_OK    fail to set the pruning mode
1049  */
1050 Std_ReturnType Netc_EthSwt_Ip_SetPruningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, boolean PruningEnable);
1051 
1052 /**
1053  * @brief            Get the pruning mode on a switch port.
1054  * @details
1055  *
1056  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1057  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1058  * @param[out]       PruningEnablePtr               TRUE : pruning is enabled; FALSE : pruning is disabled;
1059  *
1060  * @return          Result of the operation
1061  * @retval          E_OK        success
1062  * @retval          E_NOT_OK    fail to get the pruning mode
1063  */
1064 Std_ReturnType Netc_EthSwt_Ip_GetPruningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, boolean *PruningEnablePtr);
1065 
1066 /**
1067  * @brief            Retrieve time of free-running clock in the switch.
1068  * @details
1069  *
1070  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1071  * @param[out]       PtpTime            ptpTime Time of the free-running clock
1072  *
1073  * @return          Result of the operation
1074  * @retval          E_OK        success
1075  * @retval          E_NOT_OK    fail to get the time of free-running clock
1076  */
1077 Std_ReturnType Netc_EthSwt_Ip_GetPtpTSClk( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *PtpTime );
1078 
1079 /**
1080  * @brief            Retrieve time of corrected clock (synchronized time) in the switch.
1081  * @details
1082  *
1083  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1084  * @param[out]       PtpTime            ptpTime Time of the corrected clock
1085  *
1086  * @return          Result of the operation
1087  * @retval          E_OK        success
1088  * @retval          E_NOT_OK    fail to get the time of corrected clock
1089  */
1090 Std_ReturnType Netc_EthSwt_Ip_GetPtpClk( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *PtpTime );
1091 
1092 /**
1093  * @brief            Retrieve both time of free-running clock and corrected clock (synchronized time) in the switch.
1094  * @details
1095  *
1096  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1097  * @param[out]       FreeRunTime        Time of the free-running clock
1098  * @param[out]       CorrTime           Time of the corrected clock
1099  *
1100  * @return          Result of the operation
1101  * @retval          E_OK        success
1102  * @retval          E_NOT_OK    fail to get the time of free-running and corrected clock
1103  */
1104 Std_ReturnType Netc_EthSwt_Ip_GetPtpTimes( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *FreeRunTime, Netc_EthSwt_Ip_PtpTimeType *CorrTime );
1105 
1106 /**
1107  * @brief            Set a clk ratio for the corrected clock in the switch.
1108  * @details
1109  *
1110  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1111  * @param[in]        ClkRatio           is a fixed-point clock rate value with a single-bit integer part and a 31-bit fractional part.
1112  *
1113  * @return          Result of the operation
1114  * @retval          E_OK        success
1115  * @retval          E_NOT_OK    fail to set the clk ratio
1116  */
1117 Std_ReturnType Netc_EthSwt_Ip_SetPtpClkRatio( uint8 SwitchIdx, uint32 ClkRatio );
1118 
1119 /**
1120  * @brief            Add/Subtract an offset to/from the corrected clock (PTP_CLK).
1121  * @details
1122  *
1123  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1124  * @param[in]        Offset             signed value, to add or substract from the offset register.
1125  *
1126  * @return          Result of the operation
1127  * @retval          E_OK        success
1128  * @retval          E_NOT_OK    fail to correct the offset
1129  */
1130 Std_ReturnType Netc_EthSwt_Ip_CorrectPtpClk( uint8 SwitchIdx, sint64 Offset );
1131 
1132 /**
1133  * @brief            Add or Update Rate Policer Table Entry function
1134  * @details          External function for adding or updating one Rate Policer entry with "Entry ID Match" access method.
1135  *                   That means only "Entry ID Match" access method is supported.
1136  *
1137  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1138  * @param[in]        Cmd              Add and Update commands are supported
1139  * @param[out]       MatchedEntries   Number of matched entries
1140  * @param[in]        RatePolicerTableEntry    Pointer points to a Rate policer entry structure Netc_EthSwt_Ip_RatePolicerEntryDataType
1141  *
1142  * @return           Result of the operation
1143  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1144  * @retval           others : fail
1145  */
1146 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateRatePolicerTableEntry( uint8 SwitchIdx,
1147                                                                                Netc_EthSwt_Ip_CommandsType Cmd,
1148                                                                                uint32 *MatchedEntries,
1149                                                                                const Netc_EthSwt_Ip_RatePolicerEntryDataType * RatePolicerTableEntry
1150                                                                              );
1151 
1152 /**
1153  * @brief            Query Rate Policer Table Entry function
1154  * @details          External function for querying one Rate Policer entry with "Entry ID Match" access method.
1155  *                   That means only "Entry ID Match" access method is supported.
1156  *
1157  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1158  * @param[out]       MatchedEntries         Number of matched entry
1159  * @param[in]        RatePolicerEntryId     Rate Policer table entry ID
1160  * @param[out]       RatePolicerTableEntry  A pointer that returns the data of a matched entry by "query" operation
1161  *                                          The data is valid only when MatchedEntries equals 1.
1162  *
1163  * @return           Result of the operation
1164  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1165  * @retval           others : fail
1166  */
1167 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryRatePolicerTableEntry( uint8 SwitchIdx,
1168                                                                          uint32 *MatchedEntries,
1169                                                                          uint32 RatePolicerEntryId,
1170                                                                          Netc_EthSwt_Ip_RatePolicerEntryRspDataType * RatePolicerTableEntry
1171                                                                        );
1172 
1173 /**
1174  * @brief            Delete Rate Policer Table Entry function
1175  * @details          External function for deleting one Rate Policer entry with "Entry ID Match" access method.
1176  *                   That means only "Entry ID Match" access method is supported.
1177  *
1178  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1179  * @param[out]       MatchedEntries         Number of matched entry
1180  * @param[in]        RatePolicerEntryId     Rate Policer entry ID
1181  *
1182  * @return           Result of the operation
1183  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1184  * @retval           others : fail
1185  */
1186 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteRatePolicerTableEntry( uint8 SwitchIdx,
1187                                                                           uint32 *MatchedEntries,
1188                                                                           uint32 RatePolicerEntryId
1189                                                                         );
1190 
1191 /**
1192  * @brief            Add or Update Ingress Stream Table Entry function
1193  * @details          External function for adding or updating one Ingress Stream entry with "Entry ID Match" access method.
1194  *                   That means only "Entry ID Match" access method is supported.
1195  *
1196  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1197  * @param[in]        Cmd              Add and Update commands are supported
1198  * @param[out]       MatchedEntries   Number of matched entries
1199  * @param[in]        IngressStreamTableEntry    Pointer points to a Ingress Stream entry structure Netc_EthSwt_Ip_IngressStreamEntryDataType
1200  *
1201  * @return           Result of the operation
1202  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1203  * @retval           others : fail
1204  */
1205 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamTableEntry( uint8 SwitchIdx,
1206                                                                                  Netc_EthSwt_Ip_CommandsType Cmd,
1207                                                                                  uint32 *MatchedEntries,
1208                                                                                  const Netc_EthSwt_Ip_IngressStreamEntryDataType * IngressStreamTableEntry
1209                                                                                );
1210 
1211 /**
1212  * @brief            Query Ingress Stream Table Entry function
1213  * @details          External function for querying one Ingress Stream entry with "Entry ID Match" access method.
1214  *                   That means only "Entry ID Match" access method is supported.
1215  *
1216  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1217  * @param[out]       MatchedEntries         Number of matched entry
1218  * @param[in]        IngressStreamEntryId     Ingress Stream table entry ID
1219  * @param[out]       IngressStreamTableEntry  A pointer that returns the data of a matched entry by "query" operation
1220  *                                            The data is valid only when MatchedEntries equals 1.
1221  *
1222  * @return           Result of the operation
1223  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1224  * @retval           others : fail
1225  */
1226 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamTableEntry( uint8 SwitchIdx,
1227                                                                            uint32 *MatchedEntries,
1228                                                                            uint32 IngressStreamEntryId,
1229                                                                            Netc_EthSwt_Ip_IngressStreamEntryDataType * IngressStreamTableEntry
1230                                                                          );
1231 
1232 /**
1233  * @brief            Delete Ingress Stream Table Entry function
1234  * @details          External function for deleting one Ingress Stream entry with "Entry ID Match" access method.
1235  *                   That means only "Entry ID Match" access method is supported.
1236  *
1237  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1238  * @param[out]       MatchedEntries         Number of matched entry
1239  * @param[in]        IngressStreamEntryId     Ingress Stream entry ID
1240  *
1241  * @return           Result of the operation
1242  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1243  * @retval           others : fail
1244  */
1245 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamTableEntry( uint8 SwitchIdx,
1246                                                                             uint32 *MatchedEntries,
1247                                                                             uint32 IngressStreamEntryId
1248                                                                           );
1249 
1250 /**
1251  * @brief            Add or Update Ingress Stream Count Table Entry function
1252  * @details          External function for adding or updating one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1253  *                   That means only "Exact Match Key Element Match" access method is supported.
1254  *
1255  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
1256  * @param[in]        Cmd                        Add and Update commands are supported
1257  * @param[out]       MatchedEntries             Number of matched entries
1258  * @param[in]        IngressStreamCountEntryId  Index of the Ingress Stream Count Table Entry to be added or reset
1259  *
1260  * @return           Result of the operation
1261  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1262  * @retval           others : fail
1263  */
1264 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamCountTableEntry( uint8 SwitchIdx,
1265                                                                                        Netc_EthSwt_Ip_CommandsType Cmd,
1266                                                                                        uint32 *MatchedEntries,
1267                                                                                        uint32 IngressStreamCountId
1268                                                                                      );
1269 
1270 /**
1271  * @brief            Query Ingress Stream Count Table Entry function
1272  * @details          External function for querying one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1273  *                   That means only "Exact Match Key Element Match" access method is supported.
1274  *
1275  * @param[in]        SwitchIdx                       Index of the switch within the context of the Ethernet Switch Driver
1276  * @param[out]       MatchedEntries                  Number of matched entry
1277  * @param[in]        IngressStreamCountEntryId       Index of the Ingress Stream Count Table Entry to be queried
1278  * @param[out]       IngressStreamCountTableEntry    A pointer that returns the data of a matched entry by "query" operation
1279  *                                                   The data is valid only when MatchedEntries equals 1.
1280  *
1281  * @return           Result of the operation
1282  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1283  * @retval           others : fail
1284  */
1285 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamCountTableEntry( uint8 SwitchIdx,
1286                                                                                  uint32 *MatchedEntries,
1287                                                                                  uint32 IngressStreamCountEntryId,
1288                                                                                  Netc_EthSwt_Ip_IngressStreamCountTableRspDataType * IngressStreamCountTableEntry
1289                                                                                );
1290 
1291 /**
1292  * @brief            Delete Ingress Stream Count Table Entry function
1293  * @details          External function for deleting one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1294  *                   That means only "Exact Match Key Element Match" access method is supported.
1295  *
1296  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1297  * @param[out]       MatchedEntries         Number of matched entry
1298  * @param[in]        IngressStreamCountId   Index of the Ingress Stream Count Table Entry to be deleted
1299  *
1300  * @return           Result of the operation
1301  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1302  * @retval           others : fail
1303  */
1304 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamCountTableEntry( uint8 SwitchIdx,
1305                                                                                   uint32 *MatchedEntries,
1306                                                                                   uint32 IngressStreamCountId
1307                                                                                 );
1308 
1309 /**
1310  * @brief            Add or Update Ingress Stream Filter Table Entry function
1311  * @details          External function for adding or updating one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1312  *                   That means only "Exact Match Key Element Match" access method is supported.
1313  *
1314  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1315  * @param[in]        Cmd              Add and Update commands are supported
1316  * @param[out]       MatchedEntries   Number of matched entries
1317  * @param[in]        IngressStreamFilterTableEntry    Pointer points to a Ingress Stream Filter entry structure Netc_EthSwt_Ip_IngressStreamFilterEntryDataType
1318  *
1319  * @return           Result of the operation
1320  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1321  * @retval           others : fail
1322  */
1323 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamFilterTableEntry( uint8 SwitchIdx,
1324                                                                                        Netc_EthSwt_Ip_CommandsType Cmd,
1325                                                                                        uint32 *MatchedEntries,
1326                                                                                        const Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1327                                                                                      );
1328 
1329 /**
1330  * @brief            Query Ingress Stream Filter Table Entry function
1331  * @details          External function for querying one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1332  *                   That means only "Exact Match Key Element Match" access method is supported.
1333  *
1334  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1335  * @param[out]       MatchedEntries         Number of matched entry
1336  * @param[in]        IngressStreamFilterTableEntry  A pointer that provides the data of KEYE_DATA filed for "query" operation
1337  * @param[out]       IngressStreamFilterTableEntry  A pointer that returns the data of a matched entry by "query" operation
1338  *                                            The data is valid only when MatchedEntries equals 1.
1339  *
1340  * @return           Result of the operation
1341  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1342  * @retval           others : fail
1343  */
1344 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamFilterTableEntry( uint8 SwitchIdx,
1345                                                                                  uint32 *MatchedEntries,
1346                                                                                  Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1347                                                                                );
1348 
1349 /**
1350  * @brief            Delete Ingress Stream Filter Table Entry function
1351  * @details          External function for deleting one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1352  *                   That means only "Exact Match Key Element Match" access method is supported.
1353  *
1354  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1355  * @param[out]       MatchedEntries         Number of matched entry
1356  * @param[in]        IngressStreamFilterTableEntry     A pointer that provides the data of KEYE_DATA filed for "delete" operation
1357  *
1358  * @return           Result of the operation
1359  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1360  * @retval           others : fail
1361  */
1362 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamFilterTableEntry( uint8 SwitchIdx,
1363                                                                                   uint32 *MatchedEntries,
1364                                                                                   const Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1365                                                                                 );
1366 
1367 /**
1368  * @brief            Query Ingress Stream Filter Table Entry function with Search method
1369  * @details          External function for searching Ingress Stream Filter entry one by one with Search method.
1370  *
1371  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1372  * @param[in]        ResumeEntryId          resume entry id for searching
1373  * @param[out]       MatchedEntry         Number of matched entry
1374  * @param[out]       IngressStreamTableEntry  A pointer that returns the data of a matched entry by "search" operation
1375  *                                            The data is valid only when MatchedEntry equals 1.
1376  *
1377  * @return           Result of the operation
1378  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1379  * @retval           others : fail
1380  */
1381 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_SearchIngressStreamFilterTableEntry( uint8 SwitchIdx,
1382                                                                                   uint32 * ResumeEntryId,
1383                                                                                   uint32 * MatchedEntry,
1384                                                                                   Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1385                                                                                 );
1386 
1387 /**
1388  * @brief            Dump Ingress Stream Filter Table Entry function
1389  * @details          External function for dumping all Ingress Stream Filter entries.
1390  *
1391  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1392  * @param[in]        NumberOfElements       Number of entries that want to be dumped
1393  * @param[out]       NumberOfElements       Number of entries that actually are dumped (number of existing entries)
1394  * @param[out]       IngressStreamFilterTableList  A pointer that returns the list of NumberOfElements entries
1395  *
1396  *
1397  * @return           Result of the operation
1398  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1399  * @retval           others : fail
1400  */
1401 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_GetIngressStreamFilterTable( uint8 SwitchIdx,
1402                                                                           uint16 * NumberOfElements,
1403                                                                           Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableList
1404                                                                         );
1405 
1406 /**
1407  * @brief            Add or Update Stream Gate Instance Table Entry function
1408  * @details          External function for adding or updating one Stream Gate Instance entry with "Entry ID Match" access method.
1409  *                   That means only "Entry ID Match" access method is supported.
1410  *
1411  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1412  * @param[in]        Cmd              Add and Update commands are supported
1413  * @param[out]       MatchedEntries   Number of matched entries
1414  * @param[in]        StreamGateInstanceTableEntry    Pointer points to a Stream Gate Instance entry structure Netc_EthSwt_Ip_StreamGateInstanceEntryDataType
1415  *
1416  * @return           Result of the operation
1417  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1418  * @retval           others : fail
1419  */
1420 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateStreamGateInstanceTableEntry( uint8 SwitchIdx,
1421                                                                                       Netc_EthSwt_Ip_CommandsType Cmd,
1422                                                                                       uint32 *MatchedEntries,
1423                                                                                       const Netc_EthSwt_Ip_StreamGateInstanceEntryDataType * StreamGateInstanceTableEntry
1424                                                                                     );
1425 
1426 /**
1427  * @brief            Query Stream Gate Instance Table Entry function
1428  * @details          External function for querying one Stream Gate Instance entry with "Entry ID Match" access method.
1429  *                   That means only "Entry ID Match" access method is supported.
1430  *
1431  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1432  * @param[out]       MatchedEntries         Number of matched entry
1433  * @param[in]        SGIEntryId             Stream Gate Instance entry ID
1434  * @param[out]       SGITableEntryRspData   A pointer that returns the data of a matched entry by "query" operation
1435  *                                          The data is valid only when MatchedEntries equals 1.
1436  *
1437  * @return           Result of the operation
1438  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1439  * @retval           others : fail
1440  */
1441 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryStreamGateInstanceTableEntry( uint8 SwitchIdx,
1442                                                                                 uint32 *MatchedEntries,
1443                                                                                 uint32 SGIEntryId,
1444                                                                                 Netc_EthSwt_Ip_StreamGateInstanceEntryRspDataType * SGITableEntryRspData
1445                                                                               );
1446 
1447 /**
1448  * @brief            Delete Stream Gate Instance Table Entry function
1449  * @details          External function for deleting one Stream Gate Instance entry with "Entry ID Match" access method.
1450  *                   That means only "Entry ID Match" access method is supported.
1451  *
1452  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1453  * @param[out]       MatchedEntries         Number of matched entry
1454  * @param[in]        SGIEntryId             Stream Gate Instance entry ID
1455  *
1456  * @return           Result of the operation
1457  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1458  * @retval           others : fail
1459  */
1460 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteStreamGateInstanceTableEntry( uint8 SwitchIdx,
1461                                                                                  uint32 *MatchedEntries,
1462                                                                                  uint32 SGIEntryId
1463                                                                                );
1464 
1465 /**
1466  * @brief            Add Stream Gate Control List Table Entry function
1467  * @details          External function for adding one Stream Gate Control List entry with "Entry ID Match" access method.
1468  *                   That means only "Entry ID Match" access method is supported.
1469  *
1470  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1471  * @param[in]        Cmd              Add and Update commands are supported
1472  * @param[out]       MatchedEntries   Number of matched entries
1473  * @param[in]        SGCLTableEntry   Pointer points to a Stream Gate Control List entry structure Netc_EthSwt_Ip_SGCLTableDataType
1474  *
1475  * @return           Result of the operation
1476  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1477  * @retval           others : fail
1478  */
1479 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddStreamGateControlListTableEntry( uint8 SwitchIdx,
1480                                                                                  Netc_EthSwt_Ip_CommandsType Cmd,
1481                                                                                  uint32 *MatchedEntries,
1482                                                                                  const Netc_EthSwt_Ip_SGCLTableDataType * SGCLTableEntry
1483                                                                                 );
1484 
1485 /**
1486  * @brief            Query Stream Gate Control List Table Entry function
1487  * @details          External function for querying one Stream Gate Control List entry with "Entry ID Match" access method.
1488  *                   That means only "Entry ID Match" access method is supported.
1489  *
1490  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1491  * @param[out]       MatchedEntries         Number of matched entry
1492  * @param[in]        SGCLEntryId            Stream Gate Control List entry ID
1493  * @param[in]        ListLen                Stream Gate Control List entry length, it has to be set to the same value as LIST_LENGTH when adding the entry
1494  * @param[out]       SGCLTableEntryRspData  A pointer that returns the data of a matched entry by "query" operation
1495  *                                          The data is valid only when MatchedEntries equals 1.
1496  *
1497  * @return           Result of the operation
1498  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1499  * @retval           others : fail
1500  */
1501 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryStreamGateControlListTableEntry( uint8 SwitchIdx,
1502                                                                                    uint32 *MatchedEntries,
1503                                                                                    uint32 SGCLEntryId,
1504                                                                                    uint8 ListLen,
1505                                                                                    Netc_EthSwt_Ip_SGCLTableDataType * SGCLTableEntryRspData
1506                                                                                  );
1507 
1508 /**
1509  * @brief            Delete Stream Gate Control List Table Entry function
1510  * @details          External function for deleting one Stream Gate Control List entry with "Entry ID Match" access method.
1511  *                   That means only "Entry ID Match" access method is supported.
1512  *
1513  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1514  * @param[out]       MatchedEntries         Number of matched entry
1515  * @param[in]        SGCLEntryId            Stream Gate Control List entry ID
1516  *
1517  * @return           Result of the operation
1518  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1519  * @retval           others : fail
1520  */
1521 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteStreamGateControlListTableEntry( uint8 SwitchIdx,
1522                                                                                     uint32 *MatchedEntries,
1523                                                                                     uint32 SGCLEntryId
1524                                                                                   );
1525 
1526 /**
1527  * @brief            Add or Update Ingress Sequence Generation Table Entry function
1528  * @details          External function for adding or updating one Ingress Sequence Generation entry with "Entry ID Match" access method.
1529  *                   That means only "Entry ID Match" access method is supported.
1530  *
1531  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1532  * @param[in]        Cmd              Add and Update commands are supported
1533  * @param[out]       MatchedEntries   Number of matched entries
1534  * @param[in]        ISQGTableEntry   Pointer points to a Stream Gate Instance entry structure Netc_EthSwt_Ip_ISQGTableDataType
1535  *
1536  * @return           Result of the operation
1537  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1538  * @retval           others : fail
1539  */
1540 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1541                                                                                         Netc_EthSwt_Ip_CommandsType Cmd,
1542                                                                                         uint32 *MatchedEntries,
1543                                                                                         const Netc_EthSwt_Ip_ISQGTableDataType * ISQGTableEntry
1544                                                                                       );
1545 
1546 /**
1547  * @brief            Query Ingress Sequence Generation Table Entry function
1548  * @details          External function for querying one Ingress Sequence Generation entry with "Entry ID Match" access method.
1549  *                   That means only "Entry ID Match" access method is supported.
1550  *
1551  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1552  * @param[out]       MatchedEntries         Number of matched entry
1553  * @param[in]        ISQGEntryId            Ingress Sequence Generation entry ID
1554  * @param[out]       ISQGRspData            A pointer that returns the data of a matched entry by "query" operation
1555  *                                          The data is valid only when MatchedEntries equals 1.
1556  *
1557  * @return           Result of the operation
1558  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1559  * @retval           others : fail
1560  */
1561 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1562                                                                                   uint32 *MatchedEntries,
1563                                                                                   uint32 ISQGEntryId,
1564                                                                                   Netc_EthSwt_Ip_ISQGTableDataType * ISQGRspData
1565                                                                                 );
1566 
1567 /**
1568  * @brief            Delete Ingress Sequence Generation Table Entry function
1569  * @details          External function for deleting one Ingress Sequence Generation entry with "Entry ID Match" access method.
1570  *                   That means only "Entry ID Match" access method is supported.
1571  *
1572  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1573  * @param[out]       MatchedEntries         Number of matched entry
1574  * @param[in]        ISQGEntryId            Ingress Sequence Generation entry ID
1575  *
1576  * @return           Result of the operation
1577  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1578  * @retval           others : fail
1579  */
1580 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1581                                                                                    uint32 *MatchedEntries,
1582                                                                                    uint32 ISQGEntryId
1583                                                                                  );
1584 
1585 /**
1586  * @brief            Update Egress Sequence Recovery Table Entry function
1587  * @details          External function for updating one Egress Sequence Recovery entry with "Entry ID Match" access method.
1588  *                   That means only "Entry ID Match" access method is supported.
1589  *
1590  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1591  * @param[out]       MatchedEntries   Number of matched entries
1592  * @param[in]        EgrSQRTableEntry   Pointer points to an Egress Sequence Recovery entry structure Netc_EthSwt_Ip_EgrSeqRecoveryTableDataType
1593  *
1594  * @return           Result of the operation
1595  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1596  * @retval           others : fail
1597  */
1598 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_UpdateEgressSeqRecoveryTableEntry( uint8 SwitchIdx,
1599                                                                                 uint32 *MatchedEntries,
1600                                                                                 const Netc_EthSwt_Ip_EgrSeqRecoveryTableDataType * EgrSQRTableEntry
1601                                                                               );
1602 
1603 /**
1604  * @brief            Query Egress Sequence Recovery Table Entry function
1605  * @details          External function for querying one Egress Sequence Recovery entry with "Entry ID Match" access method.
1606  *                   That means only "Entry ID Match" access method is supported.
1607  *
1608  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1609  * @param[out]       MatchedEntries         Number of matched entry
1610  * @param[in]        ESQREntryId            Egress Sequence Recovery entry ID
1611  * @param[out]       ESQRRspData            A pointer that returns the data of a matched entry by "query" operation
1612  *                                          The data is valid only when MatchedEntries equals 1.
1613  *
1614  * @return           Result of the operation
1615  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1616  * @retval           others : fail
1617  */
1618 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressSeqRecoveryTableEntry( uint8 SwitchIdx,
1619                                                                                uint32 *MatchedEntries,
1620                                                                                uint32 ESQREntryId,
1621                                                                                Netc_EthSwt_Ip_EgrSeqRecoveryTableRspDataType * ESQRRspData
1622                                                                              );
1623 
1624 /**
1625  * @brief            Add or Update Ingress Stream Identification Table Entry function
1626  * @details          External function for adding or updating one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1627  *                   That means only "KEY_ELEMENT" access method is supported.
1628  *
1629  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1630  * @param[in]        Cmd              Add and Update commands are supported
1631  * @param[out]       MatchedEntries   Number of matched entries
1632  * @param[in]        ISQGTableEntry   Pointer points to a Ingress Stream Identification entry structure Netc_EthSwt_Ip_IngrStremIdentificationTableDataType
1633  *
1634  * @return           Result of the operation
1635  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1636  * @retval           others : fail
1637  */
1638 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1639                                                                                             Netc_EthSwt_Ip_CommandsType Cmd,
1640                                                                                             uint32 *MatchedEntries,
1641                                                                                             const Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1642                                                                                           );
1643 
1644 /**
1645  * @brief            Query Ingress Stream Identification Table Entry function
1646  * @details          External function for querying one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1647  *                   That means only "KEY_ELEMENT" access method is supported.
1648  *
1649  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1650  * @param[out]       MatchedEntries         Number of matched entry
1651  * @param[in]        ISITableEntry          A pointer that provides the data with the "query" operation
1652  * @param[out]       ISITableEntry          A pointer that returns the data of a matched entry by "query" operation
1653  *                                          The data is valid only when MatchedEntries equals 1.
1654  *
1655  * @return           Result of the operation
1656  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1657  * @retval           others : fail
1658  */
1659 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1660                                                                                       uint32 *MatchedEntries,
1661                                                                                       Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1662                                                                                     );
1663 
1664 /**
1665  * @brief            Delete Ingress Stream Identification Table Entry function
1666  * @details          External function for deleting one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1667  *                   That means only "KEY_ELEMENT" access method is supported.
1668  *
1669  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1670  * @param[out]       MatchedEntries         Number of matched entry
1671  * @param[in]        ISITableEntry          A pointer that provides the data with the "delete" operation
1672  *
1673  * @return           Result of the operation
1674  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1675  * @retval           others : fail
1676  */
1677 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1678                                                                                        uint32 *MatchedEntries,
1679                                                                                        const Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1680                                                                                      );
1681 
1682 /**
1683  * @brief            Dump all Ingress Stream Identification Table Entries function
1684  * @details          External function for dumping all Ingress Stream Identification entries with "SEARCH_CRITERIA" access method.
1685  *                   That means only "SEARCH_CRITERIA" access method is supported.
1686  *
1687  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1688  * @param[in]        NumberOfElements       Number of entries that want to be dumped
1689  * @param[out]       NumberOfElements       Number of entries that actually are dumped (number of existing entries)
1690  * @param[out]       ISITableList           A pointer that returns the list of NumberOfElements entries
1691  *
1692  * @return           Result of the operation
1693  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1694  * @retval           others : fail
1695  */
1696 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_GetIngrStreamIdentificationTable( uint8 SwitchIdx,
1697                                                                                uint16 * NumberOfElements,
1698                                                                                Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableList
1699                                                                              );
1700 
1701                                                                              /**
1702  * @brief            Update Egress Scheduler Table Entry function
1703  * @details          External function for updating one Egress Scheduler Table entry with "ENTRY_ID" access method.
1704  *                   That means only "ENTRY_ID" access method is supported.
1705  *
1706  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1707  * @param[in]        EntryId                Egress Scheduler entry ID
1708  * @param[out]       MatchedEntries         Number of matched entry
1709  * @param[in]        SchedulerTableEntry    A pointer that provides the data for the "update" operation
1710  *
1711  * @return           Result of the operation
1712  * @retval           0 : NETC_ETHSWT_CBDRSTATUS_SUCCES, success
1713  * @retval           others : fail
1714  */
1715 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_UpdateEgressSchedulerTableEntry( uint8 SwitchIdx,
1716                                                                             uint32 EntryId,
1717                                                                             uint32 *MatchedEntries,
1718                                                                             const Netc_EthSwt_Ip_PortSchedulerType * SchedulerTableEntry
1719                                                                         );
1720 
1721 /**
1722  * @brief           Set Timer Synchronization State.
1723  * @details         This function sets the Timer Synchronization state.
1724  *
1725  * @param[in]       SwitchIdx Index of the switch
1726  * @param[in]       SyncState Timer synchronization state
1727 
1728  * @return          Std_ReturnType
1729  * @retval          E_OK: successful.
1730  * @retval          E_NOT_OK: failed
1731  *
1732  */
1733 Std_ReturnType Netc_EthSwt_Ip_SetSyncState(uint8 SwitchIdx, boolean SyncState);
1734 
1735 #define ETHSWT_43_NETC_STOP_SEC_CODE
1736 #include "EthSwt_43_NETC_MemMap.h"
1737 
1738 #ifdef __cplusplus
1739 }
1740 #endif
1741 
1742 /** @} */
1743 
1744 #endif
1745