RDK-B
WAN HAL APIs

Description

Functions

int wan_hal_Init ()
 
int wan_hal_SetWanmode (t_eWanMode mode)
 
int wan_hal_SetWanConnectionEnable (unsigned int enable)
 
int wan_hal_SetSelfHealConfig (PSELFHEAL_CONFIG pSelfHealConfig)
 
int wan_hal_GetWanOEUpstreamCurrRate (unsigned int *pValue)
 
int wan_hal_GetWanOEDownstreamCurrRate (unsigned int *pValue)
 
int wan_hal_SetQoSConfiguration (PWAN_QOS_QUEUE pQueue, unsigned int QueueNumberOfEntries, const char *baseifname, const char *wanifname)
 
int wan_hal_ConfigureIpv4 (PWAN_IPV4_CFG pWanIpv4Cfg)
 
int wan_hal_UnConfigureIpv4 (PWAN_IPV4_CFG pWanIpv4Cfg)
 
int wan_hal_ConfigureIpv6 (PWAN_IPV6_CFG pWanIpv6Cfg)
 
int wan_hal_UnConfigureIpv6 (PWAN_IPV6_CFG pWanIpv6Cfg)
 
int wan_hal_EnableMapt (PWAN_MAPT_CFG pMAPTCfg)
 
int wan_hal_DisableMapt (const char *ifName)
 
int wan_hal_enableWanOEMode (const unsigned char enable)
 
int wan_hal_getAuthInfo (char *authInfo)
 

Function Documentation

◆ wan_hal_Init()

int wan_hal_Init ( )

@description - Initialise the wan features

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

◆ wan_hal_SetWanmode()

int wan_hal_SetWanmode ( t_eWanMode  mode)

@description Set wanmode value

Parameters
pValue- the WANMODE value to be set
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_SetWanConnectionEnable()

int wan_hal_SetWanConnectionEnable ( unsigned int  enable)

@description Set wanconnection enable value

Parameters
pValue- the WanConnectionEnable value to be set
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_SetSelfHealConfig()

int wan_hal_SetSelfHealConfig ( PSELFHEAL_CONFIG  pSelfHealConfig)

@description Set SelfHeal Configuration to wanmanager

Parameters
pSelfHealConfig- Ptr to struct contains the configuration
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_GetWanOEUpstreamCurrRate()

int wan_hal_GetWanOEUpstreamCurrRate ( unsigned int *  pValue)

@description Get the current payload bandwidth of the upstream WANoE Connection

Parameters
pValue- Pointer field where the current payload bandwidth to be updated
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_GetWanOEDownstreamCurrRate()

int wan_hal_GetWanOEDownstreamCurrRate ( unsigned int *  pValue)

@description Get the current payload bandwidth of the downstream WANoE Connection

Parameters
pValue- Pointer field where the current payload bandwidth to be updated
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_SetQoSConfiguration()

int wan_hal_SetQoSConfiguration ( PWAN_QOS_QUEUE  pQueue,
unsigned int  QueueNumberOfEntries,
const char *  baseifname,
const char *  wanifname 
)

@description Sets the current QoS configuration

Parameters
queueInfo- QoS configurations to be set
QueueNumberOfEntries- The number of QoS profiles
baseifname- Base interface name
wanifname- Wan interface name
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_ConfigureIpv4()

int wan_hal_ConfigureIpv4 ( PWAN_IPV4_CFG  pWanIpv4Cfg)

@description configure IPv4 dnsservers, netmask and ip address for the required interface

Parameters
pWanIpv4Cfg- fill needed WAN_IPV4_CFG information
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_UnConfigureIpv4()

int wan_hal_UnConfigureIpv4 ( PWAN_IPV4_CFG  pWanIpv4Cfg)

@description unconfigure IPv4 dnsservers, netmask and ip address for the required interface

Parameters
pWanIpv4Cfg- fill needed WAN_IPV4_CFG information
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_ConfigureIpv6()

int wan_hal_ConfigureIpv6 ( PWAN_IPV6_CFG  pWanIpv6Cfg)

@description Add IPv6 address for the required interface

Parameters
pWanIpv6Cfg- fill needed WAN_IPV6_CFG information
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_UnConfigureIpv6()

int wan_hal_UnConfigureIpv6 ( PWAN_IPV6_CFG  pWanIpv6Cfg)

@description Delete IPv6 address for the required interface

Parameters
pWanIpv6Cfg- fill needed WAN_IPV6_CFG information
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_EnableMapt()

int wan_hal_EnableMapt ( PWAN_MAPT_CFG  pMAPTCfg)

@description Enable MAPT for the required interface

Parameters
pMAPTCfg- Needs to fill PWAN_MAPT_CFG params
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_DisableMapt()

int wan_hal_DisableMapt ( const char *  ifName)

@description Disable MAPT for the required interface

Parameters
ifName- interface name
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ wan_hal_enableWanOEMode()

int wan_hal_enableWanOEMode ( const unsigned char  enable)

@description Set/Reset WanOE mode based on the enable flag. If it is true, update the boardparam to set WAN_ETH_MODE in the CPE. Else disabled the WAN_ETH_MODE and reclaim ethernet port.

Parameters
enableflag indicates to enable or disable ETH_WAN mode in CPE.

◆ wan_hal_getAuthInfo()

int wan_hal_getAuthInfo ( char *  authInfo)

@description Get authentication information like ADSL username and password.

Parameters
autInfoto hold the authentication data
Return values
RETURN_OKif successful else RETURN_ERR