RDK-B
DPoE HAL APIs

Description

Functions

int dpoe_getOnuId (dpoe_mac_address_t *pOnuId)
 
int dpoe_getFirmwareInfo (dpoe_firmware_info_t *pFirmwareInfo)
 
int dpoe_getEponChipInfo (dpoe_epon_chip_info_t *pEponChipInfo)
 
int dpoe_getManufacturerInfo (dpoe_manufacturer_t *pManufacturerInfo)
 
unsigned short dpoe_getMaxLogicalLinks (dpoe_onu_max_logical_links_t *pMaxLogicalLinks)
 
int dpoe_getNumberOfNetworkPorts (unsigned long *pNumPorts)
 
int dpoe_getNumberOfS1Interfaces (unsigned long *pNumS1Interfaces)
 
int dpoe_getOnuPacketBufferCapabilities (dpoe_onu_packet_buffer_capabilities_t *pCapabilities)
 
int dpoe_getLlidForwardingState (dpoe_link_forwarding_state_t linkForwardingState[], unsigned short numEntries)
 
int dpoe_getOamFrameRate (dpoe_link_oam_frame_rate_t linkOamFrameRate[], unsigned short numEntries)
 
int dpoe_getDeviceSysDescrInfo (dpoe_device_sys_descr_info_t *pDeviceSysDescrInfo)
 
int dpoe_getEponMode (unsigned short *pMode)
 
int dpoe_setResetOnu (void)
 
int dpoe_getDynamicMacAddressAgeLimit (unsigned short *pAgeLimit)
 
int dpoe_getDynamicMacLearningTableSize (unsigned short *pNumEntries)
 
int dpoe_getDynamicMacTable (dpoe_link_mac_address_t linkDynamicMacTable[], unsigned short numEntries)
 
int dpoe_getStaticMacTable (dpoe_link_mac_address_t linkStaticMacTable[], unsigned short numEntries)
 
int dpoe_getMacLearningAggregateLimit (unsigned short *pAggregrateLimit)
 
int dpoe_getOnuLinkStatistics (dpoe_link_traffic_stats_t onuLinkTrafficStats[], unsigned short numEntries)
 
int dpoe_setClearOnuLinkStatistics (void)
 
int dpoe_hal_Reboot_Ready (unsigned long *pValue)
 
int dpoe_hal_ReinitMac ()
 
int dpoe_hal_Get_eponResetCount (unsigned long *resetcnt)
 
int dpoe_hal_LocalResetCount (unsigned long *resetcnt)
 
int dpoe_hal_Get_ErouterResetCount (unsigned long *resetcnt)
 
int dpoe_LlidForwardingStateGetEntryCount (unsigned short *pNumEntry)
 
int dpoe_OamFrameRateGetEntryCount (unsigned short *pNumEntry)
 
int dpoe_OnuLinkStatisticsGetEntryCount (unsigned short *pNumEntry)
 

Function Documentation

◆ dpoe_getOnuId()

int dpoe_getOnuId ( dpoe_mac_address_t pOnuId)

@description The ONU ID is a non-volatile number that uniquely identifies a physical DPoE ONU. By definition, the DPoE ONU ID is the lowest (numerically smallest) MAC address among all MAC addresses associated with the TU interface port of a DPoE ONU. All logical links on a DPoE ONU report the same DPoE ONU ID, despite having different link MAC addresses (per [802.3]).
Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_mac_address_t*pOnuId - Info of OnuId, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getFirmwareInfo()

int dpoe_getFirmwareInfo ( dpoe_firmware_info_t pFirmwareInfo)

@description This attribute represents the DPoE ONU firmware version. The version number uniquely identifies a particular version of the ONU firmware. Format is defined by the ONU vendor. DPoE Systems can compare this value for equality with a provisioned value for the currently correct firmware version. "Newer than" or "compatible with" comparisons depend on version number format and should not be performed with a simple comparison. The Boot Version can be used to populate the BOOTR field in the sysDescr MIB variable. The Application Version can be used to populate the SW_REV field in the sysDescr MIB variable (see [DPoE-SP-OSSIv1.0]). Version values 0x0000 and 0xFFFF are reserved, and indicate loads that are not installed or are not available.
Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_firmware_info_t*pFirmwareInfo - Info of Firmware, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getEponChipInfo()

int dpoe_getEponChipInfo ( dpoe_epon_chip_info_t pEponChipInfo)

@description This attribute represents the type of EPON chip used on the DPoE ONU.
Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_epon_chip_info_t*pEponChipInfo - Info of epon chip, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getManufacturerInfo()

int dpoe_getManufacturerInfo ( dpoe_manufacturer_t pManufacturerInfo)

@description This function will return information corresponding to multiple OAM messages.

  • Date of Manufacture (D7/00 05)
  • Manufacturer Info (D7/00 06)
  • ONU Manufacturer Organization Name (D7/00 0E) Date of Manufacture: The date the DPoE ONU was manufactured, encoded in Binary Coded Decimal (BCD) digits as YYYYMMDD. For example, June 24, 2010, would be represented as 20 10 06 24. Manufacturer Info: This attribute holds manufacturer-specific information that identifies this individual ONU. This attribute typically contains a serial number, and possibly other manufacturing information, such as lot numbers or component revisions. Format is defined by the ONU vendor. ONU Manufacturer Organization Name: This attribute represents the organization which manufactured the D-ONU. It is used to validate the manufacturer CVC during secure software download. The value must exactly match the subject organizationName value in the firmware manufacturer CVC.
    Reference: DPoE-SP-OAMv1.0-I08-140807 specification
    Context: ONU
Parameters
dpoe_manufacturer_t*pManufacturerInfo - Info of manufacturer, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getMaxLogicalLinks()

unsigned short dpoe_getMaxLogicalLinks ( dpoe_onu_max_logical_links_t pMaxLogicalLinks)

@description The maximum number of logical links the ONU supports on the EPON.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_onu_max_logical_links_t*pMaxLogicalLinks - Info of logical links, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getNumberOfNetworkPorts()

int dpoe_getNumberOfNetworkPorts ( unsigned long *  pNumPorts)

@description This attribute provides the total number of TU interface ports on the ONU.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
ULONG*pNumPorts - Number of ports, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getNumberOfS1Interfaces()

int dpoe_getNumberOfS1Interfaces ( unsigned long *  pNumS1Interfaces)

@description This attribute provides the number of S1 interfaces on the DPoE ONU.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
ULONG*pNumS1Interfaces - Number of S1 interfaces, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getOnuPacketBufferCapabilities()

int dpoe_getOnuPacketBufferCapabilities ( dpoe_onu_packet_buffer_capabilities_t pCapabilities)

@description This message provides a means for the DPoE ONU to convey information about packet buffer capabilities to the DPoE System.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_onu_packet_buffer_capabilities_t*pCapabilities - info of packet buffer capabilities
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getLlidForwardingState()

int dpoe_getLlidForwardingState ( dpoe_link_forwarding_state_t  linkForwardingState[],
unsigned short  numEntries 
)

@description This attribute represents the current traffic state for an LLID. User data traffic may be enabled (normal operation) or disabled (discarded by the DPoE ONU). Only OAM and MPCP remain enabled regardless of the LLID forwarding state.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: Logical Link

Parameters
dpoe_link_forwarding_state_tlinkForwardingState[] - Info of Link forwarding state, to be returned
USHORTnumEntries - Number of entries
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getOamFrameRate()

int dpoe_getOamFrameRate ( dpoe_link_oam_frame_rate_t  linkOamFrameRate[],
unsigned short  numEntries 
)

@description This attribute represents the maximum rate at which OAM PDUs are transmitted on a link.

Setting the Maximum OAM Frame Rate to 0 disables rate control. The Minimum OAM Frame Rate is the heartbeat rate. This is the rate at which OAM PDUs are sent between the ONU and DPoE System, using an Info PDU as a "heartbeat" if there is no other OAM activity, as per [802.3]. The heartbeat rate is specified as one heartbeat PDU per specified time interval. The time interval is specified as the value provisioned in the message x 100ms. Therefore, setting the Minimum OAM Frame Rate to 10 specifies a rate of 1 PDU per 10 x 100ms. This equals 1 PDU per 1 second. The DPoE ONU implementation maintains one instance of the OAM rate. This rate applies to all links on the ONU.
Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: Logical Link

Parameters
dpoe_link_oam_frame_rate_tlinkOamFrameRate[] - Info of which OAM PDUs are transmitted on a link
USHORTnumEntries - Number of entries
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getDeviceSysDescrInfo()

int dpoe_getDeviceSysDescrInfo ( dpoe_device_sys_descr_info_t pDeviceSysDescrInfo)

@description This function will return multiple pieces of device system information.

Vendor Name: This attribute represents the ONU vendor name. It can be used to populate the VENDOR field in the sysDescr MIB variable (see [DPoE-SP-OSSIv1.0]), and may or may not be the same as the ONU Manufacturer Organization Name. Format of the vendor name is vendor specific. Model Number: This attribute represents the ONU model number.
It can be used to populate the MODEL field in the sysDescr MIB variable (see [DPoE-SP-OSSIv1.0]). Format of the model number is vendor specific. The D-ONU SHOULD limit the model number length to less than 32 bytes. HardwareInfo: This attribute represents the ONU hardware version.
It can be used to populate the HW_REV field in the sysDescr MIB variable (see [DPoE-SP-OSSIv1.0]). Format of the hardware version information is vendor specific. The D-ONU SHOULD limit the vendor name, model number, and hardware version length to less than 32 bytes.
Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
dpoe_device_sys_descr_info_t*pDeviceSysDescrInfo - Multiple pieces of device system information
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getEponMode()

int dpoe_getEponMode ( unsigned short *  pMode)

@description This attribute represents the EPON mode(s) supported by this ONU.

DPoE Systems that support 2G-EPON MUST support this attribute. DPoE ONUs that support 2G-EPON MUST support this attribute. DPoE Systems that support 1G-EPON and 10G-EPON SHOULD support this attribute. DPoE ONUs that support 1G-EPON and 10G-EPON SHOULD support this attribute.
Reference: DPoE-SP-OAMv1.0-I08-140807 specification ( see spec for intepretation of return value )
Context: ONU

Parameters
USHORT*pMode - Return the EPON mode(s) supported by this ONU
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_setResetOnu()

int dpoe_setResetOnu ( void  )

@description This attribute resets the ONU, as if from power on.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
None.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getDynamicMacAddressAgeLimit()

int dpoe_getDynamicMacAddressAgeLimit ( unsigned short *  pAgeLimit)

@description This attribute represents Dynamic MAC learning table age limit.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
USHORT*pAgeLimit - Return the age limit
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getDynamicMacLearningTableSize()

int dpoe_getDynamicMacLearningTableSize ( unsigned short *  pNumEntries)

@description This attribute is a capability attribute that represents the maximum size of the DPoE ONU MAC address learning table for the entire DPoE ONU.

The total number of MAC addresses learned by the DPoE ONU cannot exceed this number.

Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
USHORT*pNumEntries - Number of entries, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getDynamicMacTable()

int dpoe_getDynamicMacTable ( dpoe_link_mac_address_t  linkDynamicMacTable[],
unsigned short  numEntries 
)

@description This attribute represents the dynamically learned MAC address rules.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: Logical Link

Parameters
dpoe_link_mac_address_tlinkDynamicMacTable[] - Dynamically learned MAC address, to be returned
USHORTnumEntries - Number of entries
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getStaticMacTable()

int dpoe_getStaticMacTable ( dpoe_link_mac_address_t  linkStaticMacTable[],
unsigned short  numEntries 
)

@description This attribute represents the statically provisioned MAC address table.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: Logical Link

Parameters
dpoe_link_mac_address_tlinkStaticMacTable[] - Statically provisioned MAC address tabl, to be returned
USHORTnumEntries - Number of entries
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getMacLearningAggregateLimit()

int dpoe_getMacLearningAggregateLimit ( unsigned short *  pAggregrateLimit)

@description This message represents the aggregate dynamic MAC address limit for the DPoE ONU as a whole. This is the maximum number of addresses that can be learned by all ports combined.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
USHORT*pAggregrateLimit - Aggregate dynamic MAC address limit, to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_getOnuLinkStatistics()

int dpoe_getOnuLinkStatistics ( dpoe_link_traffic_stats_t  onuLinkTrafficStats[],
unsigned short  numEntries 
)

@description This function will return a list of all LLID port traffic statistics for this ONU.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification

Example Usage:
dpoe_link_traffic_stats_t *pMyLinkStats = (dpoe_link_traffic_stats_t *)malloc((sizeof (dpoe_link_traffic_stats_t)*dpoe_getMaxLogicalLinks()));
memset((char *)pMyLinkStats, 0x00, (sizeof(dpoe_link_traffic_stats_t)*dpoe_getMaxLogicalLinks()));
dpoe_getOnuLinkStatistics(pMyLinkStats, dpoe_getMaxLogicalLinks());
Context: Logical Link

Parameters
dpoe_link_traffic_stats_tpOnuTrafficStats - This pointer should allocate 'numEntries' times of dpoe_llid_traffic_stats_t size memory
USHORTnumEntries - Which is determined by dpoe_getMaxLogicalLinks().
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_setClearOnuLinkStatistics()

int dpoe_setClearOnuLinkStatistics ( void  )

@description This function will clear all statistics for the DPoE ONU.


Reference: DPoE-SP-OAMv1.0-I08-140807 specification
Context: ONU

Parameters
None.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_hal_Reboot_Ready()

int dpoe_hal_Reboot_Ready ( unsigned long *  pValue)

@description Get the Reboot Ready Status

Parameters
ULONG*pValue - Values of 1 for Ready, 2 for Not Ready
Returns
the status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected

◆ dpoe_hal_ReinitMac()

int dpoe_hal_ReinitMac ( )

@description Reinit DPoE. Performs reinit MAC only to same DS/US.

Parameters
None.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_hal_Get_eponResetCount()

int dpoe_hal_Get_eponResetCount ( unsigned long *  resetcnt)

@description Retrieve the count of epon resets

Parameters
ULONG*resetcnt - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_hal_LocalResetCount()

int dpoe_hal_LocalResetCount ( unsigned long *  resetcnt)

@description Retrieve the count of local reset

Parameters
ULONG*resetcnt - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_hal_Get_ErouterResetCount()

int dpoe_hal_Get_ErouterResetCount ( unsigned long *  resetcnt)

@description Retrieve the count of erouter reset

Parameters
ULONG*resetcnt - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_LlidForwardingStateGetEntryCount()

int dpoe_LlidForwardingStateGetEntryCount ( unsigned short *  pNumEntry)

@description Retrieve the count of max logical links

Parameters
ULONG*pNumEntry - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_OamFrameRateGetEntryCount()

int dpoe_OamFrameRateGetEntryCount ( unsigned short *  pNumEntry)

@description Retrieve the count of max logical links.

Parameters
ULONG*pNumEntry - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

◆ dpoe_OnuLinkStatisticsGetEntryCount()

int dpoe_OnuLinkStatisticsGetEntryCount ( unsigned short *  pNumEntry)

@description Retrieve the count of max logical links

Parameters
ULONG*pNumEntry - Count to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.