Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Enumerations | Functions
FDB Configuration [OPENAPI_FDB]

Enumerations

enum  OPEN_FDB_ADDR_FLAG_t {
  OPEN_FDB_ADDR_FLAG_STATIC = 0, OPEN_FDB_ADDR_FLAG_LEARNED = 1, OPEN_FDB_ADDR_FLAG_MANAGEMENT = 2, OPEN_FDB_ADDR_FLAG_GMRP_LEARNED = 3,
  OPEN_FDB_ADDR_FLAG_SELF = 4, OPEN_FDB_ADDR_FLAG_DOT1X_STATIC = 5, OPEN_FDB_ADDR_FLAG_DOT1AG_STATIC = 6, OPEN_FDB_ADDR_FLAG_L3_MANAGEMENT = 7,
  OPEN_FDB_ADDR_FLAG_LEARNED_UNCONFIRMED = 8, OPEN_FDB_ADDR_FLAG_FIP_SNOOP_LEARNED = 9, OPEN_FDB_ADDR_FLAG_CAPTIVE_PORTAL_STATIC = 10, OPEN_FDB_ADDR_FLAG_ETH_CFM_STATIC = 11,
  OPEN_FDB_ADDR_FLAG_Y1731_STATIC = 12
}
 
enum  OPEN_VL_TYPE_t { OPEN_IVL_TYPE = 1, OPEN_SVL_TYPE = 2 }
 Supported VLAN Learning types. More...
 

Functions

open_error_t openapiActiveAddrEntriesGet (openapiClientHandle_t *client_handle, uint32_t *entriesNum)
 Get the current number of entries in forwarding database. More...
 
open_error_t openapiFdbAddrAgingTimeoutGet (openapiClientHandle_t *client_handle, uint32_t fdbId, uint32_t *timeOut)
 Get the aging timeout value for a forwarding database. More...
 
open_error_t openapiFdbAddrAgingTimeoutSet (openapiClientHandle_t *client_handle, uint32_t fdbId, uint32_t timeOut)
 Set the aging timeout value for a forwarding database. More...
 
open_error_t openapiFdbBadAddsGet (openapiClientHandle_t *client_handle, uint32_t *badAdds)
 Get the number of failed forwarding database insert attempts due to failure to allocate space. More...
 
open_error_t openapiFdbDynamicEntriesGet (openapiClientHandle_t *client_handle, uint32_t *entries)
 Get count of dynamic entries in the L2 forwarding database. More...
 
open_error_t openapiFdbEntryDelete (openapiClientHandle_t *client_handle, open_buffdesc *mac, uint32_t vlanId, uint32_t intIfNum)
 Delete a entry from the forwarding database. More...
 
open_error_t openapiFdbEntryNextGet (openapiClientHandle_t *client_handle, open_buffdesc *mac, uint32_t *vlanId, uint32_t *fdbIfNum, OPEN_FDB_ADDR_FLAG_t *entryType)
 Get the next entry from the forwarding database. More...
 
open_error_t openapiFdbFlush (openapiClientHandle_t *client_handle)
 Flush all learned entries from the L2 forwarding database. More...
 
open_error_t openapiFdbFlushByMac (openapiClientHandle_t *client_handle, open_buffdesc *mac)
 Flush all entries in forwarding database learned on the specified MAC. More...
 
open_error_t openapiFdbFlushByPort (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Flush all entries in forwarding database learned on this interface. More...
 
open_error_t openapiFdbFlushByVlan (openapiClientHandle_t *client_handle, uint32_t vlanId)
 Flush all entries in forwarding database learned on the specified VLAN. More...
 
open_error_t openapiFdbIdGet (openapiClientHandle_t *client_handle, uint32_t fdbId)
 Verify that a forwarding database entry with the specified ID exists. More...
 
open_error_t openapiFdbIdNextGet (openapiClientHandle_t *client_handle, uint32_t startFrom, uint32_t *fdbId)
 Get the next forwarding database ID starting from a certain index. More...
 
open_error_t openapiFdbInternalEntriesGet (openapiClientHandle_t *client_handle, uint32_t *entries)
 Get count of internally added entries in the L2 forwarding database. More...
 
open_error_t openapiFdbIntfDynamicEntriesGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *entries)
 Get the count of dynamic entries in the L2 forwarding database for a specific interface. More...
 
open_error_t openapiFdbIntfInternalEntriesGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *entries)
 Get the count of internal entries in the L2 forwarding database for a specific interface. More...
 
open_error_t openapiFdbMacMaxHwLimitGet (openapiClientHandle_t *client_handle, uint32_t *maxMacHwLimit)
 Get the max limit of MAC entries determined by hardware. More...
 
open_error_t openapiFdbMaxCountGet (openapiClientHandle_t *client_handle, uint32_t *entriesNum)
 Get the forwarding database entries counter greatest value. More...
 
open_error_t openapiFdbMaxTableEntriesGet (openapiClientHandle_t *client_handle, uint32_t *maxEntries)
 Get the maximum number of entries that the forwarding database table can hold. More...
 
open_error_t openapiFdbTypeOfVLGet (openapiClientHandle_t *client_handle, OPEN_VL_TYPE_t *type)
 Get the type of supported VLAN learning. More...
 
open_error_t openapiFdbVlanDynamicEntriesGet (openapiClientHandle_t *client_handle, uint16_t vlanId, uint32_t *entries)
 Get the count of dynamic entries in the L2 forwarding database for a specific VLAN. More...
 
open_error_t openapiFdbVlanInternalEntriesGet (openapiClientHandle_t *client_handle, uint16_t vlanId, uint32_t *entries)
 Get the count of internal entries in the L2 forwarding database for a specific VLAN. More...
 
open_error_t openapiIsRestrFilterMacGet (openapiClientHandle_t *client_handle, open_buffdesc *macaddr)
 Determine if the specified MAC address is a member of the restricted set. More...
 
open_error_t openapiMaxCountReset (openapiClientHandle_t *client_handle)
 Reset the greatest number of entries in the forwarding database. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_FDB_ADDR_FLAG_LEARNED 

Static.

OPEN_FDB_ADDR_FLAG_MANAGEMENT 

Learned.

OPEN_FDB_ADDR_FLAG_GMRP_LEARNED 

Management.

OPEN_FDB_ADDR_FLAG_SELF 

GMRP Learned.

OPEN_FDB_ADDR_FLAG_DOT1X_STATIC 

Self.

OPEN_FDB_ADDR_FLAG_DOT1AG_STATIC 

Dot1x Static.

OPEN_FDB_ADDR_FLAG_L3_MANAGEMENT 

Dot1ag Static.

OPEN_FDB_ADDR_FLAG_LEARNED_UNCONFIRMED 

Routing Intf address.

OPEN_FDB_ADDR_FLAG_FIP_SNOOP_LEARNED 

Address is learned, but not guaranteed to be in HW (relevant for SW learning).

OPEN_FDB_ADDR_FLAG_CAPTIVE_PORTAL_STATIC 

FIP Snooping Learned.

OPEN_FDB_ADDR_FLAG_ETH_CFM_STATIC 

CP client MAC Addr.

OPEN_FDB_ADDR_FLAG_Y1731_STATIC 

ethcfm Static

Definition at line 51 of file openapi_fdb.h.

Supported VLAN Learning types.

Enumerator
OPEN_IVL_TYPE 

Independent VLAN Learning.

OPEN_SVL_TYPE 

Shared VLAN Learning.

Definition at line 45 of file openapi_fdb.h.

Function Documentation

open_error_t openapiActiveAddrEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  entriesNum 
)

Get the current number of entries in forwarding database.

Parameters
[in]client_handleclient handle from registration API
[out]entriesNumcurrent number of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbAddrAgingTimeoutGet ( openapiClientHandle_t client_handle,
uint32_t  fdbId,
uint32_t *  timeOut 
)

Get the aging timeout value for a forwarding database.

Parameters
[in]client_handleclient handle from registration API
[in]fdbIdFDB ID
[out]timeOutaging timeout value
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbAddrAgingTimeoutSet ( openapiClientHandle_t client_handle,
uint32_t  fdbId,
uint32_t  timeOut 
)

Set the aging timeout value for a forwarding database.

Parameters
[in]client_handleclient handle from registration API
[in]fdbIdFDB ID
[in]timeOutaging timeout value in seconds.
-Minimum value OPENAPI_FDB_MIN_TIMEOUT_ID
-Maximum value OPENAPI_FDB_MAX_TIMEOUT_ID
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbBadAddsGet ( openapiClientHandle_t client_handle,
uint32_t *  badAdds 
)

Get the number of failed forwarding database insert attempts due to failure to allocate space.

Parameters
[in]client_handleclient handle from registration API
[out]badAddspointer to the number of failed FDB inserts to be returned
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbDynamicEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  entries 
)

Get count of dynamic entries in the L2 forwarding database.

Parameters
[in]client_handleclient handle from registration API
[out]entriesnumber of dynamic entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbEntryDelete ( openapiClientHandle_t client_handle,
open_buffdesc mac,
uint32_t  vlanId,
uint32_t  intIfNum 
)

Delete a entry from the forwarding database.

Parameters
[in]client_handleclient handle from registration API
[in]macMAC address of the entry
[in]vlanIdVLAN ID of the entry
[in]intIfNuminternal interface number of the entry
Return values
OPEN_E_NONEFDB entry is deleted.
OPEN_E_FAILFDB entry is not deleted.
OPEN_E_INTERNALOther internal error.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbEntryNextGet ( openapiClientHandle_t client_handle,
open_buffdesc mac,
uint32_t *  vlanId,
uint32_t *  fdbIfNum,
OPEN_FDB_ADDR_FLAG_t entryType 
)

Get the next entry from the forwarding database.

Parameters
[in]client_handleclient handle from registration API
[in,out]macMAC address of the entry
[in]vlanIdVLAN ID of the entry
[in,out]fdbIfNuminternal interface number of the entry
[in,out]entryTypeentry type
Return values
OPEN_E_NONEGet successful.
OPEN_E_NOT_FOUNDGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbFlush ( openapiClientHandle_t client_handle)

Flush all learned entries from the L2 forwarding database.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEAll FDB entries are flushed.
OPEN_E_FAILFailed to flush FDB entries.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbFlushByMac ( openapiClientHandle_t client_handle,
open_buffdesc mac 
)

Flush all entries in forwarding database learned on the specified MAC.

Parameters
[in]client_handleclient handle from registration API
[in]macMAC address
Return values
OPEN_E_NONEAll FDB entries are flushed.
OPEN_E_FAILFailed to flush FDB entries.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbFlushByPort ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Flush all entries in forwarding database learned on this interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number of the entry
Return values
OPEN_E_NONEAll FDB entries are flushed.
OPEN_E_FAILFailed to flush FDB entries.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbFlushByVlan ( openapiClientHandle_t client_handle,
uint32_t  vlanId 
)

Flush all entries in forwarding database learned on the specified VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN number
Return values
OPEN_E_NONEAll FDB entries are flushed.
OPEN_E_FAILFailed to flush FDB entries.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbIdGet ( openapiClientHandle_t client_handle,
uint32_t  fdbId 
)

Verify that a forwarding database entry with the specified ID exists.

Parameters
[in]client_handleclient handle from registration API
[in]fdbIdFDB ID to be checked
Return values
OPEN_E_NONEFDB exists.
OPEN_E_NOT_FOUNDFDB not exists.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbIdNextGet ( openapiClientHandle_t client_handle,
uint32_t  startFrom,
uint32_t *  fdbId 
)

Get the next forwarding database ID starting from a certain index.

Parameters
[in]client_handleclient handle from registration API
[in]startFromindex to start search from
[out]fdbIdpointer to the return value
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbInternalEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  entries 
)

Get count of internally added entries in the L2 forwarding database.

Parameters
[in]client_handleclient handle from registration API
[out]entriesnumber of internally added entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbIntfDynamicEntriesGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  entries 
)

Get the count of dynamic entries in the L2 forwarding database for a specific interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]entriesnumber of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbIntfInternalEntriesGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  entries 
)

Get the count of internal entries in the L2 forwarding database for a specific interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]entriesnumber of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbMacMaxHwLimitGet ( openapiClientHandle_t client_handle,
uint32_t *  maxMacHwLimit 
)

Get the max limit of MAC entries determined by hardware.

Parameters
[in]client_handleclient handle from registration API
[out]maxMacHwLimitMax MAC limit set in hardware
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbMaxCountGet ( openapiClientHandle_t client_handle,
uint32_t *  entriesNum 
)

Get the forwarding database entries counter greatest value.

Parameters
[in]client_handleclient handle from registration API
[out]entriesNumgreatest number of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbMaxTableEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  maxEntries 
)

Get the maximum number of entries that the forwarding database table can hold.

Parameters
[in]client_handleclient handle from registration API
[out]maxEntriesnumber of total entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbTypeOfVLGet ( openapiClientHandle_t client_handle,
OPEN_VL_TYPE_t type 
)

Get the type of supported VLAN learning.

Parameters
[in]client_handleclient handle from registration API
[out]typepointer to the type
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbVlanDynamicEntriesGet ( openapiClientHandle_t client_handle,
uint16_t  vlanId,
uint32_t *  entries 
)

Get the count of dynamic entries in the L2 forwarding database for a specific VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN identifier
[out]entriesnumber of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiFdbVlanInternalEntriesGet ( openapiClientHandle_t client_handle,
uint16_t  vlanId,
uint32_t *  entries 
)

Get the count of internal entries in the L2 forwarding database for a specific VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN identifier
[out]entriesnumber of entries
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiIsRestrFilterMacGet ( openapiClientHandle_t client_handle,
open_buffdesc macaddr 
)

Determine if the specified MAC address is a member of the restricted set.

Parameters
[in]client_handleclient handle from registration API
[in]macaddrMAC Address of the filter
Return values
OPEN_E_NONEMAC is not restricted.
OPEN_E_DISABLEDMAC is restricted.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.
open_error_t openapiMaxCountReset ( openapiClientHandle_t client_handle)

Reset the greatest number of entries in the forwarding database.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEReset successful.
OPEN_E_FAILReset failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
fdb_example.c.