source: SVN/cambria/redboot/packages/devs/eth/intel/npe/common/current/include/IxEthDB.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 117.2 KB
Line 
1/** @file IxEthDB.h
2 *
3 * @brief this file contains the public API of @ref IxEthDB component
4 *
5 *
6 * @par
7 * IXP400 SW Release version 2.3
8 *
9 * -- Copyright Notice --
10 *
11 * @par
12 * Copyright (c) 2001-2005, Intel Corporation.
13 * All rights reserved.
14 *
15 * @par
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 *    notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 *    notice, this list of conditions and the following disclaimer in the
23 *    documentation and/or other materials provided with the distribution.
24 * 3. Neither the name of the Intel Corporation nor the names of its contributors
25 *    may be used to endorse or promote products derived from this software
26 *    without specific prior written permission.
27 *
28 *
29 * @par
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
42 *
43 * @par
44 * -- End of Copyright Notice --
45 *
46 */
47 
48#ifndef IxEthDB_H
49#define IxEthDB_H
50
51#include <IxOsBuffMgt.h>
52#include <IxTypes.h>
53
54/**
55 * @defgroup IxEthDB Intel (R) IXP400 Software Ethernet Database (IxEthDB) API
56 *
57 * @brief ethDB is a library that does provides a MAC address database learning/filtering capability
58 *
59 *@{
60 */
61
62#define INLINE __inline__
63
64#define IX_ETH_DB_PRIVATE PRIVATE /* imported from IxTypes.h */
65
66#define IX_ETH_DB_PUBLIC PUBLIC
67
68/**
69 * @def IX_IEEE803_MAC_ADDRESS_SIZE
70 * @brief The size of the MAC address
71 */
72#define IX_IEEE803_MAC_ADDRESS_SIZE (6)
73
74/**
75 * @def IX_IEEE802_1Q_QOS_PRIORITY_COUNT
76 * @brief Number of QoS priorities defined by IEEE802.1Q
77 */
78#define IX_IEEE802_1Q_QOS_PRIORITY_COUNT (8)
79
80/**
81 * @enum IxEthDBStatus
82 * @brief Ethernet Database API return values
83 */
84typedef enum /* IxEthDBStatus */
85{
86  IX_ETH_DB_SUCCESS = IX_SUCCESS,   /**< Success */
87  IX_ETH_DB_FAIL = IX_FAIL,         /**< Failure */
88  IX_ETH_DB_INVALID_PORT,           /**< Invalid port */
89  IX_ETH_DB_PORT_UNINITIALIZED,     /**< Port not initialized */
90  IX_ETH_DB_MAC_UNINITIALIZED,      /**< MAC not initialized */
91  IX_ETH_DB_INVALID_ARG,            /**< Invalid argument */
92  IX_ETH_DB_NO_SUCH_ADDR,           /**< Address not found for search or delete operations */
93  IX_ETH_DB_NOMEM,                  /**< Learning database memory full */
94  IX_ETH_DB_BUSY,                   /**< Learning database cannot complete operation, access temporarily blocked */
95  IX_ETH_DB_END,                    /**< Database browser passed the end of the record set */
96  IX_ETH_DB_INVALID_VLAN,           /**< Invalid VLAN ID (valid range is 0..4094, 0 signifies no VLAN membership, used for priority tagged frames) */
97  IX_ETH_DB_INVALID_PRIORITY,       /**< Invalid QoS priority/traffic class (valid range for QoS priority is 0..7, valid range for traffic class depends on run-time configuration) */
98  IX_ETH_DB_NO_PERMISSION,          /**< No permission for attempted operation */
99  IX_ETH_DB_FEATURE_UNAVAILABLE,    /**< Feature not available (or not enabled) */
100  IX_ETH_DB_INVALID_KEY,            /**< Invalid search key */
101  IX_ETH_DB_INVALID_RECORD_TYPE     /**< Invalid record type */
102} IxEthDBStatus;
103   
104/** @brief VLAN ID type, valid range is 0..4094, 0 signifying no VLAN membership */
105typedef UINT32 IxEthDBVlanId;
106
107/** @brief 802.1Q VLAN tag, contains 3 bits user priority, 1 bit CFI, 12 bits VLAN ID */
108typedef UINT32 IxEthDBVlanTag;
109
110/** @brief QoS priority/traffic class type, valid range is 0..7, 0 being the lowest */
111typedef UINT32 IxEthDBPriority;
112
113/** @brief Priority mapping table; 0..7 QoS priorities used to index, table contains traffic classes */
114typedef UINT8 IxEthDBPriorityTable[8];
115
116/** @brief A 4096 bit array used to map the complete VLAN ID range */
117typedef UINT8 IxEthDBVlanSet[512];
118
119#define IX_ETH_DB_802_1Q_VLAN_MASK (0xFFF)      /**< VLAN mask */
120#define IX_ETH_DB_802_1Q_QOS_MASK  (0x7)        /**< QoS Mask */
121
122#define IX_ETH_DB_802_1Q_MAX_VLAN_ID (0xFFE)    /**< Maximum VLAN IDs */
123
124/**
125 * @def IX_ETH_DB_SET_VLAN_ID
126 * @brief returns the given 802.1Q tag with the VLAN ID field substituted with the given VLAN ID
127 *
128 * This macro is used to change the VLAN ID in a 802.1Q tag.
129 *
130 * Example:
131 *
132 *  tag = IX_ETH_DB_SET_VLAN_ID(tag, 32)
133 *
134 * inserts the VLAN ID "32" in the given tag.
135 */
136#define IX_ETH_DB_SET_VLAN_ID(vlanTag, vlanID) (((vlanTag) & 0xF000) | ((vlanID) & IX_ETH_DB_802_1Q_VLAN_MASK))
137
138/**
139* @def IX_ETH_DB_GET_VLAN_ID
140* @brief returns the VLAN ID from the given 802.1Q tag
141*/
142#define IX_ETH_DB_GET_VLAN_ID(vlanTag) ((vlanTag) & IX_ETH_DB_802_1Q_VLAN_MASK)
143
144/**
145* @def IX_ETH_DB_GET_QOS_PRIORITY
146* @brief gets the QOS priority from the given 802.1Q tag
147*/
148#define IX_ETH_DB_GET_QOS_PRIORITY(vlanTag) (((vlanTag) >> 13) & IX_ETH_DB_802_1Q_QOS_MASK)
149
150/**
151* @def IX_ETH_DB_SET_QOS_PRIORITY
152* @brief sets the QOS priority to the given 802.1Q tag
153*/
154#define IX_ETH_DB_SET_QOS_PRIORITY(vlanTag, priority) (((vlanTag) & 0x1FFF) | (((priority) & IX_ETH_DB_802_1Q_QOS_MASK) << 13))
155
156/**
157* @def IX_ETH_DB_CHECK_VLAN_TAG
158* @brief checks the VLAN ID of the given 802.1Q tag
159*/
160#define IX_ETH_DB_CHECK_VLAN_TAG(vlanTag) { if(((vlanTag & 0xFFFF0000) != 0) || (IX_ETH_DB_GET_VLAN_ID(vlanTag) > 4094)) return IX_ETH_DB_INVALID_VLAN; }
161
162/**
163* @def IX_ETH_DB_CHECK_VLAN_ID
164* @brief checks the VLAN ID
165*/
166#define IX_ETH_DB_CHECK_VLAN_ID(vlanId) { if (vlanId > IX_ETH_DB_802_1Q_MAX_VLAN_ID) return IX_ETH_DB_INVALID_VLAN; }
167
168/**
169* @def IX_IEEE802_1Q_VLAN_TPID
170* @brief returns the VLAN TPID (0x8100)
171*/
172#define IX_IEEE802_1Q_VLAN_TPID (0x8100)
173   
174typedef enum
175{
176  IX_ETH_DB_UNTAGGED_FRAMES        = 0x1, /**< Accepts untagged frames */
177  IX_ETH_DB_VLAN_TAGGED_FRAMES     = 0x2, /**< Accepts tagged frames */
178  IX_ETH_DB_PRIORITY_TAGGED_FRAMES = 0x4, /**< Accepts tagged frames with VLAN ID set to 0 (no VLAN membership) */
179  IX_ETH_DB_ACCEPT_ALL_FRAMES      = 
180      IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES /**< Accepts all the frames */
181} IxEthDBFrameFilter;
182
183typedef enum
184{
185  IX_ETH_DB_PASS_THROUGH = 0x1, /**< Leave frame as-is */
186  IX_ETH_DB_ADD_TAG      = 0x2, /**< Add default port VLAN tag */
187  IX_ETH_DB_REMOVE_TAG   = 0x3, /**< Remove VLAN tag from frame */
188  IX_ETH_DB_ENABLE_VLAN  = 0x4, /**< VLAN enable bit */
189  IX_ETH_DB_DISABLE_VLAN = 0x5  /**< VLAN disable bit */
190} IxEthDBTaggingAction;
191
192typedef enum
193{
194  IX_ETH_DB_FIREWALL_WHITE_LIST = 0x1,  /**< Firewall operates in white-list mode (MAC address based admission) */
195  IX_ETH_DB_FIREWALL_BLACK_LIST = 0x2   /**< Firewall operates in black-list mode (MAC address based blocking) */
196} IxEthDBFirewallMode;
197 
198typedef enum
199{
200  IX_ETH_DB_FILTERING_RECORD        = 0x01, /**< <table><caption> Filtering record </caption>
201                                             *      <tr><td> MAC address <td> static/dynamic type <td> age
202                                             *   </table>
203                                             */
204  IX_ETH_DB_FILTERING_VLAN_RECORD   = 0x02, /**< <table><caption> VLAN-enabled filtering record </caption>
205                                             *      <tr><td> MAC address <td> static/dynamic type <td> age <td> 802.1Q tag
206                                             *   </table>
207                                             */
208  IX_ETH_DB_WIFI_RECORD             = 0x04, /**< <table><caption> WiFi header conversion record </caption>
209                                             *      <tr><td> MAC address <td> optional gateway MAC address <td>
210                                             *   </table>
211                                             */
212  IX_ETH_DB_FIREWALL_RECORD         = 0x08, /**< <table><caption> Firewall record </caption>
213                                             *      <tr><td> MAC address
214                                             *   </table>
215                                             */
216  IX_ETH_DB_GATEWAY_RECORD          = 0x10, /**< <i>For internal use only</i> */
217  IX_ETH_DB_MASK_RECORD             = 0x20, /**< <i>For internal use only</i> */
218  IX_ETH_DB_MAX_RECORD_TYPE_INDEX   = 0x3F, /**< <i>For internal use only</i> */
219  IX_ETH_DB_NO_RECORD_TYPE          = 0,    /**< None of the registered record types */
220  IX_ETH_DB_ALL_FILTERING_RECORDS   = IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD, /**< All the filtering records */
221  IX_ETH_DB_MASKED_FIREWALL_RECORD  = IX_ETH_DB_FIREWALL_RECORD | IX_ETH_DB_MASK_RECORD, /**< Masked firewall records */
222  IX_ETH_DB_ALL_RECORD_TYPES        = IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD |
223  IX_ETH_DB_WIFI_RECORD | IX_ETH_DB_FIREWALL_RECORD | IX_ETH_DB_MASK_RECORD /**< All the record types registered within EthDB */   
224} IxEthDBRecordType;
225 
226typedef enum
227{
228  IX_ETH_DB_LEARNING                = 0x01, /**< Learning feature; enables EthDB to learn MAC address (filtering) records, including 802.1Q enabled records */
229  IX_ETH_DB_FILTERING               = 0x02, /**< Filtering feature; enables EthDB to communicate with the NPEs for downloading filtering information in the NPEs; depends on the learning feature */
230  IX_ETH_DB_VLAN_QOS                = 0x04, /**< VLAN/QoS feature; enables EthDB to configure NPEs to operate in VLAN/QoS aware modes */
231  IX_ETH_DB_FIREWALL                = 0x08, /**< Firewall feature; enables EthDB to configure NPEs to operate in firewall mode, using white/black address lists */
232  IX_ETH_DB_SPANNING_TREE_PROTOCOL  = 0x10, /**< Spanning tree protocol feature; enables EthDB to configure the NPEs as STP nodes */
233  IX_ETH_DB_WIFI_HEADER_CONVERSION  = 0x20, /**< WiFi 802.3 to 802.11 header conversion feature; enables EthDB to handle WiFi conversion data */
234  IX_ETH_DB_ADDRESS_MASKING         = 0x40  /**< Masking of MAC addresses using an address mask.  Currently only usable in conjunction with the IX_ETH_DB_FIREWALL feature */
235} IxEthDBFeature;
236 
237typedef UINT32 IxEthDBProperty;  /**< Property ID type */
238
239typedef enum
240{
241  IX_ETH_DB_INTEGER_PROPERTY  = 0x1, /**< 4 byte unsigned integer type */
242  IX_ETH_DB_STRING_PROPERTY   = 0x2, /**< NULL-terminated string type of maximum 255 characters (including the terminator) */
243  IX_ETH_DB_MAC_ADDR_PROPERTY = 0x3, /**< 6 byte MAC address type */
244  IX_ETH_DB_BOOL_PROPERTY     = 0x4  /**< 4 byte boolean type; can contain only TRUE and FALSE values */
245} IxEthDBPropertyType;
246
247/* list of supported properties for the IX_ETH_DB_VLAN_QOS feature */
248#define IX_ETH_DB_QOS_TRAFFIC_CLASS_COUNT_PROPERTY   (0x01)     /**< Property identifying number the supported number of traffic classes */
249#define IX_ETH_DB_QOS_TRAFFIC_CLASS_0_RX_QUEUE_PROPERTY (0x10)  /**< Rx queue assigned to traffic class 0 */
250#define IX_ETH_DB_QOS_TRAFFIC_CLASS_1_RX_QUEUE_PROPERTY (0x11)  /**< Rx queue assigned to traffic class 1 */
251#define IX_ETH_DB_QOS_TRAFFIC_CLASS_2_RX_QUEUE_PROPERTY (0x12)  /**< Rx queue assigned to traffic class 2 */
252#define IX_ETH_DB_QOS_TRAFFIC_CLASS_3_RX_QUEUE_PROPERTY (0x13)  /**< Rx queue assigned to traffic class 3 */
253#define IX_ETH_DB_QOS_TRAFFIC_CLASS_4_RX_QUEUE_PROPERTY (0x14)  /**< Rx queue assigned to traffic class 4 */
254#define IX_ETH_DB_QOS_TRAFFIC_CLASS_5_RX_QUEUE_PROPERTY (0x15)  /**< Rx queue assigned to traffic class 5 */
255#define IX_ETH_DB_QOS_TRAFFIC_CLASS_6_RX_QUEUE_PROPERTY (0x16)  /**< Rx queue assigned to traffic class 6 */
256#define IX_ETH_DB_QOS_TRAFFIC_CLASS_7_RX_QUEUE_PROPERTY (0x17)  /**< Rx queue assigned to traffic class 7 */
257
258/* private property used by EthAcc to indicate queue configuration complete */
259#define IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE (0x18) /**< Queue configuration complete */
260     
261/* padding field sizes */
262#define IX_ETH_DB_WIFI_MIN_PAD_SIZE (0x0)       /**< Minimum pad size */
263#define IX_ETH_DB_WIFI_MAX_PAD_SIZE (0x10)      /**< Maximum pad size */
264
265/**
266 *
267 * @brief The IEEE 802.3 Ethernet MAC address structure.
268 *
269 * The data should be packed with bytes xx:xx:xx:xx:xx:xx
270 *
271 * @note The data must be packed in network byte order.
272 */
273typedef struct 
274{
275   UINT8 macAddress[IX_IEEE803_MAC_ADDRESS_SIZE];
276} IX_OSAL_ATTRIBUTE_PACKED IxEthDBMacAddr;
277
278/**
279 *
280 * @brief The WI-FI record types enum.
281 *
282 * The type value should be any of the types
283 *
284 */
285typedef enum
286{
287    IX_ETH_DB_WIFI_AP_TO_STA = 0x0,     /**< Ap to Sta record */
288    IX_ETH_DB_WIFI_AP_TO_AP  = 0x1,     /**< Ap to Ap record */
289    IX_ETH_DB_WIFI_TO_ETHER  = 0x2,     /**< To Ether record */
290    IX_ETH_DB_WIFI_TO_LOCAL  = 0x3      /**< To Local record */
291} IxEthDBWiFiRecordType;
292
293/**
294 *
295 * @brief The WI-FI VLAN tag/untag enum.
296 *
297 * The tag value should be either tag or untag
298 *
299 */
300typedef enum
301{
302    IX_ETH_DB_WIFI_VLAN_NOTAG  = 0x0,   /**< Tag 802.11 frames */
303    IX_ETH_DB_WIFI_VLAN_TAG    = 0x1    /**< Untag 802.11 frames */
304} IxEthDBWiFiVlanTag;
305
306/**
307 *
308 * @brief The user wi-fi input parameters structure.
309 *
310 * @note The data must be packed in network byte order.
311 */
312typedef struct
313{
314   IxEthDBWiFiRecordType recType;                       /* AP, STA, ETHER or LOCAL type */
315   IxEthDBWiFiVlanTag vlanTagFlag;                      /* Tag/untag or untag 802.11 frames */
316   UINT32 logicalPortID;                                /* Logical port ID (0-39) */
317   UINT8 padLength;                                     /* Size of pad field in bytes  max 16 & min 0 */
318   UINT8 gatewayMacAddr[IX_IEEE803_MAC_ADDRESS_SIZE];   /* Peer AP Gateway address */
319   UINT8 bssid[IX_IEEE803_MAC_ADDRESS_SIZE];            /* BSSID */
320} IxEthDBWiFiRecData;
321
322/**
323 * @ingroup IxEthDB
324 *
325 * @brief Definition of an IXP400 port.
326 */
327typedef UINT32 IxEthDBPortId;
328
329/**
330 * @ingroup IxEthDB
331 *
332 * @brief Port dependency map definition
333 */
334typedef UINT8 IxEthDBPortMap[32];
335   
336/**
337 * @ingroup IxEthDB
338 *
339 * @fn IxEthDBStatus ixEthDBInit(void)
340 *
341 * @brief Initializes the Ethernet learning/filtering database
342 *
343 * @note calling this function multiple times does not constitute an error;
344 * redundant calls will be ignored, returning IX_ETH_DB_SUCCESS
345 *
346 * @retval IX_ETH_DB_SUCCESS initialization was successful
347 * @retval IX_ETH_DB_FAIL initialization failed (OS error)
348 */
349IX_ETH_DB_PUBLIC
350IxEthDBStatus ixEthDBInit(void);
351 
352/**
353 * @ingroup IxEthDB
354 *
355 * @fn IxEthDBStatus ixEthDBUnload(void)
356 *
357 * @brief Stops and prepares the EthDB component for unloading.
358 *
359 * @retval IX_ETH_DB_SUCCESS de-initialization was successful
360 * @retval IX_ETH_DB_BUSY de-initialization failed, ports must be disabled first
361 * @retval IX_ETH_DB_FAIL de-initialization failed (OS error)
362 */
363IX_ETH_DB_PUBLIC
364IxEthDBStatus ixEthDBUnload(void);
365
366/**
367 * @ingroup IxEthDB
368 *
369 * @fn void ixEthDBPortInit(IxEthDBPortId portID)
370 *
371 * @brief Initializes a port
372 *
373 * This function is called automatically by the Ethernet Access
374 * ixEthAccPortInit() routine for Ethernet NPE ports and should be manually
375 * called for any user-defined port (any port that is not one of
376 * the two Ethernet NPEs).
377 *
378 * @param portID @ref IxEthDBPortId [in] - ID of the port to be initialized
379 *
380 * @see IxEthDBPortDefs.h for port definitions
381 *
382 * @note calling this function multiple times does not constitute an error;
383 * redundant calls will be ignored
384 */
385IX_ETH_DB_PUBLIC
386void ixEthDBPortInit(IxEthDBPortId portID);
387
388
389/**
390 * @ingroup IxEthDB
391 *
392 * @fn IxEthDBStatus ixEthDBPortEnable(IxEthDBPortId portID)
393 *
394 * @brief Enables a port
395 *
396 * This function is called automatically from the Ethernet Access component
397 * ixEthAccPortEnable() routine for Ethernet NPE ports and should be manually
398 * called for any user-defined port (any port that is not one of
399 * the Ethernet NPEs).
400 *
401 * @param portID @ref IxEthDBPortId [in] - ID of the port to enable processing on
402 *
403 * @retval IX_ETH_DB_SUCCESS if enabling is successful
404 * @retval IX_ETH_DB_FAIL if the enabling was not successful due to
405 * a message handler error
406 * @retval IX_ETH_DB_MAC_UNINITIALIZED the MAC address of this port was
407 * not initialized (only for Ethernet NPEs)
408 * @retval IX_ETH_DB_INVALID_PORT if portID is invalid
409 *
410 * @pre ixEthDBPortAddressSet needs to be called prior to enabling the port events
411 * for Ethernet NPEs
412 *
413 * @see ixEthDBPortAddressSet
414 *
415 * @see IxEthDBPortDefs.h for port definitions
416 *
417 * @note calling this function multiple times does not constitute an error;
418 * redundant calls will be ignored
419 */
420IX_ETH_DB_PUBLIC
421IxEthDBStatus ixEthDBPortEnable(IxEthDBPortId portID);
422
423/**
424 * @ingroup IxEthDB
425 *
426 * @fn IxEthDBStatus ixEthDBPortDisable(IxEthDBPortId portID)
427 *
428 * @brief Disables processing on a port
429 *
430 * This function is called automatically from the Ethernet Access component
431 * ixEthAccPortDisable() routine for Ethernet NPE ports and should be manually
432 * called for any user-defined port (any port that is not one of
433 * the Ethernet NPEs).
434 *
435 * @note Calling ixEthAccPortDisable() will disable the respective Ethernet NPE.
436 * After Ethernet NPEs are disabled they are stopped therefore
437 * when re-enabled they need to be reset, downloaded with microcode and started.
438 * For learning to restart working the user needs to call again
439 * ixEthAccPortUnicastMacAddressSet or ixEthDBUnicastAddressSet
440 * with the respective port MAC address.
441 * Residual MAC addresses learnt before the port was disabled are deleted as soon
442 * as the port is disabled. This only applies to dynamic (learnt) entries, static
443 * entries do not dissapear when the port is disabled.
444 *
445 * @param portID @ref IxEthDBPortId [in] - ID of the port to disable processing on
446 *
447 * @retval IX_ETH_DB_SUCCESS if disabling is successful
448 * @retval IX_ETH_DB_FAIL if the disabling was not successful due to
449 * a message handler error
450 * @retval IX_ETH_DB_INVALID_PORT if portID is invalid
451 *
452 * @note calling this function multiple times after the first time completed successfully
453 * does not constitute an error; redundant calls will be ignored and return IX_ETH_DB_SUCCESS
454*/
455IX_ETH_DB_PUBLIC
456IxEthDBStatus ixEthDBPortDisable(IxEthDBPortId portID);
457
458/**
459 * @ingroup IxEthDB
460 *
461 * @fn IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
462 *
463 * @brief Sets the port MAC address
464 *
465 * This function is to be called from the Ethernet Access component top-level
466 * ixEthDBUnicastAddressSet(). Event processing cannot be enabled for a port
467 * until its MAC address has been set.
468 *
469 * @param portID @ref IxEthDBPortId [in] - ID of the port whose MAC address is set
470 * @param macAddr @ref IxEthDBMacAddr [in] - port MAC address
471 *
472 * @retval IX_ETH_DB_SUCCESS MAC address was set successfully
473 * @retval IX_ETH_DB_FAIL MAC address was not set due to a message handler failure
474 * @retval IX_ETH_DB_INVALID_PORT if the port is not an Ethernet NPE
475 *
476 * @see IxEthDBPortDefs.h for port definitions
477 */
478IX_ETH_DB_PUBLIC
479IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
480
481/**
482 * @ingroup IxEthDB
483 *
484 * @fn IxEthDBStatus ixEthDBFilteringPortMaximumFrameSizeSet(IxEthDBPortId portID, UINT32 maximumFrameSize)
485 *
486 * @brief Set the maximum frame size supported on the given port ID
487 *
488 * This functions set the maximum frame size supported on a specific port ID
489 *
490 * - Reentrant    - yes
491 * - ISR Callable - no
492 *
493 * @param portID @ref IxEthDBPortId [in] - port ID to configure
494 * @param maximumFrameSize UINT32 [in] - maximum frame size to configure
495 *
496 * @retval IX_ETH_DB_SUCCESS the port is configured
497 * @retval IX_ETH_DB_PORT_UNINITIALIZED the port has not been initialized
498 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
499 * @retval IX_ETH_DB_INVALID_ARG size parameter is out of range
500 * @retval IX_ETH_DB_NO_PERMISSION selected port is not an Ethernet NPE
501 * @retval IX_FAIL unknown OS or NPE communication error
502 *
503 * @note
504 * This maximum frame size is used to filter the frames based on their
505 * destination addresses and the capabilities of the destination port.
506 * The mximum value that can be set for a NPE port is 16320.
507 * (IX_ETHNPE_ACC_FRAME_LENGTH_MAX)
508 */
509IX_ETH_DB_PUBLIC
510IxEthDBStatus ixEthDBFilteringPortMaximumFrameSizeSet(IxEthDBPortId portID, UINT32 maximumFrameSize);
511
512/**
513 * @ingroup IxEthDB
514 *
515 * @fn IxEthDBStatus ixEthDBFilteringStaticEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
516 *
517 * @brief Populate the Ethernet learning/filtering database with a static MAC address
518 *
519 * Populates the Ethernet learning/filtering database with a static MAC address. The entry will not be subject to aging.
520 * If there is an entry (static or dynamic) with the corresponding MAC address on any port this entry will take precedence.
521 * Any other entry with the same MAC address will be removed.
522 *
523 * - Reentrant    - yes
524 * - ISR Callable - yes
525 *
526 * @param portID @ref IxEthDBPortId [in] - port ID to add the static address to
527 * @param macAddr @ref IxEthDBMacAddr [in] - static MAC address to add
528 *
529 * @retval IX_ETH_DB_SUCCESS the add was successful
530 * @retval IX_ETH_DB_FAIL failed to populate the database entry
531 * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
532 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
533 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
534 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
535 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
536 */
537IX_ETH_DB_PUBLIC
538IxEthDBStatus ixEthDBFilteringStaticEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
539
540/**
541 * @ingroup IxEthDB
542 *
543 * @fn IxEthDBStatus ixEthDBFilteringDynamicEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
544 *
545 * @brief Populate the Ethernet learning/filtering database with a dynamic MAC address
546 *
547 * Populates the Ethernet learning/filtering database with a dynamic MAC address. This entry will be subject to normal
548 * aging function, if aging is enabled on its port.
549 * If there is an entry (static or dynamic) with the same MAC address on any port this entry will take precedence.
550 * Any other entry with the same MAC address will be removed.
551 *
552 * - Reentrant    - yes
553 * - ISR Callable - yes
554 *
555 * @param portID @ref IxEthDBPortId [in] - port ID to add the dynamic address to
556 * @param macAddr @ref IxEthDBMacAddr [in] - static MAC address to add
557 *
558 * @retval IX_ETH_DB_SUCCESS the add was successful
559 * @retval IX_ETH_DB_FAIL failed to populate the database entry
560 * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
561 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
562 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
563 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
564 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
565 */
566IX_ETH_DB_PUBLIC
567IxEthDBStatus ixEthDBFilteringDynamicEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
568
569/**
570 * @ingroup IxEthDB
571 *
572 * @fn IxEthDBStatus ixEthDBFilteringEntryDelete(IxEthDBMacAddr *macAddr)
573 *
574 * @brief Removes a MAC address entry from the Ethernet learning/filtering database
575 *
576 * @param macAddr IxEthDBMacAddr [in] - MAC address to remove
577 *
578 * - Reentrant    - yes
579 * - ISR Callable - no
580 *
581 * @retval IX_ETH_DB_SUCCESS the removal was successful
582 * @retval IX_ETH_DB_NO_SUCH_ADDR failed to remove the address (not in the database)
583 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
584 * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
585 */
586IX_ETH_DB_PUBLIC
587IxEthDBStatus ixEthDBFilteringEntryDelete(IxEthDBMacAddr *macAddr);
588
589/**
590 * @ingroup IxEthDB
591 *
592 * @fn IxEthDBStatus ixEthDBFilteringPortSearch(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
593 *
594 * @brief Search the Ethernet learning/filtering database for the given MAC address and port ID
595 *
596 * This functions searches the database for a specific port ID and MAC address. Both the port ID
597 * and the MAC address have to match in order for the record to be reported as found.
598 *
599 * - Reentrant    - yes
600 * - ISR Callable - no
601 *
602 * @param portID @ref IxEthDBPortId [in] - port ID to search for
603 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to search for
604 *
605 * @retval IX_ETH_DB_SUCCESS the record exists in the database
606 * @retval IX_ETH_DB_INVALID_ARG invalid macAddr pointer argument
607 * @retval IX_ETH_DB_NO_SUCH_ADDR the record was not found in the database
608 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
609 * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
610 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
611 */
612IX_ETH_DB_PUBLIC
613IxEthDBStatus ixEthDBFilteringPortSearch(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
614
615/**
616 * @ingroup IxEthDB
617 *
618 * @fn IxEthDBStatus ixEthDBFilteringDatabaseSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr)
619 *
620 * @brief Search the Ethernet learning/filtering database for a MAC address and return the port ID
621 *
622 * Searches the database for a MAC address. The function returns the portID for the
623 * MAC address record, if found. If no match is found the function returns IX_ETH_DB_NO_SUCH_ADDR.
624 * The portID is only valid if the function finds a match.
625 *
626 * - Reentrant    - yes
627 * - ISR Callable - no
628 *
629 * @param portID @ref IxEthDBPortId [in] - port ID the address belongs to (populated only on a successful search)
630 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to search for
631 *
632 * @retval IX_ETH_DB_SUCCESS the record exists in the database
633 * @retval IX_ETH_DB_NO_SUCH_ADDR the record was not found in the database
634 * @retval IX_ETH_DB_INVALID_ARG invalid macAddr or portID pointer argument(s)
635 */
636IX_ETH_DB_PUBLIC
637IxEthDBStatus ixEthDBFilteringDatabaseSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr);
638
639/**
640 * @ingroup IxEthDB
641 *
642 * @fn IxEthDBStatus ixEthDBFilteringPortUpdatingSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr)
643 *
644 * @brief Search the filtering database for a MAC address, return the port ID and reset the record age
645 *
646 * Searches the database for a MAC address. The function returns the portID for the
647 * MAC address record and resets the entry age to 0, if found.
648 * If no match is found the function returns IX_ETH_DB_NO_SUCH_ADDR.
649 * The portID is only valid if the function finds a match.
650 *
651 * - Reentrant      - yes
652 * - ISR Callable   - no
653 *
654 * @retval IX_ETH_DB_SUCCESS the MAC address was found
655 * @retval IX_ETH_DB_NO_SUCH_ADDR the MAC address was not found
656 * @retval IX_ETH_DB_INVALID_ARG invalid macAddr or portID pointer argument(s)
657 */
658IX_ETH_DB_PUBLIC
659IxEthDBStatus ixEthDBFilteringPortUpdatingSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr);
660
661/**
662 * @ingroup IxEthDB
663 *
664 * @def IX_ETH_DB_MAINTENANCE_TIME
665 *
666 * @brief The @ref ixEthDBDatabaseMaintenance must be called by the user at a frequency of
667 * IX_ETH_DB_MAINTENANCE_TIME
668 *
669 */
670#define IX_ETH_DB_MAINTENANCE_TIME (1 * 60) /* 1 Minute */
671
672/**
673 * @ingroup IxEthDB
674 *
675 * @def IX_ETH_DB_LEARNING_ENTRY_AGE_TIME
676 *
677 * @brief The define specifies the filtering database age entry time. Static entries older than
678 * IX_ETH_DB_LEARNING_ENTRY_AGE_TIME +/- IX_ETH_DB_MAINTENANCE_TIME shall be removed.
679 *
680 */
681#define IX_ETH_DB_LEARNING_ENTRY_AGE_TIME (15 * 60 ) /* 15 Mins */
682
683/**
684 * @ingroup IxEthDB
685 *
686 * @fn IxEthDBStatus ixEthDBPortAgingDisable(IxEthDBPortId portID)
687 *
688 * @brief Disable the aging function for a specific port
689 *
690 * @param portID @ref IxEthDBPortId [in] - port ID to disable aging on
691 *
692 * - Reentrant    - yes
693 * - ISR Callable - no
694 *
695 * @retval IX_ETH_DB_SUCCESS aging disabled successfully
696 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
697 * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
698 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
699 */
700IX_ETH_DB_PUBLIC
701IxEthDBStatus ixEthDBPortAgingDisable(IxEthDBPortId portID);
702
703/**
704 * @ingroup IxEthDB
705 *
706 * @fn IxEthDBStatus ixEthDBPortAgingEnable(IxEthDBPortId portID)
707 *
708 * @brief Enable the aging function for a specific port
709 *
710 * Enables the aging of dynamic MAC address entries stored in the learning/filtering database
711 *
712 * @note The aging function relies on the @ref ixEthDBDatabaseMaintenance being called with a period of
713 * @ref IX_ETH_DB_MAINTENANCE_TIME seconds.
714 *
715 * - Reentrant    - yes
716 * - ISR Callable - no
717 *
718 * @param portID @ref IxEthDBPortId [in] - port ID to enable aging on
719 *
720 * @retval IX_ETH_DB_SUCCESS aging enabled successfully
721 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
722 * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
723 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
724 */
725IX_ETH_DB_PUBLIC
726IxEthDBStatus ixEthDBPortAgingEnable(IxEthDBPortId portID);
727
728/**
729 * @ingroup IxEthDB
730 *
731 * @fn void ixEthDBDatabaseMaintenance(void)
732 *
733 * @brief Performs a maintenance operation on the Ethernet learning/filtering database
734 *
735 * In order to perform a database maintenance this function must be called every
736 * @ref IX_ETH_DB_MAINTENANCE_TIME seconds. It should be called regardless of whether learning is
737 * enabled or not.
738 *
739 * - Reentrant    - no
740 * - ISR Callable - no
741 *
742 * @note this function call will be ignored if the learning feature is disabled
743 */
744IX_ETH_DB_PUBLIC
745void ixEthDBDatabaseMaintenance(void);
746
747/**
748 * @ingroup IxEthDB
749 *
750 * @fn IxEthDBStatus ixEthDBEventProcessorPauseModeSet (BOOL pauseEnable)
751 *
752 * @brief Pauses/resumes Ethernet DB event processor
753 *
754 * This API is provided to pause/resume Ethernet DB event processor
755 * without the need to kill and recreate event processor thread.
756 *
757 * - Reentrant    - no
758 * - ISR Callable - no
759 *
760 * @param  pauseEnable BOOL [in] - pause mode: TRUE/FALSE
761 *
762 * @retval IX_ETH_DB_SUCCESS Changing the pause mode is successful.
763 * @retval IX_ETH_DB_FAIL    Ethernet event processor is not started.
764 *                           So, changing the pause mode is unsuccessful.
765 */
766IX_ETH_DB_PUBLIC
767IxEthDBStatus ixEthDBEventProcessorPauseModeSet (BOOL pauseEnable);
768
769/**
770 * @ingroup IxEthDB
771 *
772 * @fn IxEthDBStatus ixEthDBFilteringDatabaseShow(IxEthDBPortId  portID)
773 *
774 * @brief This function displays the Mac Ethernet MAC address filtering tables.
775 *
776 * It displays the MAC address, port ID, entry type (dynamic/static),and age for
777 * the given port ID.
778 *
779 * - Reentrant    - no
780 * - ISR Callable - no
781 *
782 * @param portID @ref IxEthDBPortId [in] - port ID to display the MAC address entries
783 *
784 * @retval IX_ETH_DB_SUCCESS operation completed successfully
785 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
786 * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
787 * @retval IX_ETH_DB_FAIL record browser failed due to an internal busy or lock condition
788 *
789 * @note this function is deprecated and kept for compatibility reasons; use @ref ixEthDBFilteringDatabaseShowRecords instead
790 *
791 * @see ixEthDBFilteringDatabaseShowRecords
792 */
793IX_ETH_DB_PUBLIC
794IxEthDBStatus ixEthDBFilteringDatabaseShow(IxEthDBPortId portID);
795
796/**
797 * @ingroup IxEthDB
798 *
799 * @fn void ixEthDBFilteringDatabaseShowAll(void)
800 *
801 * @brief Displays the MAC address recorded in the filtering database for all registered
802 * ports (see IxEthDBPortDefs.h), grouped by port ID.
803 *
804 * - Reentrant    - no
805 * - ISR Callable - no
806 *
807 * @retval void
808 *
809 * @note this function is deprecated and kept for compatibility reasons; use @ref ixEthDBFilteringDatabaseShowRecords instead
810 *
811 * @see ixEthDBFilteringDatabaseShowRecords
812 */
813IX_ETH_DB_PUBLIC
814void ixEthDBFilteringDatabaseShowAll(void);
815
816/**
817 * @ingroup IxEthDB
818 *
819 * @fn IxEthDBStatus ixEthDBFilteringDatabaseShowRecords(IxEthDBPortId portID, IxEthDBRecordType recordFilter)
820 *
821 * @brief This function displays per port database records, given a record type filter
822 *
823 * The supported record type filters are:
824 *
825 * - IX_ETH_DB_FILTERING_RECORD - displays the non-VLAN filtering records (MAC address, age, static/dynamic)
826 * - IX_ETH_DB_FILTERING_VLAN_RECORD - displays the VLAN filtering records (MAC address, age, static/dynamic, VLAN ID, CFI, QoS class)
827 * - IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD - displays the previous two types of records
828 * - IX_ETH_DB_WIFI_RECORD - displays the WiFi header conversion records (MAC address, optional gateway MAC address) and WiFi header conversion parameters (BSSID, Duration/ID)
829 * - IX_ETH_DB_FIREWALL_RECORD - displays the firewall MAC address table and firewall operating mode (white list/black list)
830 * - IX_ETH_DB_ALL_RECORD_TYPES - displays all the record types
831 * - IX_ETH_DB_NO_RECORD_TYPE - displays only the port status (no records are displayed)
832 *
833 * Additionally, the status of each port will be displayed, containg the following information: type, capabilities, enabled status,
834 * aging enabled status, group membership and maximum frame size.
835 *
836 * The port ID can either be an actual port or IX_ETH_DB_ALL_PORTS, in which case the requested information
837 * will be displayed for all the ports (grouped by port)
838 *
839 * - Reentrant    - no
840 * - ISR Callable - no
841 *
842 * @param portID ID of the port to display information on (use IX_ETH_DB_ALL_PORTS for all the ports)
843 * @param recordFilter record type filter
844 *
845 * @retval IX_ETH_DB_SUCCESS operation completed successfully
846 * @retval IX_ETH_DB_INVALID_PORT portID is invalid
847 * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
848 */
849IX_ETH_DB_PUBLIC
850IxEthDBStatus ixEthDBFilteringDatabaseShowRecords(IxEthDBPortId portID, IxEthDBRecordType recordFilter);
851
852/**
853 * @ingroup IxEthDB
854 *
855 * @fn IxEthDBStatus ixEthDBPortDependencyMapSet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap)
856 *
857 * @brief Sets the dependency port map for a port
858 *
859 * @param portID ID of the port to set the dependency map to
860 * @param dependencyPortMap new dependency map (as bitmap, each bit set indicates a port being included)
861 *
862 * This function is used to share filtering information between ports.
863 * By adding a port into another port's dependency map the target port
864 * filtering data will import the filtering data from the port it depends on.
865 * Any changes to filtering data for a port - such as adding, updating or removing records -
866 * will trigger updates in the filtering information for all the ports depending on
867 * on the updated port.
868 *
869 * For example, if ports 2 and 3 are set in the port 0 dependency map the filtering
870 * information for port 0 will also include the filtering information from ports 2 and 3.
871 * Adding a record to port 2 will also trigger an update not only on port 2 but also on
872 * port 0.
873 *
874 * The dependency map is a 256 bit array where each bit corresponds to a port corresponding to the
875 * bit offset (bit 0 - port 0, bit 1 - port 1 etc). Setting a bit to 1 indicates that the corresponding
876 * port is the port map. For example, a dependency port map of 0x14 consists in the ports with IDs 2 and 4.
877 * Note that the last bit (offset 255) is reserved and should never be set (it will be automatically
878 * cleared by the function).
879 *
880 * By default, each port has a dependency port map consisting only of itself, i.e.
881 *
882 * @verbatim
883    IxEthDBPortMap portMap;
884   
885    // clear all ports from port map
886    memset(portMap, 0, sizeof (portMap));
887   
888    // include portID in port map
889    portMap[portID / 8] = 1 << (portID % 8);
890   @endverbatim
891 *
892 * - Reentrant    - no
893 * - ISR Callable - no
894 *
895 * @note Setting dependency maps is useful for NPE ports, which benefit from automatic updates
896 * of filtering information. Setting dependency maps for user-defined ports is not an error
897 * but will have no actual effect.
898 *
899 * @note Including a port in its own dependency map is not compulsory, however note that
900 * in this case updating the port will not trigger an update on the port itself, which
901 * might not be the intended behavior
902 *
903 * @retval IX_ETH_DB_SUCCESS operation completed successfully
904 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
905 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
906 * @retval IX_ETH_DB_INVALID_ARG invalid <i>dependencyPortMap</i> pointer
907 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Filtering is not available or not enabled for the port
908 */
909IX_ETH_DB_PUBLIC
910IxEthDBStatus ixEthDBPortDependencyMapSet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap);
911
912/**
913 * @ingroup IxEthDB
914 *
915 * @fn IxEthDBStatus ixEthDBPortDependencyMapGet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap)
916 *
917 * @brief Retrieves the dependency port map for a port
918 *
919 * @param portID ID of the port to set the dependency map to
920 * @param dependencyPortMap location where the port dependency map is to be copied
921 *
922 * This function will copy the port dependency map to a user specified location.
923 *
924 * - Reentrant    - no
925 * - ISR Callable - no
926 *
927 * @retval IX_ETH_DB_SUCCESS operation completed successfully
928 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
929 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
930 * @retval IX_ETH_DB_INVALID_ARG invalid <i>dependencyPortMap</i> pointer
931 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Filtering is not available or not enabled for the port
932 */
933IX_ETH_DB_PUBLIC
934IxEthDBStatus ixEthDBPortDependencyMapGet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap);
935
936/**
937 * @ingroup IxEthDB
938 *
939 * @fn IxEthDBStatus ixEthDBPortVlanTagSet(IxEthDBPortId portID, IxEthDBVlanTag vlanTag)
940 *
941 * @brief Sets the default 802.1Q VLAN tag for a given port
942 *
943 * @param portID @ref IxEthDBPortId [in] - ID of the port to set the default VLAN tag to
944 * @param vlanTag @ref IxEthDBVlanTag [in] - default 802.1Q VLAN tag
945 *
946 * The tag format has 16 bits and it is defined in the IEEE802.1Q specification.
947 * This tag will be used for tagging untagged frames (if enabled) and classifying
948 * unexpedited traffic into an internal traffic class (using the user priority field).
949 *
950 * <table border="1"> <caption> 802.1Q tag format </caption>
951 *    <tr> <td>  <b> 3 bits   <td> <b> 1 bit <td> <b> 12 bits </b>
952 *    <tr> <td> user priority <td>  CFI  <td>   VID
953 * </table>
954 *
955 * User Priority : Defines user priority, giving eight (2^3) priority levels. IEEE 802.1P defines
956 * the operation for these 3 user priority bits
957 *
958 * CFI : Canonical Format Indicator is always set to zero for Ethernet switches. CFI is used for
959 * compatibility reason between Ethernet type network and Token Ring type network. If a frame received
960 * at an Ethernet port has a CFI set to 1, then that frame should not be forwarded as it is to an untagged port.
961 *
962 * VID : VLAN ID is the identification of the VLAN, which is basically used by the standard 802.1Q.
963 * It has 12 bits and allow the id entification of 4096 (2^12) VLANs. Of the 4096 possible VIDs, a VID of 0
964 * is used to identify priority frames and value 4095 (FFF) is reserved, so the maximum possible VLAN
965 * configurations are 4,094.
966 *
967 * - Reentrant    - no
968 * - ISR Callable - no
969 *
970 * @retval IX_ETH_DB_SUCCESS operation completed successfully
971 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
972 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
973 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
974 * @retval IX_ETH_DB_INVALID_VLAN <i>vlanTag</i> argument does not parse to a valid 802.1Q VLAN tag
975 *
976 * @note a VLAN ID value of 0 indicates that the port is not part of any VLAN
977 * @note the value of the cannonical frame indicator (CFI) field is ignored, the
978 * field being used only in frame tagging operations
979 */
980IX_ETH_DB_PUBLIC
981IxEthDBStatus ixEthDBPortVlanTagSet(IxEthDBPortId portID, IxEthDBVlanTag vlanTag);
982
983/**
984 * @ingroup IxEthDB
985 *
986 * @fn IxEthDBStatus ixEthDBPortVlanTagGet(IxEthDBPortId portID, IxEthDBVlanTag *vlanTag)
987 *
988 * @brief Retrieves the default 802.1Q port VLAN tag for a given port (see also @ref ixEthDBPortVlanTagSet)
989 *
990 * @param portID @ref IxEthDBPortId [in] - ID of the port to retrieve the default VLAN tag from
991 * @param vlanTag @ref IxEthDBVlanTag [out] - location to write the default port 802.1Q VLAN tag to
992 *
993 * - Reentrant    - no
994 * - ISR Callable - no
995 *
996 * @retval IX_ETH_DB_SUCCESS operation completed successfully
997 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
998 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
999 * @retval IX_ETH_DB_INVALID_ARG invalid vlanTag pointer
1000 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1001 */
1002IX_ETH_DB_PUBLIC
1003IxEthDBStatus ixEthDBPortVlanTagGet(IxEthDBPortId portID, IxEthDBVlanTag *vlanTag);
1004
1005/**
1006 * @ingroup IxEthDB
1007 *
1008 * @fn IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag)
1009 *
1010 * @brief Sets the 802.1Q VLAN tag for a database record
1011 *
1012 * @param macAddr MAC address
1013 * @param vlanTag 802.1Q VLAN tag
1014 *
1015 * This function is used together with @ref ixEthDBVlanTagGet to provide MAC-based VLAN classification support.
1016 * Please note that the bridging application must contain specific code to make use of this feature (see below).
1017 *
1018 * VLAN tags can be set only in IX_ETH_DB_FILTERING_RECORD or IX_ETH_DB_FILTERING_VLAN_RECORD type records.
1019 * If to an IX_ETH_DB_FILTERING_RECORD type record is added a VLAN tag the record type is automatically
1020 * changed to IX_ETH_DB_FILTERING_VLAN_RECORD. Once this has occurred the record type will never
1021 * revert to a non-VLAN type (unless deleted and re-added).
1022 *
1023 * Record types used for different purposes (such as IX_ETH_DB_WIFI_RECORD) will be ignored by
1024 * this function.
1025 *
1026 * After using this function to associate a VLAN ID with a MAC address the VLAN ID can be extracted knowing the
1027 * MAC address using @ref ixEthDBVlanTagGet. This mechanism can be used to implement MAC-based VLAN classification
1028 * if a bridging application searches for the VLAN tag when receiving a frame based on the source MAC address
1029 * (contained in the <i>ixp_ne_src_mac</i> field of the buffer header).
1030 * If found in the database, the application can instruct the NPE to tag the frame by writing the VLAN tag
1031 * in the <i>ixp_ne_vlan_tci</i> field of the buffer header. This way the NPE will inspect the Egress tagging
1032 * rule associated with the given VLAN ID on the Tx port and tag the frame if Egress tagging on the VLAN is
1033 * allowed. Additionally, Egress tagging can be forced by setting the <i>ixp_ne_tx_flags.tag_over</i> and
1034 * <i>ixp_ne_tx_flags.tag_mode</i> flags in the buffer header.
1035 *
1036 * - Reentrant    - no
1037 * - ISR Callable - no
1038 *
1039 * @note this function will <b>not</b> add a filtering record, it can only be used to update an existing one
1040 *
1041 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1042 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer
1043 * @retval IX_ETH_DB_NO_SUCH_ADDR a filtering record with the specified MAC address was not found
1044 * @retval IX_ETH_DB_INVALID_VLAN <i>vlanTag</i> argument does not parse to a valid 802.1Q VLAN tag
1045 */
1046IX_ETH_DB_PUBLIC
1047IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag);
1048
1049/**
1050 * @ingroup IxEthDB
1051 *
1052 * @fn ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag)
1053 *
1054 * @brief Retrieves the 802.1Q VLAN tag from a database record given the record MAC address
1055 *
1056 * @param macAddr MAC address
1057 * @param vlanTag location to write the record 802.1Q VLAN tag to
1058 *
1059 * @note VLAN tags can be retrieved only from IX_ETH_DB_FILTERING_VLAN_RECORD type records
1060 *
1061 * This function is used together with ixEthDBVlanTagSet to provide MAC-based VLAN classification support.
1062 * Please note that the bridging application must contain specific code to make use of this feature (see @ref ixEthDBVlanTagSet).
1063 *
1064 * - Reentrant    - no
1065 * - ISR Callable - no
1066 *
1067 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1068 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>vlanTag</i> pointer
1069 * @retval IX_ETH_DB_NO_SUCH_ADDR a filtering record with the specified MAC address was not found
1070 */
1071IX_ETH_DB_PUBLIC
1072IxEthDBStatus ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag);
1073
1074/**
1075 * @ingroup IxEthDB
1076 *
1077 * @fn IxEthDBStatus ixEthDBPortVlanMembershipAdd(IxEthDBPortId portID, IxEthDBVlanId vlanID)
1078 *
1079 * @brief Adds a VLAN ID to a port's VLAN membership table
1080 *
1081 * Adding a VLAN ID to a port's VLAN membership table will cause frames tagged with the specified
1082 * VLAN ID to be accepted by the frame filter, if Ingress VLAN membership filtering is enabled.
1083 *
1084 * - Reentrant    - no
1085 * - ISR Callable - no
1086 *
1087 * @param portID @ref IxEthDBPortId [in] - ID of the port to add the VLAN ID membership to
1088 * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be added to the port membership table
1089 *
1090 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1091 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1092 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1093 * @retval IX_ETH_DB_INVALID_VLAN vlanID is not a valid VLAN ID
1094 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1095 * @retval IX_FAIL unknown OS or NPE communication error
1096 *
1097 * @note A port's default VLAN ID is always in its own membership table, hence there
1098 * is no need to explicitly add it using this function (although it is not an error
1099 * to do so)
1100 */
1101IX_ETH_DB_PUBLIC
1102IxEthDBStatus ixEthDBPortVlanMembershipAdd(IxEthDBPortId portID, IxEthDBVlanId vlanID);
1103
1104/**
1105 * @ingroup IxEthDB
1106 *
1107 * @fn IxEthDBStatus ixEthDBPortVlanMembershipRangeAdd(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax)
1108 *
1109 * @brief Adds a VLAN ID range to a port's VLAN membership table
1110 *
1111 * All the VLAN IDs in the specified range will be added to the port VLAN
1112 * membership table, including the range start and end VLAN IDs. Tagged frames with
1113 * VLAN IDs in the specified range will be accepted by the frame filter, if Ingress VLAN
1114 * membership filtering is enabled.
1115 *
1116 * - Reentrant    - no
1117 * - ISR Callable - no
1118 *
1119 * @param portID @ref IxEthDBPortId [in] - port ID to add the VLAN membership range into
1120 * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN ID range
1121 * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN ID range
1122 *
1123 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1124 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1125 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1126 * @retval IX_ETH_DB_INVALID_VLAN the specified VLAN IDs are invalid or do not constitute a range
1127 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1128 * @retval IX_FAIL unknown OS or NPE communication error
1129 *
1130 * @note Is is valid to use the same VLAN ID for both vlanIDMin and vlanIDMax, in which case this
1131 * function will behave as @ref ixEthDBPortVlanMembershipAdd
1132 *
1133 * @note A port's default VLAN ID is always in its own membership table, hence there is no need
1134 * to explicitly add it using this function (although it is not an error to do so)
1135 */
1136IX_ETH_DB_PUBLIC
1137IxEthDBStatus ixEthDBPortVlanMembershipRangeAdd(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax);
1138
1139/**
1140 * @ingroup IxEthDB
1141 *
1142 * @fn IxEthDBStatus ixEthDBPortVlanMembershipRemove(IxEthDBPortId portID, IxEthDBVlanId vlanID)
1143 *
1144 * @brief Removes a VLAN ID from a port's VLAN membership table
1145 *
1146 * Frames tagged with a VLAN ID which is not in a port's VLAN membership table
1147 * will be discarded by the frame filter, if Ingress membership filtering is enabled.
1148 *
1149 * - Reentrant    - no
1150 * - ISR Callable - no
1151 *
1152 * @param portID @ref IxEthDBPortId [in] - ID of the port to remove the VLAN ID membership from
1153 * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be removed from the port membership table
1154 *
1155 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1156 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1157 * @retval IX_ETH_DB_INVALID_VLAN vlanID is not a valid VLAN ID
1158 * @retval IX_ETH_DB_NO_PERMISSION attempted to remove the default VLAN ID
1159 * from the port membership table (vlanID was set to the default port VLAN ID)
1160 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1161 * @retval IX_FAIL unknown OS or NPE communication error
1162 *
1163 * @note A port's default VLAN ID cannot be removed from the port's membership
1164 * table; attempting it will return IX_ETH_DB_NO_PERMISSION
1165 */
1166IX_ETH_DB_PUBLIC
1167IxEthDBStatus ixEthDBPortVlanMembershipRemove(IxEthDBPortId portID, IxEthDBVlanId vlanID);
1168
1169/**
1170 * @ingroup IxEthDB
1171 *
1172 * @fn IxEthDBStatus ixEthDBPortVlanMembershipRangeRemove(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax)
1173 *
1174 * @brief Removes a VLAN ID range from a port's VLAN membership table
1175 *
1176 * All the VLAN IDs in the specified range will be removed from the port VLAN
1177 * membership table, including the range start and end VLAN IDs. Tagged frames
1178 * with VLAN IDs in the range will be discarded by the frame filter, if Ingress
1179 * membership filtering is enabled.
1180 *
1181 * - Reentrant    - no
1182 * - ISR Callable - no
1183 *
1184 * @param portID @ref IxEthDBPortId [in] - ID of the port to remove the VLAN membership range from
1185 * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN ID range
1186 * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN ID range
1187 *
1188 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1189 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1190 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1191 * @retval IX_ETH_DB_INVALID_VLAN the specified VLAN IDs are invalid or do not constitute a range
1192 * @retval IX_ETH_DB_NO_PERMISSION attempted to remove the default VLAN ID
1193 * from the port membership table (both vlanIDMin and vlanIDMax were set to the default port VLAN ID)
1194 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1195 * @retval IX_FAIL unknown OS or NPE communication error
1196 *
1197 * @note Is is valid to use the same VLAN ID for both vlanIDMin and vlanIDMax, in which case
1198 * function will behave as @ref ixEthDBPortVlanMembershipRemove
1199 *
1200 * @note If the given range overlaps the default port VLAN ID this function
1201 * will remove all the VLAN IDs in the range except for the port VLAN ID from its
1202 * own membership table. This situation will be silently dealt with (no error message
1203 * will be returned) as long as the range contains more than one value (i.e. at least
1204 * one other value, apart from the default port VLAN ID). If the function is called
1205 * with the vlanIDMin and vlanIDMax parameters both set to the port default VLAN ID, the
1206 * function will infer that an attempt was specifically made to remove the default port
1207 * VLAN ID from the port membership table, in which case the return value will be
1208 * IX_ETH_DB_NO_PERMISSION.
1209 */
1210IX_ETH_DB_PUBLIC
1211IxEthDBStatus ixEthDBPortVlanMembershipRangeRemove(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax);
1212
1213/**
1214 * @ingroup IxEthDB
1215 *
1216 * @fn IxEthDBStatus ixEthDBPortVlanMembershipSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
1217 *
1218 * @brief Sets a port's VLAN membership table
1219 *
1220 * Sets a port's VLAN membership table from a complete VLAN table containing all the possible
1221 * 4096 VLAN IDs. The table format is an array containing 4096 bits (512 bytes), where each bit
1222 * indicates whether the VLAN at that bit index is in the port's membership list (if set) or
1223 * not (unset).
1224 *
1225 * The bit at index 0, indicating VLAN ID 0, indicates no VLAN membership and therefore no
1226 * other bit must be set if bit 0 is set.
1227 *
1228 * The bit at index 4095 is reserved and should never be set (it will be ignored if set).
1229 *
1230 * The bit referencing the same VLAN ID as the default port VLAN ID should always be set, as
1231 * the membership list must contain at least the default port VLAN ID.
1232 *
1233 * - Reentrant    - no
1234 * - ISR Callable - no
1235 *
1236 * @param portID @ref IxEthDBPortId [in] - port ID to set the VLAN membership table to
1237 * @param vlanSet @ref IxEthDBVlanSet [in] - pointer to the VLAN membership table
1238 *
1239 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1240 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1241 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1242 * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
1243 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1244 * @retval IX_FAIL unknown OS or NPE communication error
1245 */
1246IX_ETH_DB_PUBLIC
1247IxEthDBStatus ixEthDBPortVlanMembershipSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
1248
1249/**
1250 * @ingroup IxEthDB
1251 *
1252 * @fn IxEthDBStatus ixEthDBPortVlanMembershipGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
1253 *
1254 * @brief Retrieves a port's VLAN membership table
1255 *
1256 * Retrieves the complete VLAN membership table from a port, containing all the possible
1257 * 4096 VLAN IDs. The table format is an array containing 4096 bits (512 bytes), where each bit
1258 * indicates whether the VLAN at that bit index is in the port's membership list (if set) or
1259 * not (unset).
1260 *
1261 * The bit at index 0, indicating VLAN ID 0, indicates no VLAN membership and therefore no
1262 * other bit will be set if bit 0 is set.
1263 *
1264 * The bit at index 4095 is reserved and will not be set (it will be ignored if set).
1265 *
1266 * The bit referencing the same VLAN ID as the default port VLAN ID will always be set, as
1267 * the membership list must contain at least the default port VLAN ID.
1268 *
1269 * - Reentrant    - no
1270 * - ISR Callable - no
1271 *
1272 * @param portID @ref IxEthDBPortId [in] - port ID to retrieve the VLAN membership table from
1273 * @param vlanSet @ref IxEthDBVlanSet [out] - pointer a location where the VLAN membership table will be
1274 *                written to
1275 *
1276 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1277 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1278 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1279 * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
1280 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1281 */
1282IX_ETH_DB_PUBLIC
1283IxEthDBStatus ixEthDBPortVlanMembershipGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
1284
1285/**
1286 * @ingroup IxEthDB
1287 *
1288 * @fn IxEthDBStatus ixEthDBAcceptableFrameTypeSet(IxEthDBPortId portID, IxEthDBFrameFilter frameFilter)
1289 *
1290 * @brief Sets a port's acceptable frame type filter
1291 *
1292 * The acceptable frame type is one (or a combination) of the following values:
1293 *    - IX_ETH_DB_ACCEPT_ALL_FRAMES       - accepts all the frames
1294 *    - IX_ETH_DB_UNTAGGED_FRAMES         - accepts untagged frames
1295 *    - IX_ETH_DB_VLAN_TAGGED_FRAMES      - accepts tagged frames
1296 *    - IX_ETH_DB_PRIORITY_TAGGED_FRAMES  - accepts tagged frames with VLAN ID set to 0 (no VLAN membership)
1297 *
1298 * Except for using the exact values given above only the following combinations are valid:
1299 *    - IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES
1300 *    - IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_PRIORITY_TAGGED_FRAMES
1301 *
1302 * Please note that IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES is equivalent
1303 * to IX_ETH_DB_ACCEPT_ALL_FRAMES.
1304 *
1305 * - Reentrant    - no
1306 * - ISR Callable - no
1307 *
1308 * @note by default the acceptable frame type filter is set to IX_ETH_DB_ACCEPT_ALL_FRAMES
1309 *
1310 * @note setting the acceptable frame type to PRIORITY_TAGGED_FRAMES is internally
1311 * accomplished by changing the frame filter to VLAN_TAGGED_FRAMES and setting the
1312 * VLAN membership list to include only VLAN ID 0; the membership list will need
1313 * to be restored manually to an appropriate value if the acceptable frame type
1314 * filter is changed back to ACCEPT_ALL_FRAMES or VLAN_TAGGED_FRAMES; failure to do so
1315 * will filter all VLAN traffic bar frames tagged with VLAN ID 0
1316 *
1317 * @param portID @ref IxEthDBPortId [in] - port ID to set the acceptable frame type filter to
1318 * @param frameFilter @ref IxEthDBFrameFilter [in] - acceptable frame type filter
1319 *
1320 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1321 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1322 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1323 * @retval IX_ETH_DB_INVALID_ARG invalid frame type filter
1324 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1325 * @retval IX_FAIL unknown OS or NPE communication error
1326 */
1327IX_ETH_DB_PUBLIC
1328IxEthDBStatus ixEthDBAcceptableFrameTypeSet(IxEthDBPortId portID, IxEthDBFrameFilter frameFilter);
1329
1330/**
1331 * @ingroup IxEthDB
1332 *
1333 * @fn IxEthDBStatus ixEthDBAcceptableFrameTypeGet(IxEthDBPortId portID, IxEthDBFrameFilter *frameFilter)
1334 *
1335 * @brief Retrieves a port's acceptable frame type filter
1336 *
1337 * For a description of the acceptable frame types see @ref ixEthDBAcceptableFrameTypeSet
1338 *
1339 * - Reentrant    - no
1340 * - ISR Callable - no
1341 *
1342 * @param portID @ref IxEthDBPortId [in] - port ID to retrieve the acceptable frame type filter from
1343 * @param frameFilter @ref IxEthDBFrameFilter [out] - location to store the acceptable frame type filter
1344 *
1345 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1346 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1347 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1348 * @retval IX_ETH_DB_INVALID_ARG invalid <i>frameFilter</i> pointer argument
1349 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1350 */
1351IX_ETH_DB_PUBLIC
1352IxEthDBStatus ixEthDBAcceptableFrameTypeGet(IxEthDBPortId portID, IxEthDBFrameFilter *frameFilter);
1353
1354/**
1355 * @ingroup IxEthDB
1356 *
1357 * @fn IxEthDBStatus ixEthDBPriorityMappingTableSet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable)
1358 *
1359 * @brief Sets a port's priority mapping table
1360 *
1361 * The priority mapping table is an 8x2 table mapping a QoS (user) priority into an internal
1362 * traffic class. There are 8 valid QoS priorities (0..7, 0 being the lowest) which can be
1363 * mapped into one of the 8 available traffic classes (0..7, 0 being the lowest).
1364 * If a custom priority mapping table is not specified using this function the following
1365 * default priority table will be used (as per IEEE 802.1Q and IEEE 802.1D):
1366 *
1367 * <table border="1"> <caption> QoS traffic classes  </caption>
1368 *    <tr> <td> <b> QoS priority <td> <b> Default traffic class <td> <b> Traffic type </b>
1369 *    <tr> <td>      0       <td>           2           <td> Best effort, default class for unexpedited traffic
1370 *    <tr> <td>      1       <td>           0           <td> Background traffic
1371 *    <tr> <td>      2       <td>           1           <td> Spare bandwidth
1372 *    <tr> <td>      3       <td>           3           <td> Excellent effort
1373 *    <tr> <td>      4       <td>           4           <td> Controlled load
1374 *    <tr> <td>      5       <td>           5           <td> Video traffic
1375 *    <tr> <td>      6       <td>           6           <td> Voice traffic
1376 *    <tr> <td>      7       <td>           7           <td> Network control
1377 * </table>
1378 *
1379 * - Reentrant    - no
1380 * - ISR Callable - no
1381 *
1382 * @param portID @ref IxEthDBPortId [in] - port ID of the port to set the priority mapping table to
1383 * @param priorityTable @ref IxEthDBPriorityTable [in] - location of the user priority table
1384 *
1385 * @note The provided table will be copied into internal data structures in EthDB and
1386 * can be deallocated by the called after this function has completed its execution, if
1387 * so desired
1388 *
1389 * @warning The number of available traffic classes differs depending on the NPE images
1390 * and queue configuration. Check IxEthDBQoS.h for up-to-date information on the availability of
1391 * traffic classes. Note that specifiying a traffic class in the priority map which exceeds
1392 * the system availability will produce an IX_ETH_DB_INVALID_PRIORITY return error code and no
1393 * priority will be remapped.
1394 *
1395 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1396 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1397 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1398 * @retval IX_ETH_DB_INVALID_ARG invalid <i>priorityTable</i> pointer
1399 * @retval IX_ETH_DB_INVALID_PRIORITY at least one priority value exceeds
1400 * the current number of available traffic classes
1401 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1402 * @retval IX_FAIL unknown OS or NPE communication error
1403 */
1404IX_ETH_DB_PUBLIC
1405IxEthDBStatus ixEthDBPriorityMappingTableSet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable);
1406
1407/**
1408 * @ingroup IxEthDB
1409 *
1410 * @fn IxEthDBStatus ixEthDBPriorityMappingTableGet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable)
1411 *
1412 * @brief Retrieves a port's priority mapping table
1413 *
1414 * The priority mapping table for the given port will be copied in the location
1415 * specified by the caller using "priorityTable"
1416 *
1417 * - Reentrant    - no
1418 * - ISR Callable - no
1419 *
1420 * @param portID ID @ref IxEthDBPortId [in] - of the port to retrieve the priority mapping table from
1421 * @param priorityTable @ref IxEthDBPriorityTable [out] - pointer to a user specified location where the table will be copied to
1422 *
1423 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1424 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1425 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1426 * @retval IX_ETH_DB_INVALID_ARG invalid priorityTable pointer
1427 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1428 */
1429IX_ETH_DB_PUBLIC
1430IxEthDBStatus ixEthDBPriorityMappingTableGet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable);
1431
1432/**
1433 * @ingroup IxEthDB
1434 *
1435 * @fn IxEthDBStatus ixEthDBPriorityMappingTableUpdate(IxEthDBPortId portID)
1436 *
1437 * @brief Reloads the last port priority mapping table set by the user.
1438 *        (see also @ref ixEthDBPriorityMappingTableSet).
1439 *
1440 * @param portID @ref IxEthDBPortId [in] - ID of the port
1441 *
1442 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1443 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1444 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1445 * @retval IX_ETH_DB_FAIL    operatoin fails
1446 *
1447 * @note
1448 *    The function is useful for error-handling module to handle
1449 *    soft-error in Ethernet NPE. <br>
1450 *    As this function is needed in non VLAN/QoS case to reconfigure
1451 *    Ethernet Rx queue, it does not checks for VLAN/QoS feature
1452 *    is enabled.
1453 */
1454IX_ETH_DB_PUBLIC
1455IxEthDBStatus ixEthDBPriorityMappingTableUpdate(IxEthDBPortId portID);
1456
1457/**
1458 * @ingroup IxEthDB
1459 *
1460 * @fn IxEthDBStatus ixEthDBPriorityMappingClassSet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority trafficClass)
1461 *
1462 * @brief Sets one QoS/user priority => traffic class mapping in a port's priority mapping table
1463 *
1464 * This function establishes a mapping between a user (QoS) priority and an internal traffic class.
1465 * The mapping will be saved in the port's priority mapping table. Use this function when not all
1466 * the QoS priorities need remapping (see also @ref ixEthDBPriorityMappingTableSet)
1467 *
1468 * - Reentrant    - no
1469 * - ISR Callable - no
1470 *
1471 * @param portID @ref IxEthDBPortId [in] - ID of the port to set the mapping to
1472 * @param userPriority @ref IxEthDBPriority [in] - user (QoS) priority, between 0 and 7 (0 being the lowest)
1473 * @param trafficClass @ref IxEthDBPriority [in] - internal traffic class, between 0 and 3 (0 being the lowest)
1474 *
1475 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1476 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1477 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1478 * @retval IX_ETH_DB_INVALID_PRIORITY <i>userPriority</i> out of range or
1479 * <i>trafficClass</i> is beyond the number of currently available traffic classes
1480 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1481 * @retval IX_FAIL unknown OS or NPE communication error
1482 */
1483IX_ETH_DB_PUBLIC
1484IxEthDBStatus ixEthDBPriorityMappingClassSet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority trafficClass);
1485
1486/**
1487 * @ingroup IxEthDB
1488 *
1489 * @fn IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass)
1490 *
1491 * @brief Retrieves one QoS/user priority => traffic class mapping in a port's priority mapping table
1492 *
1493 * This function retrieves the internal traffic class associated with a QoS (user) priority from a given
1494 * port's priority mapping table. Use this function when not all the QoS priority mappings are
1495 * required (see also @ref ixEthDBPriorityMappingTableGet)
1496 *
1497 * - Reentrant    - no
1498 * - ISR Callable - no
1499 *
1500 * @param portID @ref IxEthDBPortId [in] - ID of the port to set the mapping to
1501 * @param userPriority @ref IxEthDBPriority [in] - user (QoS) priority, between 0 and 7 (0 being the lowest)
1502 * @param trafficClass @ref IxEthDBPriority [out] - location to write the corresponding internal traffic class to
1503 *
1504 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1505 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1506 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1507 * @retval IX_ETH_DB_INVALID_PRIORITY invalid userPriority value (out of range)
1508 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1509 * @retval IX_ETH_DB_INVALID_ARG invalid <i>trafficClass</i> pointer argument
1510 */
1511IX_ETH_DB_PUBLIC
1512IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass);
1513
1514/**
1515 * @ingroup IxEthDB
1516 *
1517 * @fn IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL enabled)
1518 *
1519 * @brief Enables or disables Egress VLAN tagging for a port and a given VLAN
1520 *
1521 * This function enables or disables Egress VLAN tagging for the given port and VLAN ID.
1522 * If the VLAN tagging for a certain VLAN ID is enabled then all the frames to be
1523 * transmitted on the given port tagged with the same VLAN ID will be transmitted in a tagged format.
1524 * If tagging is not enabled for the given VLAN ID, the VLAN tag from the frames matching
1525 * this VLAN ID will be removed (the frames will be untagged).
1526 *
1527 * VLAN ID 4095 is reserved and should never be used with this function.
1528 * VLAN ID 0 has the special meaning of "No VLAN membership" and it is used in this
1529 * context to allow the port to send priority-tagged frames or not.
1530 *
1531 * By default, no Egress VLAN tagging is enabled on any port.
1532 *
1533 * - Reentrant    - no
1534 * - ISR Callable - no
1535 *
1536 * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the VLAN ID Egress tagging on
1537 * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be matched against outgoing frames
1538 * @param enabled BOOL [in] - TRUE to enable Egress VLAN tagging on the port and given VLAN, and
1539 *                FALSE to disable Egress VLAN tagging
1540 *
1541 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1542 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1543 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1544 * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range)
1545 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1546 * @retval IX_FAIL unknown OS or NPE communication error
1547 */
1548IX_ETH_DB_PUBLIC
1549IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL enabled);
1550
1551/**
1552 * @ingroup IxEthDB
1553 *
1554 * @fn IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL *enabled)
1555 *
1556 * @brief Retrieves the Egress VLAN tagging enabling status for a port and VLAN ID
1557 *
1558 * @param portID [in] - ID of the port to extract the Egress VLAN ID tagging status from
1559 * @param vlanID VLAN [in] - ID whose tagging status is to be extracted
1560 * @param enabled [in] - user-specifed location where the status is copied to; following
1561 * the successfull execution of this function the value will be TRUE if Egress VLAN
1562 * tagging is enabled for the given port and VLAN ID, and FALSE otherwise                                                 
1563 *
1564 * - Reentrant    - no
1565 * - ISR Callable - no
1566 *
1567 * @see ixEthDBEgressVlanEntryTaggingEnabledGet
1568 *
1569 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1570 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1571 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1572 * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range)
1573 * @retval IX_ETH_DB_INVALID_ARG invalid <i>enabled</i> argument pointer
1574 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1575 */
1576IX_ETH_DB_PUBLIC
1577IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL *enabled);
1578
1579/**
1580 * @ingroup IxEthDB
1581 *
1582 * @fn IxEthDBStatus ixEthDBEgressVlanRangeTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax, BOOL enabled)
1583 *
1584 * @brief Enables or disables Egress VLAN tagging for a port and given VLAN range
1585 *
1586 * This function is very similar to @ref ixEthDBEgressVlanEntryTaggingEnabledSet with the
1587 * difference that it can manipulate the Egress tagging status on multiple VLAN IDs,
1588 * defined by a contiguous range. Note that both limits in the range are explicitly
1589 * included in the execution of this function.
1590 *
1591 * - Reentrant    - no
1592 * - ISR Callable - no
1593 *
1594 * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the VLAN ID Egress tagging on
1595 * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN range to be matched against outgoing frames
1596 * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN range to be matched against outgoing frames
1597 * @param enabled BOOL [in] - TRUE to enable Egress VLAN tagging on the port and given VLAN range,
1598 *                and FALSE to disable Egress VLAN tagging
1599 *
1600 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1601 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1602 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1603 * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range), or do not constitute a range
1604 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1605 * @retval IX_ETH_DB_NO_PERMISSION attempted to explicitly remove the default port VLAN ID from the tagging table
1606 * @retval IX_FAIL unknown OS or NPE communication error
1607 *
1608 * @note Specifically removing the default port VLAN ID from the Egress tagging table by setting both vlanIDMin and vlanIDMax
1609 * to the VLAN ID portion of the PVID is not allowed by this function and will return IX_ETH_DB_NO_PERMISSION.
1610 * However, this can be circumvented, should the user specifically desire this, by either using a
1611 * larger range (vlanIDMin < vlanIDMax) or by using ixEthDBEgressVlanEntryTaggingEnabledSet.
1612 */
1613IX_ETH_DB_PUBLIC
1614IxEthDBStatus ixEthDBEgressVlanRangeTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax, BOOL enabled);
1615
1616/**
1617 * @ingroup IxEthDB
1618 *
1619 * @fn IxEthDBStatus ixEthDBEgressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
1620 *
1621 * @brief Sets the complete Egress VLAN tagging table for a port
1622 *
1623 * This function is used to set the VLAN tagging/untagging per VLAN ID for a given port
1624 * covering the entire VLAN ID range (0..4094). The <i>vlanSet</i> parameter is a 4096
1625 * bit array, each bit indicating the Egress behavior for the corresponding VLAN ID.
1626 * If a bit is set then outgoing frames with the corresponding VLAN ID will be transmitted
1627 * with the VLAN tag, otherwise the frame will be transmitted without the VLAN tag.
1628 *
1629 * Bit 0 has a special significance, indicating tagging or tag removal for priority-tagged
1630 * frames.
1631 *
1632 * Bit 4095 is reserved and should never be set (it will be ignored if set).
1633 *
1634 * - Reentrant    - no
1635 * - ISR Callable - no
1636 *
1637 * @param portID @ref IxEthDBPortId [in] - ID of the port whose Egress VLAN tagging behavior is set
1638 * @param vlanSet @ref IxEthDBVlanSet [in] - 4096 bit array controlling per-VLAN tagging and untagging
1639 *
1640 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1641 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1642 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1643 * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
1644 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1645 * @retval IX_FAIL unknown OS or NPE communication error
1646 *
1647 * @warning This function will automatically add the default port VLAN ID to the Egress tagging table
1648 * every time it is called. The user should manually call ixEthDBEgressVlanEntryTaggingEnabledSet to
1649 * prevent tagging on the default port VLAN ID if the default behavior is not intended.
1650 */
1651IX_ETH_DB_PUBLIC
1652IxEthDBStatus ixEthDBEgressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
1653
1654/**
1655 * @ingroup IxEthDB
1656 *
1657 * @fn IxEthDBStatus ixEthDBEgressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
1658 *
1659 * @brief Retrieves the complete Egress VLAN tagging table from a port
1660 *
1661 * This function copies the 4096 bit table controlling the Egress VLAN tagging into a user specified
1662 * area. Each bit in the array indicates whether tagging for the corresponding VLAN (the bit position
1663 * in the array) is enabled (the bit is set) or not (the bit is unset).
1664 *
1665 * Bit 4095 is reserved and should not be set (it will be ignored if set).
1666 *
1667 * @see ixEthDBEgressVlanTaggingEnabledSet
1668 *
1669 * @param portID @ref IxEthDBPortId [in] - ID of the port whose Egress VLAN tagging behavior is retrieved
1670 * @param vlanSet @ref IxEthDBVlanSet [out] - user location to copy the Egress tagging table into; should have
1671 * room to store 4096 bits (512 bytes)
1672 *
1673 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1674 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1675 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1676 * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
1677 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1678 */
1679IX_ETH_DB_PUBLIC
1680IxEthDBStatus ixEthDBEgressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
1681
1682/**
1683 * @ingroup IxEthDB
1684 *
1685 * @fn IxEthDBStatus ixEthDBIngressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBTaggingAction taggingAction)
1686 *
1687 * @brief Sets the Ingress VLAN tagging behavior for a port
1688 *
1689 * A port's Ingress tagging behavior is controlled by the taggingAction parameter,
1690 * which can take one of the following values:
1691 *
1692 * - IX_ETH_DB_PASS_THROUGH - leaves the frame unchanged (does not add or remove the VLAN tag)
1693 * - IX_ETH_DB_ADD_TAG - adds the VLAN tag if not present, using the default port VID
1694 * - IX_ETH_DB_REMOVE_TAG - removes the VLAN tag if present
1695 *
1696 * @param portID @ref IxEthDBPortId [in] - ID of the port whose Ingress VLAN tagging behavior is set
1697 * @param taggingAction @ref IxEthDBTaggingAction [in] - tagging behavior for the port
1698 *
1699 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1700 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1701 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1702 * @retval IX_ETH_DB_INVALID_ARG invalid <i>taggingAction</i> argument
1703 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1704 * @retval IX_FAIL unknown OS or NPE communication error
1705 */
1706IX_ETH_DB_PUBLIC
1707IxEthDBStatus ixEthDBIngressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBTaggingAction taggingAction);
1708
1709/**
1710 * @ingroup IxEthDB
1711 *
1712 * @fn IxEthDBStatus ixEthDBIngressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBTaggingAction *taggingAction)
1713 *
1714 * @brief Retrieves the Ingress VLAN tagging behavior from a port (see @ref ixEthDBIngressVlanTaggingEnabledSet)
1715 *
1716 * @param portID @ref IxEthDBPortId [in] - ID of the port whose Ingress VLAN tagging behavior is set
1717 * @param taggingAction @ref IxEthDBTaggingAction [out] - location where the tagging behavior for the port is written to
1718 *
1719 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1720 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1721 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1722 * @retval IX_ETH_DB_INVALID_ARG invalid <i>taggingAction</i> pointer argument
1723 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1724 */
1725IX_ETH_DB_PUBLIC
1726IxEthDBStatus ixEthDBIngressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBTaggingAction *taggingAction);
1727
1728/**
1729 * @ingroup IxEthDB
1730 *
1731 * @fn IxEthDBStatus ixEthDBVlanPortExtractionEnable(IxEthDBPortId portID, BOOL enable)
1732 *
1733 * @brief Enables or disables port ID extraction
1734 *
1735 * This feature can be used in the situation when a multi-port device (e.g. a switch)
1736 * is connected to an IXP4XX port and the device can provide incoming frame port
1737 * identification by tagging the TPID field in the Ethernet frame. Enabling
1738 * port extraction will instruct the NPE to copy the TPID field from the frame and
1739 * place it in the <i>ixp_ne_src_port</i> of the <i>ixp_buf</i> header. In addition,
1740 * the NPE restores the TPID field to 0.
1741 *
1742 * If the frame is not tagged the NPE will fill the <i>ixp_ne_src_port</i> with the
1743 * port ID of the MII interface the frame was received from.
1744 *
1745 * The TPID field is the least significant byte of the type/length field, which is
1746 * normally set to 0x8100 for 802.1Q-tagged frames.
1747 *
1748 * This feature is disabled by default.
1749 *
1750 * @param portID ID of the port to configure port ID extraction on
1751 * @param enable TRUE to enable port ID extraction and FALSE to disable it
1752 *
1753 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1754 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1755 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1756 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
1757 * @retval IX_FAIL unknown OS or NPE communication error
1758 */
1759IX_ETH_DB_PUBLIC
1760IxEthDBStatus ixEthDBVlanPortExtractionEnable(IxEthDBPortId portID, BOOL enable);
1761
1762/**
1763 * @ingroup IxEthDB
1764 *
1765 * @fn IxEthDBStatus ixEthDBFeatureCapabilityGet(IxEthDBPortId portID, IxEthDBFeature *featureSet)
1766 *
1767 * @brief Retrieves the feature capability set for a port
1768 *
1769 * This function retrieves the feature capability set for a port or the common capabilities shared between all
1770 * the ports, writing the feature capability set in a user specified location.
1771 *
1772 * The feature capability set will consist of a set formed by OR-ing one or more of the following values:
1773 * - IX_ETH_DB_LEARNING - Learning feature; enables EthDB to learn MAC address (filtering) records, including 802.1Q enabled records
1774 * - IX_ETH_DB_FILTERING - Filtering feature; enables EthDB to communicate with the NPEs for downloading filtering information in the NPEs; depends on the learning feature
1775 * - IX_ETH_DB_VLAN_QOS - VLAN/QoS feature; enables EthDB to configure NPEs to operate in VLAN/QoS aware modes
1776 * - IX_ETH_DB_FIREWALL - Firewall feature; enables EthDB to configure NPEs to operate in firewall mode, using white/black address lists
1777 * - IX_ETH_DB_SPANNING_TREE_PROTOCOL - Spanning tree protocol feature; enables EthDB to configure the NPEs as STP nodes
1778 * - IX_ETH_DB_WIFI_HEADER_CONVERSION - WiFi 802.3 to 802.11 header conversion feature; enables EthDB to handle WiFi conversion data
1779 *
1780 * Note that EthDB provides only the LEARNING feature for non-NPE ports.
1781 *
1782 * @param portID @ref IxEthDBPortId [in] - ID of the port to retrieve the capability set for
1783 * (use IX_ETH_DB_ALL_PORTS to retrieve the common capabilities shared between all the ports)
1784 * @param featureSet @ref IxEthDBFeature [out] - location where the capability set will be written to
1785 *
1786 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1787 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1788 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1789 * @retval IX_ETH_DB_INVALID_ARG invalid <i>featureSet</i> pointer
1790 */
1791IX_ETH_DB_PUBLIC
1792IxEthDBStatus ixEthDBFeatureCapabilityGet(IxEthDBPortId portID, IxEthDBFeature *featureSet);
1793
1794/**
1795 * @ingroup IxEthDB
1796 *
1797 * @fn IxEthDBStatus ixEthDBFeatureEnable(IxEthDBPortId portID, IxEthDBFeature feature, BOOL enabled)
1798 *
1799 * @brief Enables or disables one or more EthDB features
1800 *
1801 * Selects one or more features (see @ref ixEthDBFeatureCapabilityGet for a description of the supported
1802 * features) to be enabled or disabled on the selected port (or all the ports).
1803 *
1804 * Note that some features are mutually incompatible:
1805 * - IX_ETH_DB_FILTERING is incompatible with IX_ETH_DB_WIFI_HEADER_CONVERSION
1806 *
1807 * Also note that some features require other features to be enabled:
1808 * - IX_ETH_DB_FILTERING requires IX_ETH_DB_LEARNING
1809 *
1810 * This function will either enable the entire selected feature set for the selected port (or all the ports),
1811 * in which case it will return IX_ETH_DB_SUCCESS, or in case of error it will not enable any feature at all
1812 * and return an appropriate error message.
1813 *
1814 * The following features are enabled by default (for ports with the respective capability),
1815 * for compatibility reasons with previous versions of CSR:
1816 * - IX_ETH_DB_LEARNING
1817 * - IX_ETH_DB_FILTERING
1818 *
1819 * All other features are disabled by default and require manual enabling using ixEthDBFeatureEnable.
1820 *
1821 * <b>Default settings for VLAN, QoS, Firewall and WiFi header conversion features:</b>
1822 *
1823 * <i>VLAN</i>
1824 *
1825 * When the VLAN/QoS feature is enabled for a port for the first time the default VLAN behavior
1826 * of the port is set to be as <b>permissive</b> (it will accept all the frames) and
1827 * <b>non-interferential</b> (it will not change any frames) as possible:
1828 * - the port VLAN ID (VID) is set to 0
1829 * - the Ingress acceptable frame filter is set to accept all frames
1830 * - the VLAN port membership is set to the complete VLAN range (0 - 4094)
1831 * - the Ingress tagging mode is set to pass-through (will not change frames)
1832 * - the Egress tagging mode is to send tagged frames in the entire VLAN range (0 - 4094)
1833 *
1834 * Note that further disabling and re-enabling the VLAN feature for a given port will not reset the port VLAN behavior
1835 * to the settings listed above. Any VLAN settings made by the user are kept.
1836 *
1837 * <i>QoS</i>
1838 *
1839 * The following default priority mapping table will be used (as per IEEE 802.1Q and IEEE 802.1D):
1840 *
1841 * <table border="1"> <caption> QoS traffic classes  </caption>
1842 *    <tr> <td> <b> QoS priority <td> <b> Default traffic class <td> <b> Traffic type </b>
1843 *    <tr> <td>      0       <td>           2           <td> Best effort, default class for unexpedited traffic
1844 *    <tr> <td>      1       <td>           0           <td> Background traffic
1845 *    <tr> <td>      2       <td>           1           <td> Spare bandwidth
1846 *    <tr> <td>      3       <td>           3           <td> Excellent effort
1847 *    <tr> <td>      4       <td>           4           <td> Controlled load
1848 *    <tr> <td>      5       <td>           5           <td> Video traffic
1849 *    <tr> <td>      6       <td>           6           <td> Voice traffic
1850 *    <tr> <td>      7       <td>           7           <td> Network control
1851 * </table>
1852 *
1853 * <i> Firewall </i>
1854 * 
1855 * The port firewall is configured by default in <b>black-list mode</b>, and the firewall address table is empty.
1856 * This means the firewall will not filter any frames until the feature is configured and the firewall table is
1857 * downloaded to the NPE.
1858 *
1859 * <i> Spanning Tree </i>
1860 *
1861 * The port is set to <b>STP unblocked mode</b>, therefore it will accept all frames until re-configured.
1862 *
1863 * <i> WiFi header conversion </i>
1864 *
1865 * The WiFi header conversion database is empty, therefore no actual header conversion will take place until this
1866 * feature is configured and the conversion table downloaded to the NPE.
1867 *
1868 * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the features on (use IX_ETH_DB_ALL_PORTS for all the ports)
1869 * @param feature @ref IxEthDBFeature [in] - feature or feature set to enable or disable
1870 * @param enabled BOOL [in] - TRUE to enable the feature and FALSE to disable it
1871 *
1872 * @note Certain features, from a functional point of view, cannot be disabled as such at NPE level;
1873 * when such features are set to <i>disabled</i> using the EthDB API they will be configured in such
1874 * a way to determine a behavior equivalent to the feature being disabled. As well as this, disabled
1875 * features cannot be configured or accessed via the EthDB API (except for getting their status).
1876 *
1877 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1878 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1879 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1880 * @retval IX_ETH_DB_NO_PERMISSION attempted to enable mutually exclusive features,
1881 * or a feature that depends on another feature which is not present or enabled
1882 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE at least one of the features selected is unavailable
1883 * @retval IX_FAIL unknown OS or NPE communication error
1884 */
1885IX_ETH_DB_PUBLIC
1886IxEthDBStatus ixEthDBFeatureEnable(IxEthDBPortId portID, IxEthDBFeature feature, BOOL enabled);
1887
1888/**
1889 * @ingroup IxEthDB
1890 *
1891 * @fn IxEthDBStatus ixEthDBFeatureStatusGet(IxEthDBPortId portID, IxEthDBFeature feature, BOOL *present, BOOL *enabled)
1892 *
1893 * @brief Retrieves the availability and status of a feature set
1894 *
1895 * This function returns the availability and status for a feature set.
1896 * Note that if more than one feature is selected (e.g. IX_ETH_DB_LEARNING | IX_ETH_DB_FILTERING)
1897 * the "present" and "enabled" return values will be set to TRUE only if all the features in the
1898 * feature set are present and enabled (not only some).
1899 *
1900 * @param portID @ref IxEthDBPortId [in] - ID of the port
1901 * @param feature @ref IxEthDBFeature [in] - identifier of the feature to retrieve the status for
1902 * @param present BOOL [out] - location where a boolean flag indicating whether this feature is present will be written to
1903 * @param enabled BOOL [out] - location where a boolean flag indicating whether this feature is enabled will be written to
1904 *
1905 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1906 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1907 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
1908 * @retval IX_ETH_DB_INVALID_ARG either <i>present</i> or <i>enabled</i> pointer argument is invalid
1909 */
1910IX_ETH_DB_PUBLIC
1911IxEthDBStatus ixEthDBFeatureStatusGet(IxEthDBPortId portID, IxEthDBFeature feature, BOOL *present, BOOL *enabled);
1912
1913/**
1914 * @ingroup IxEthDB
1915 *
1916 * @fn IxEthDBStatus ixEthDBFeaturePropertyGet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, IxEthDBPropertyType *type, void *value)
1917 *
1918 * @brief Retrieves the value of a feature property
1919 *
1920 * The EthDB features usually contain feature-specific properties describing or
1921 * controlling how the feature operates. While essential properties (e.g. the
1922 * firewall operating mode) have their own API, secondary properties can be
1923 * retrieved using this function.
1924 *
1925 * Properties can be read-only or read-write. ixEthDBFeaturePropertyGet operates with
1926 * both types of features.
1927 *
1928 * Properties have types associated with them. A descriptor indicating the property
1929 * type is returned in the <i>type</i> argument for convenience.
1930 *
1931 * The currently supported properties and their corresponding features are as follows:
1932 *
1933 * <table border="1"> <caption> Properties for IX_ETH_DB_VLAN_QOS </caption>
1934 *    <tr> <td> <b>        Property identifier                  <td> <b> Property type          <td> <b> Property value                   <td> <b> Read-Only </b>
1935 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_COUNT_PROPERTY      <td> IX_ETH_DB_INTEGER_PROPERTY <td> number of internal traffic classes   <td> Yes
1936 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_0_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 0 <td> Yes
1937 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_1_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 1 <td> Yes
1938 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_2_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 2 <td> Yes
1939 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_3_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 3 <td> Yes
1940 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_4_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 4 <td> Yes
1941 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_5_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 5 <td> Yes
1942 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_6_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 6 <td> Yes
1943 *    <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_7_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 7 <td> Yes
1944 * </table>
1945 *
1946 * @see ixEthDBFeaturePropertySet
1947 *
1948 * @param portID @ref IxEthDBPortId [in] - ID of the port
1949 * @param feature @ref IxEthDBFeature [in] - EthDB feature for which the property is retrieved
1950 * @param property @ref IxEthDBProperty [in] - property identifier
1951 * @param type @ref IxEthDBPropertyType [out] - location where the property type will be stored
1952 * @param value void [out] - location where the property value will be stored
1953 *
1954 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1955 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1956 * @retval IX_ETH_DB_INVALID_ARG invalid property identifier, <i>type</i> or <i>value</i> pointer arguments
1957 * @retval IX_ETH_DB_FAIL incorrect property value or unknown error
1958 */
1959IX_ETH_DB_PUBLIC
1960IxEthDBStatus ixEthDBFeaturePropertyGet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, IxEthDBPropertyType *type, void *value);
1961
1962/**
1963 * @ingroup IxEthDB
1964 *
1965 * @fn IxEthDBStatus ixEthDBFeaturePropertySet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, void *value)
1966 *
1967 * @brief Sets the value of a feature property
1968 *
1969 * Unlike @ref ixEthDBFeaturePropertyGet, this function operates only with read-write properties
1970 *
1971 * The currently supported properties and their corresponding features are as follows:
1972 *
1973 *   - IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE (for IX_ETH_DB_VLAN_QOS): freezes the availability of traffic classes
1974 *     to the number of traffic classes currently in use
1975 *
1976 * Note that this function creates deep copies of the property values; once the function is invoked the client
1977 * can free or reuse the memory area containing the original property value.
1978 *
1979 * Copy behavior for different property types is defined as follows:
1980 *
1981 *   - IX_ETH_DB_INTEGER_PROPERTY   - 4 bytes are copied from the source location
1982 *   - IX_ETH_DB_STRING_PROPERTY    - the source string will be copied up to the NULL '\0' string terminator, maximum of 255 characters
1983 *   - IX_ETH_DB_MAC_ADDR_PROPERTY  - 6 bytes are copied from the source location
1984 *   - IX_ETH_DB_BOOL_PROPERTY      - 4 bytes are copied from the source location; the only allowed values are TRUE (1L) and false (0L)
1985 *
1986 * @see ixEthDBFeaturePropertySet
1987 *
1988 * @warning IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE is provided for EthAcc internal use;
1989 * do not attempt to set this property directly
1990 *
1991 * @param portID @ref IxEthDBPortId [in] - ID of the port
1992 * @param feature @ref IxEthDBFeature [in] - EthDB feature for which the property is set
1993 * @param property @ref IxEthDBProperty [in] - property identifier
1994 * @param value void [in] - location where the property value is to be copied from
1995 *
1996 * @retval IX_ETH_DB_SUCCESS operation completed successfully
1997 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
1998 * @retval IX_ETH_DB_INVALID_ARG invalid property identifier, <i>value</i> pointer, or invalid property value
1999 */
2000IX_ETH_DB_PUBLIC
2001IxEthDBStatus ixEthDBFeaturePropertySet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, void *value);
2002
2003/**
2004 * @ingroup IxEthDB
2005 *
2006 * @fn IxEthDBStatus ixEthDBFeatureStatesRestore(IxEthDBPortId portId)
2007 *
2008 * @brief Restores the state of EthDB based on latest settings,
2009 *        following the occurrence of an NPE soft-error.  State is
2010 *        restored by re-downloading tables for the enabled
2011 *        features (e.g. Header Conversion and Firewall)
2012 *        or sending configuration messages to NPE.
2013 *
2014 * @param portID @ref IxEthDBPortId [in] - ID of the port
2015 *
2016 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2017 * @retval IX_ETH_DB_FAIL    operatoin fails
2018 * @retval IX_ETH_DB_INVALID_PORT portId is not a valid port identifier
2019 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
2020 *
2021 * @note
2022 *    The function is useful for error-handling module to handle
2023 *    soft-error in Ethernet NPE.
2024 *
2025 * @note 
2026 *    This API will not restore learning table in Ethernet NPE. As the mechanis,
2027 *    to restore the original learning table is not trivial, after soft-error
2028 *    is handled it is expected that Ethernet NPE to learn the new source address
2029 *    again. 
2030 */
2031IX_ETH_DB_PUBLIC
2032IxEthDBStatus ixEthDBFeatureStatesRestore(IxEthDBPortId portId);
2033
2034/**
2035 * @ingroup IxEthDB
2036 *
2037 * @fn IxEthDBStatus ixEthDBDatabaseClear(IxEthDBPortId portID, IxEthDBRecordType recordType)
2038 *
2039 * @brief Deletes a set of record types from the Ethernet Database
2040 *
2041 * This function deletes all the records of certain types (specified in the recordType filter)
2042 * associated with a port. Additionally, the IX_ETH_DB_ALL_PORTS value can be used as port ID
2043 * to indicate that the specified record types should be deleted for all the ports.
2044 *
2045 * The record type filter can be an ORed combination of the following types:
2046 *
2047 * <caption> Record types </caption>
2048 *    - IX_ETH_DB_FILTERING_RECORD      <table><caption> Filtering record </caption>
2049 *                                               <tr><td> MAC address <td> static/dynamic type <td> age </tr>
2050 *                                             </table>
2051 *
2052 *    - IX_ETH_DB_FILTERING_VLAN_RECORD <table><caption> VLAN-enabled filtering record </caption>
2053 *                                               <tr><td> MAC address <td> static/dynamic type <td> age <td> 802.1Q tag </tr>
2054 *                                             </table>
2055 *
2056 *    - IX_ETH_DB_WIFI_RECORD           <table><caption> WiFi header conversion record </caption>
2057 *                                                <tr><td> MAC address <td> optional gateway MAC address <td> </tr>
2058 *                                             </table>
2059 *
2060 *    - IX_ETH_DB_FIREWALL_RECORD       <table><caption> Firewall record </caption>
2061 *                                                <tr><td> MAC address </tr>
2062 *                                             </table>
2063 *    - IX_ETH_DB_ALL_RECORD_TYPES
2064 *
2065 * Any combination of the above types is valid e.g.
2066 *
2067 *    (IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD | IX_ETH_DB_FIREWALL_RECORD),
2068 *
2069 * although some might be redundant (it is not an error to do so) e.g.
2070 *
2071 *    (IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_ALL_RECORD_TYPES)
2072 *
2073 * @param portID @ref IxEthDBPortId [in] - ID of the port
2074 * @param recordType @ref IxEthDBRecordType [in] - record type filter
2075 *
2076 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2077 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2078 * @retval IX_ETH_DB_INVALID_ARG invalid <i>recordType</i> filter
2079 *
2080 * @note If the record type filter contains any unrecognized value (hence the
2081 * IX_ETH_DB_INVALID_ARG error value is returned) no actual records will be deleted.
2082 */
2083IX_ETH_DB_PUBLIC
2084IxEthDBStatus ixEthDBDatabaseClear(IxEthDBPortId portID, IxEthDBRecordType recordType);
2085
2086/**
2087 * @ingroup IxEthDB
2088 *
2089 * @fn IxEthDBStatus ixEthDBWiFiRecordEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBWiFiRecData *wifiRecData)
2090 *
2091 * @brief Adds "APMAC/BSSID/STATIONS" record to the database, for 802.3 => 802.11 frame
2092 * header conversion
2093 *
2094 * Frame header conversion is controlled by the set of MAC addresses
2095 * and bssids @ref ixEthDBWiFiRecordEntryAdd.However, for the backward
2096 * compatibility the old APIs are still usable to add gateway MAC address
2097 * and station entry @ref ixEthDBWiFiAccessPointEntryAdd and
2098 * @ref ixEthDBWiFiStationEntryAdd.
2099 * Conversion arguments are added using @ref ixEthDBWiFiFrameControlSet,
2100 * @ref ixEthDBWiFiDurationIDSet and @ref ixEthDBWiFiRecordEntryAdd.
2101 *
2102 * Note that adding the same MAC address twice will not return an error
2103 * (but will not accomplish anything either)
2104 *
2105 * @param portID @ref IxEthDBPortId [in] - ID of the port
2106 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to add
2107 * @param wifiRecData pointer to the wifi specific data (flags, gw etc.)
2108 *
2109 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2110 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2111 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2112 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> , <i>wifiRecData</i> ,
2113 * <i>recType</i> , <i>logPort</i>, <i>vlanFlag</i> or <i>padLen</i> arguments
2114 * @retval IX_ETH_DB_FAIL maximum number of records reached
2115 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2116 */
2117IX_ETH_DB_PUBLIC
2118IxEthDBStatus ixEthDBWiFiRecordEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBWiFiRecData *wifiRecData);
2119
2120/**
2121 * @ingroup IxEthDB
2122 *
2123 * @fn IxEthDBStatus ixEthDBWiFiStationEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
2124 *
2125 * @brief Adds an "Access Point to Station" record to the database, for 802.3 => 802.11 frame
2126 * header conversion
2127 *
2128 * Frame header conversion is controlled by the set of MAC addresses
2129 * added using @ref ixEthDBWiFiStationEntryAdd and @ref ixEthDBWiFiAccessPointEntryAdd.
2130 * Conversion arguments are added using @ref ixEthDBWiFiFrameControlSet,
2131 * @ref ixEthDBWiFiDurationIDSet and @ref ixEthDBWiFiBSSIDSet.
2132 *
2133 * Note that adding the same MAC address twice will not return an error
2134 * (but will not accomplish anything either), while re-adding a record previously added
2135 * as an "Access Point to Access Point" will migrate the record to the "Access Point
2136 * to Station" type.
2137 *
2138 * @param portID @ref IxEthDBPortId [in] - ID of the port
2139 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to add
2140 *
2141 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2142 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2143 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2144 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>bssid</i> pointer argument
2145 * @retval IX_ETH_DB_FAIL maximum number of records reached
2146 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2147 */
2148IX_ETH_DB_PUBLIC
2149IxEthDBStatus ixEthDBWiFiStationEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
2150
2151/**
2152 * @ingroup IxEthDB
2153 *
2154 * @fn IxEthDBStatus ixEthDBWiFiAccessPointEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *gatewayMacAddr)
2155 *
2156 * @brief Adds an "Access Point to Access Point" record to the database
2157 *
2158 * @see ixEthDBWiFiStationEntryAdd
2159 *
2160 * Note that adding the same MAC address twice will simply overwrite the previously
2161 * defined gateway MAC address value in the same record, if the record was previously of the
2162 * "Access Point to Access Point" type.
2163 *
2164 * Re-adding a MAC address as "Access Point to Access Point", which was previously added as
2165 * "Access Point to Station" will migrate the record type to "Access Point to Access Point" and
2166 * record the gateway MAC address.
2167 *
2168 * @param portID @ref IxEthDBPortId [in] - ID of the port
2169 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to add
2170 * @param gatewayMacAddr @ref IxEthDBMacAddr [in] - MAC address of the gateway Access Point
2171 *
2172 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2173 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2174 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
2175 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2176 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>gatewayMacAddr</i> or <i>bssid</i> pointer argument
2177 * @retval IX_ETH_DB_FAIL maximum number of records reached
2178 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2179 */
2180IX_ETH_DB_PUBLIC
2181IxEthDBStatus ixEthDBWiFiAccessPointEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *gatewayMacAddr);
2182
2183/**
2184 * @ingroup IxEthDB
2185 *
2186 * @fn IxEthDBStatus ixEthDBWiFiEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
2187 *
2188 * @brief Removes a WiFi station record
2189 *
2190 * This function removes both types of WiFi records ("Access Point to Station" and
2191 * "Access Point to Access Point").
2192 *
2193 * @param portID @ref IxEthDBPortId [in] - ID of the port
2194 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to remove
2195 *
2196 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2197 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2198 * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
2199 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2200 * @retval IX_ETH_DB_NO_SUCH_ADDR specified address was not found in the database
2201 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2202 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2203 */
2204IX_ETH_DB_PUBLIC
2205IxEthDBStatus ixEthDBWiFiEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
2206
2207/**
2208 * @ingroup IxEthDB
2209 *
2210 * @fn IxEthDBStatus ixEthDBWiFiConversionTableDownload(IxEthDBPortId portID)
2211 *
2212 * @brief Downloads the MAC address table for 802.3 => 802.11 frame header
2213 * conversion to the NPE
2214 *
2215 * Note that the frame conversion MAC address table must be individually downloaded
2216 * to each NPE for which the frame header conversion feature is enabled (i.e. it
2217 * is not possible to specify IX_ETH_DB_ALL_PORTS).
2218 *
2219 * @param portID @ref IxEthDBPortId [in] - ID of the port
2220 *
2221 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2222 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2223 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2224 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2225 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2226 */
2227IX_ETH_DB_PUBLIC
2228IxEthDBStatus ixEthDBWiFiConversionTableDownload(IxEthDBPortId portID);
2229
2230/**
2231 * @ingroup IxEthDB
2232 *
2233 * @fn IxEthDBStatus ixEthDBWiFiFrameControlSet(IxEthDBPortId portID, UINT16 frameControl)
2234 *
2235 * @brief Sets the GlobalFrameControl field
2236 *
2237 * The GlobalFrameControl field is a 2-byte value inserted in the <i>Frame Control</i>
2238 * field for all 802.3 to 802.11 frame header conversions
2239 *
2240 * @param portID @ref IxEthDBPortId [in] - ID of the port
2241 * @param frameControl UINT16 [in] - GlobalFrameControl value
2242 *
2243 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2244 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2245 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2246 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2247 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2248 */
2249IX_ETH_DB_PUBLIC
2250IxEthDBStatus ixEthDBWiFiFrameControlSet(IxEthDBPortId portID, UINT16 frameControl);
2251
2252/**
2253 * @ingroup IxEthDB
2254 *
2255 * @fn IxEthDBStatus ixEthDBWiFiDurationIDSet(IxEthDBPortId portID, UINT16 durationID)
2256 *
2257 * @brief Sets the GlobalDurationID field
2258 *
2259 * The GlobalDurationID field is a 2-byte value inserted in the <i>Duration/ID</i>
2260 * field for all 802.3 to 802.11 frame header conversions
2261 *
2262 * @param portID @ref IxEthDBPortId [in] - ID of the port
2263 * @param durationID UINT16 [in] - GlobalDurationID field
2264 *
2265 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2266 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2267 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2268 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2269 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2270 */
2271IX_ETH_DB_PUBLIC
2272IxEthDBStatus ixEthDBWiFiDurationIDSet(IxEthDBPortId portID, UINT16 durationID);
2273
2274/**
2275 * @ingroup IxEthDB
2276 *
2277 * @fn IxEthDBStatus ixEthDBWiFiBSSIDSet(IxEthDBPortId portID, IxEthDBMacAddr *bssid)
2278 *
2279 * @brief Sets the BSSID field
2280 *
2281 * The BSSID field is a 6-byte value which
2282 * identifies the infrastructure of the service set managed
2283 * by the Access Point having the IXP400 as its processor. The value
2284 * is written in the <i>BSSID</i> field of the 802.11 frame header.
2285 * The BSSID value is the MAC address of the Access Point.
2286 *
2287 * @param portID @ref IxEthDBPortId [in] - ID of the port
2288 * @param bssid @ref IxEthDBMacAddr [in] - pointer to 6 bytes containing the BSSID
2289 *
2290 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2291 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2292 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2293 * @retval IX_ETH_DB_INVALID_ARG invalid <i>bssid</i> pointer argument
2294 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
2295 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2296 */
2297IX_ETH_DB_PUBLIC
2298IxEthDBStatus ixEthDBWiFiBSSIDSet(IxEthDBPortId portID, IxEthDBMacAddr *bssid);
2299
2300/**
2301 * @ingroup IxEthDB
2302 *
2303 * @fn IxEthDBStatus ixEthDBSpanningTreeBlockingStateSet(IxEthDBPortId portID, BOOL blocked)
2304 *
2305 * @brief Sets the STP blocked/unblocked state for a port
2306 *
2307 * @param portID @ref IxEthDBPortId [in] - ID of the port
2308 * @param blocked BOOL [in] - TRUE to set the port as STP blocked, FALSE to set it as unblocked
2309 *
2310 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2311 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2312 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2313 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Spanning Tree Protocol feature not enabled
2314 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2315 */
2316IX_ETH_DB_PUBLIC
2317IxEthDBStatus ixEthDBSpanningTreeBlockingStateSet(IxEthDBPortId portID, BOOL blocked);
2318
2319/**
2320 * @ingroup IxEthDB
2321 *
2322 * @fn IxEthDBStatus ixEthDBSpanningTreeBlockingStateGet(IxEthDBPortId portID, BOOL *blocked)
2323 *
2324 * @brief Retrieves the STP blocked/unblocked state for a port
2325 *
2326 * @param portID @ref IxEthDBPortId [in] - ID of the port
2327 * @param blocked BOOL * [in] - set to TRUE if the port is STP blocked, FALSE otherwise
2328 *
2329 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2330 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2331 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2332 * @retval IX_ETH_DB_INVALID_ARG invalid <i>blocked</i> pointer argument
2333 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Spanning Tree Protocol feature not enabled
2334 */
2335IX_ETH_DB_PUBLIC
2336IxEthDBStatus ixEthDBSpanningTreeBlockingStateGet(IxEthDBPortId portID, BOOL *blocked);
2337
2338/**
2339 * @ingroup IxEthDB
2340 *
2341 * @fn IxEthDBStatus ixEthDBFirewallModeSet(IxEthDBPortId portID, IxEthDBFirewallMode mode)
2342 *
2343 * @brief Sets the firewall mode to use white or black listing
2344 *
2345 * When enabled, the NPE MAC address based firewall support operates in two modes:
2346 *
2347 * - white-list mode (MAC address based admission)
2348 *    - <i>mode</i> set to IX_ETH_DB_FIREWALL_WHITE_LIST
2349 *    - only packets originating from MAC addresses contained in the firewall address list
2350 *      are allowed on the Rx path
2351 * - black-list mode (MAC address based blocking) 
2352 *    - <i>mode</i> set to IX_ETH_DB_FIREWALL_BLACK_LIST
2353 *    - packets originating from MAC addresses contained in the firewall address list
2354 *      are discarded
2355 *
2356 * @param portID @ref IxEthDBPortId [in] - ID of the port
2357 * @param mode @ref IxEthDBFirewallMode [in] - firewall mode (IX_ETH_DB_FIREWALL_WHITE_LIST or IX_ETH_DB_FIREWALL_BLACK_LIST)
2358 *
2359 * @note by default the firewall operates in black-list mode with an empty address
2360 * list, hence it doesn't filter any packets
2361 *
2362 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2363 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2364 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2365 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2366 * @retval IX_ETH_DB_INVALID_ARGUMENT <i>mode</i> argument is not a valid firewall configuration mode
2367 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2368*/
2369IX_ETH_DB_PUBLIC
2370IxEthDBStatus ixEthDBFirewallModeSet(IxEthDBPortId portID, IxEthDBFirewallMode mode);
2371
2372/**
2373 * @ingroup IxEthDB
2374 *
2375 * @fn ixEthDBFirewallInvalidAddressFilterEnable(IxEthDBPortId portID, BOOL enable)
2376 *
2377 * @brief Enables or disables invalid MAC address filtering
2378 *
2379 * According to IEEE802 it is illegal for a source address to be a multicast
2380 * or broadcast address. If this feature is enabled the NPE inspects the source
2381 * MAC addresses of incoming frames and discards them if invalid addresses are
2382 * detected.
2383 *
2384 * By default this service is enabled, if the firewall feature is supported by the
2385 * NPE image.
2386 *
2387 * @param portID ID of the port
2388 * @param enable TRUE to enable invalid MAC address filtering and FALSE to disable it
2389 *
2390 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2391 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2392 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2393 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2394 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2395 */
2396IX_ETH_DB_PUBLIC
2397IxEthDBStatus ixEthDBFirewallInvalidAddressFilterEnable(IxEthDBPortId portID, BOOL enable);
2398
2399/**
2400 * @ingroup IxEthDB
2401 *
2402 * @fn IxEthDBStatus ixEthDBFirewallEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
2403 *
2404 * @brief Adds a MAC address to the firewall address list
2405 *
2406 * Note that adding the same MAC address twice will not return an error
2407 * but will not actually accomplish anything.
2408 *
2409 * The firewall MAC address list has a limited number of entries; once
2410 * the maximum number of entries has been reached this function will failed
2411 * to add more addresses, returning IX_ETH_DB_NOMEM.
2412 *
2413 * @param portID @ref IxEthDBPortId [in] - ID of the port
2414 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be added
2415 *
2416 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2417 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2418 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2419 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2420 * @retval IX_ETH_DB_FAIL maximum number of records reached
2421 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2422 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2423 */
2424IX_ETH_DB_PUBLIC
2425IxEthDBStatus ixEthDBFirewallEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
2426
2427/**
2428 * @ingroup IxEthDB
2429 *
2430 * @fn IxEthDBStatus ixEthDBFirewallEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
2431 *
2432 * @brief Removes a MAC address from the firewall address list
2433 *
2434 * @param portID @ref IxEthDBPortId [in] - ID of the port
2435 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be removed
2436 *
2437 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2438 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2439 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2440 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2441 * @retval IX_ETH_DB_NO_SUCH_ADDR address not found
2442 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2443 */
2444IX_ETH_DB_PUBLIC
2445IxEthDBStatus ixEthDBFirewallEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
2446
2447/**
2448 * @ingroup IxEthDB
2449 *
2450 * @fn IxEthDBStatus ixEthDBFirewallMaskedEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *addrMask)
2451 *
2452 * @brief Adds a MAC address + mask to the firewall address list
2453 *
2454 * Note that adding the same MAC address twice will not return an error
2455 * but will not actually accomplish anything.
2456 *
2457 * The firewall MAC address list has a limited number of entries; once
2458 * the maximum number of entries has been reached this function will failed
2459 * to add more addresses, returning IX_ETH_DB_NOMEM.
2460 *
2461 * @param portID @ref IxEthDBPortId [in] - ID of the port
2462 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be added
2463 * @param addrMask @ref IxEthDBMacAddr [in] - address mask to be added
2464 *
2465 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2466 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2467 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2468 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2469 * @retval IX_ETH_DB_FAIL maximum number of records reached
2470 * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
2471 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2472 */
2473IX_ETH_DB_PUBLIC
2474IxEthDBStatus ixEthDBFirewallMaskedEntryAdd(IxEthDBPortId portID,
2475                                            IxEthDBMacAddr *macAddr,
2476                                            IxEthDBMacAddr *addrMask);
2477/**
2478 * @ingroup IxEthDB
2479 *
2480 * @fn IxEthDBStatus ixEthDBFirewallMaskedEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *addrMask)
2481 *
2482 * @brief Removes a MAC address + mask from the firewall address list
2483 *
2484 * @param portID @ref IxEthDBPortId [in] - ID of the port
2485 * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be removed
2486 * @param addrMask @ref IxEthDBMacAddr [in] - address mask to be added
2487 *
2488 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2489 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2490 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2491 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2492 * @retval IX_ETH_DB_NO_SUCH_ADDR address not found
2493 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2494 */
2495IX_ETH_DB_PUBLIC
2496IxEthDBStatus ixEthDBFirewallMaskedEntryRemove(IxEthDBPortId portID,
2497                                            IxEthDBMacAddr *macAddr,
2498                                            IxEthDBMacAddr *addrMask);
2499
2500/**
2501 * @ingroup IxEthDB
2502 *
2503 * @fn IxEthDBStatus ixEthDBFirewallTableDownload(IxEthDBPortId portID)
2504 *
2505 * @brief Downloads the MAC firewall table to a port
2506 *
2507 * @param portID ID of the port
2508 *
2509 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2510 * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
2511 * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
2512 * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
2513 * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
2514 */
2515IX_ETH_DB_PUBLIC
2516IxEthDBStatus ixEthDBFirewallTableDownload(IxEthDBPortId portID);
2517
2518/**
2519 * @ingroup IxEthDB
2520 *
2521 * @fn IxEthDBStatus ixEthDBUserFieldSet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void *field)
2522 *
2523 * @brief Adds a user-defined field to a database record
2524 *
2525 * This function associates a user-defined field to a database record.
2526 * The user-defined field is passed as a <i>(void *)</i> parameter, hence it can be used
2527 * for any purpose (such as identifying a structure). Retrieving the user-defined field from
2528 * a record is done using @ref ixEthDBUserFieldGet. Note that EthDB never uses the user-defined
2529 * field for any internal operation and it is not aware of the significance of its contents. The
2530 * field is only stored as a pointer.
2531 *
2532 * The database record is identified using a combination of the given parameters, depending on the record type.
2533 * All the record types require the record MAC address.
2534 *
2535 * - IX_ETH_DB_FILTERING_RECORD requires only the MAC address
2536 * - IX_ETH_DB_VLAN_FILTERING_RECORD requires the MAC address and the VLAN ID
2537 * - IX_ETH_DB_WIFI_RECORD requires the MAC address and the portID
2538 * - IX_ETH_DB_FIREWALL_RECORD requires the MAC address and the portID
2539 *
2540 * Please note that if a parameter is not required it is completely ignored (it does not undergo parameter checking).
2541 * The user-defined field can be cleared using a <b>NULL</b> <i>field</i> parameter.
2542 *
2543 * @param recordType @ref IxEthDBRecordType [in] - type of record (can be IX_ETH_DB_FILTERING_RECORD,
2544 * IX_ETH_DB_FILTERING_VLAN_RECORD, IX_ETH_DB_WIFI_RECORD or IX_ETH_DB_FIREWALL_RECORD)
2545 * @param portID @ref IxEthDBPortId [in] - ID of the port (required only for WIFI and FIREWALL records)
2546 * @param macAddr @ref IxEthDBMacAddr * [in] - MAC address of the record
2547 * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID of the record (required only for FILTERING_VLAN records)
2548 * @param field void * [in] - user defined field
2549 *
2550 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2551 * @retval IX_ETH_DB_INVALID_PORT portID was required but it is not a valid port identifier
2552 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
2553 * @retval IX_ETH_DB_NO_SUCH_ADDR record not found
2554 */
2555IX_ETH_DB_PUBLIC
2556IxEthDBStatus ixEthDBUserFieldSet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void *field);
2557
2558/**
2559 * @ingroup IxEthDB
2560 *
2561 * @fn IxEthDBStatus ixEthDBUserFieldGet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void **field)
2562 *
2563 * @brief Retrieves a user-defined field from a database record
2564 *
2565 * The database record is identified using a combination of the given parameters, depending on the record type.
2566 * All the record types require the record MAC address.
2567 *
2568 * - IX_ETH_DB_FILTERING_RECORD requires only the MAC address
2569 * - IX_ETH_DB_VLAN_FILTERING_RECORD requires the MAC address and the VLAN ID
2570 * - IX_ETH_DB_WIFI_RECORD requires the MAC address and the portID
2571 * - IX_ETH_DB_FIREWALL_RECORD requires the MAC address and the portID
2572 *
2573 * Please note that if a parameter is not required it is completely ignored (it does not undergo parameter checking).
2574 *
2575 * If no user-defined field was registered with the specified record then <b>NULL</b> will be written
2576 * at the location specified by <i>field</i>.
2577 *
2578 * @param recordType type of record (can be IX_ETH_DB_FILTERING_RECORD, IX_ETH_DB_FILTERING_VLAN_RECORD, IX_ETH_DB_WIFI_RECORD
2579 * or IX_ETH_DB_FIREWALL_RECORD)
2580 * @param portID ID of the port (required only for WIFI and FIREWALL records)
2581 * @param macAddr MAC address of the record
2582 * @param vlanID VLAN ID of the record (required only for FILTERING_VLAN records)
2583 * @param field location to write the user defined field into
2584 *
2585 * @retval IX_ETH_DB_SUCCESS operation completed successfully
2586 * @retval IX_ETH_DB_INVALID_PORT portID was required but it is not a valid port identifier
2587 * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>field</i> pointer arguments
2588 * @retval IX_ETH_DB_NO_SUCH_ADDR record not found
2589 */
2590IX_ETH_DB_PUBLIC
2591IxEthDBStatus ixEthDBUserFieldGet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portId, IxEthDBVlanId vlanID, void **field);
2592
2593/**
2594 * @}
2595 */
2596
2597#endif /* IxEthDB_H */
Note: See TracBrowser for help on using the repository browser.