RDK-B
ccsp_hal_ethsw.h File Reference

For CCSP Component: Ccsp Provisioning & Managment. More...

Go to the source code of this file.

Data Structures

struct  _CCSP_HAL_ETH_STATS
 
struct  _eth_device
 
struct  __appCallBack
 

Macros

#define ULONG   unsigned long
 
#define ULLONG   unsigned long long
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define BOOLEAN   UCHAR
 
#define INT   int
 
#define UINT   unsigned int
 
#define TRUE   1
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 
#define RETURN_ERR   -1
 
#define ETHWAN_DEF_INTF_NUM   0
 
#define ETHWAN_INTERFACE_NAME_MAX_LENGTH   32
 
#define UP   "up"
 
#define DOWN   "down"
 

Typedefs

typedef enum _CCSP_HAL_ETHSW_PORT CCSP_HAL_ETHSW_PORT
 
typedef enum _CCSP_HAL_ETHSW_PORTPCCSP_HAL_ETHSW_PORT
 
typedef enum _CCSP_HAL_ETHSW_LINK_RATE CCSP_HAL_ETHSW_LINK_RATE
 
typedef enum _CCSP_HAL_ETHSW_LINK_RATEPCCSP_HAL_ETHSW_LINK_RATE
 
typedef enum _CCSP_HAL_ETHSW_DUPLEX_MODE CCSP_HAL_ETHSW_DUPLEX_MODE
 
typedef enum _CCSP_HAL_ETHSW_DUPLEX_MODEPCCSP_HAL_ETHSW_DUPLEX_MODE
 
typedef enum _CCSP_HAL_ETHSW_LINK_STATUS CCSP_HAL_ETHSW_LINK_STATUS
 
typedef enum _CCSP_HAL_ETHSW_LINK_STATUSPCCSP_HAL_ETHSW_LINK_STATUS
 
typedef enum _CCSP_HAL_ETHSW_ADMIN_STATUS CCSP_HAL_ETHSW_ADMIN_STATUS
 
typedef enum _CCSP_HAL_ETHSW_ADMIN_STATUSPCCSP_HAL_ETHSW_ADMIN_STATUS
 
typedef struct _CCSP_HAL_ETH_STATS CCSP_HAL_ETH_STATS
 
typedef struct _CCSP_HAL_ETH_STATSPCCSP_HAL_ETH_STATS
 
typedef struct _eth_device eth_device_t
 
typedef int(* CcspHalExtSw_ethAssociatedDevice_callback) (eth_device_t *eth_dev)
 This call back will be invoked when new Ethernet client come to associate to AP, or existing Ethernet client left. More...
 
typedef void(* fpEthWanLink_Up) ()
 
typedef void(* fpEthWanLink_Down) ()
 
typedef struct __appCallBack appCallBack
 

Enumerations

enum  _CCSP_HAL_ETHSW_PORT {
  CCSP_HAL_ETHSW_EthPort1 = 1, CCSP_HAL_ETHSW_EthPort2, CCSP_HAL_ETHSW_EthPort3, CCSP_HAL_ETHSW_EthPort4,
  CCSP_HAL_ETHSW_EthPort5, CCSP_HAL_ETHSW_EthPort6, CCSP_HAL_ETHSW_EthPort7, CCSP_HAL_ETHSW_EthPort8,
  CCSP_HAL_ETHSW_Moca1, CCSP_HAL_ETHSW_Moca2, CCSP_HAL_ETHSW_Wlan1, CCSP_HAL_ETHSW_Wlan2,
  CCSP_HAL_ETHSW_Wlan3, CCSP_HAL_ETHSW_Wlan4, CCSP_HAL_ETHSW_Processor1, CCSP_HAL_ETHSW_Processor2,
  CCSP_HAL_ETHSW_InterconnectPort1, CCSP_HAL_ETHSW_InterconnectPort2, CCSP_HAL_ETHSW_MgmtPort, CCSP_HAL_ETHSW_PortMax
}
 
enum  _CCSP_HAL_ETHSW_LINK_RATE {
  CCSP_HAL_ETHSW_LINK_NULL = 0, CCSP_HAL_ETHSW_LINK_10Mbps, CCSP_HAL_ETHSW_LINK_100Mbps, CCSP_HAL_ETHSW_LINK_1Gbps,
  CCSP_HAL_ETHSW_LINK_2_5Gbps, CCSP_HAL_ETHSW_LINK_5Gbps, CCSP_HAL_ETHSW_LINK_10Gbps, CCSP_HAL_ETHSW_LINK_Auto
}
 
enum  _CCSP_HAL_ETHSW_DUPLEX_MODE { CCSP_HAL_ETHSW_DUPLEX_Auto = 0, CCSP_HAL_ETHSW_DUPLEX_Half, CCSP_HAL_ETHSW_DUPLEX_Full }
 
enum  _CCSP_HAL_ETHSW_LINK_STATUS { CCSP_HAL_ETHSW_LINK_Up = 0, CCSP_HAL_ETHSW_LINK_Down, CCSP_HAL_ETHSW_LINK_Disconnected }
 
enum  _CCSP_HAL_ETHSW_ADMIN_STATUS { CCSP_HAL_ETHSW_AdminUp = 0, CCSP_HAL_ETHSW_AdminDown, CCSP_HAL_ETHSW_AdminTest }
 

Functions

int CcspHalEthSwInit (void)
 
int CcspHalEthSwGetPortStatus (CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_LINK_RATE pLinkRate, PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode, PCCSP_HAL_ETHSW_LINK_STATUS pStatus)
 
int CcspHalEthSwGetPortCfg (CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_LINK_RATE pLinkRate, PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode)
 
int CcspHalEthSwSetPortCfg (CCSP_HAL_ETHSW_PORT PortId, CCSP_HAL_ETHSW_LINK_RATE LinkRate, CCSP_HAL_ETHSW_DUPLEX_MODE DuplexMode)
 
int CcspHalEthSwGetPortAdminStatus (CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_ADMIN_STATUS pAdminStatus)
 
int CcspHalEthSwSetPortAdminStatus (CCSP_HAL_ETHSW_PORT PortId, CCSP_HAL_ETHSW_ADMIN_STATUS AdminStatus)
 
int CcspHalEthSwSetAgingSpeed (CCSP_HAL_ETHSW_PORT PortId, int AgingSpeed)
 
int CcspHalEthSwLocatePortByMacAddress (unsigned char *mac, int *port)
 
int CcspHalExtSw_getAssociatedDevice (unsigned long *output_array_size, eth_device_t **output_struct)
 The HAL need to allocate array and return the array size by output_array_size. More...
 
void CcspHalExtSw_ethAssociatedDevice_callback_register (CcspHalExtSw_ethAssociatedDevice_callback callback_proc)
 Callback registration function. More...
 
int CcspHalExtSw_getEthWanEnable (unsigned char *pFlag)
 
int CcspHalExtSw_setEthWanEnable (unsigned char Flag)
 
int CcspHalExtSw_getEthWanPort (unsigned int *pPort)
 
int CcspHalExtSw_setEthWanPort (unsigned int Port)
 
int CcspHalEthSwGetEthPortStats (CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETH_STATS pStats)
 
void GWP_RegisterEthWan_Callback (appCallBack *obj)
 This function will get used to register RDKB functions to the callback pointers. More...
 
int GWP_GetEthWanLinkStatus ()
 
int GWP_GetEthWanInterfaceName (unsigned char *Interface, unsigned long maxSize)
 This function will get used to retrieve the ETHWAN interface name. API returns 0 = success and 1 = fail. More...
 

yes

For CCSP Component: Ccsp Provisioning & Managment.

Author
Cisco @description This header file defines the structures and function prototypes for Ethernet Switch control.

Definition in file ccsp_hal_ethsw.h.