RDK-B
xtm_hal.h File Reference

Go to the source code of this file.

Data Structures

struct  _XTM_LINK_STATS
 

Macros

#define ULLONG   unsigned long long
 
#define ULONG   unsigned long
 
#define USHORT   unsigned short
 
#define BOOL   unsigned char
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define INT   int
 
#define UINT   unsigned int
 
#define TRUE   1
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 
#define RETURN_ERR   -1
 

Typedefs

typedef enum _XTM_LINK_TYPE XTM_LINK_TYPE
 enum to identify the XTM link type. It could be either ATM, PTM or Not Supported. More...
 
typedef enum _XTM_LINK_TYPEPXTM_LINK_TYPE
 
typedef enum _XTM_LINK_STATUS XTM_LINK_STATUS
 
typedef enum _XTM_LINK_STATUSPXTM_LINK_STATUS
 
typedef struct _XTM_LINK_STATS XTM_LINK_STATS
 
typedef struct _XTM_LINK_STATSPXTM_LINK_STATS
 

Enumerations

enum  _XTM_LINK_TYPE { PTM_LINK = 0, ATM_LINK, NOT_SUPPORTED }
 enum to identify the XTM link type. It could be either ATM, PTM or Not Supported. More...
 
enum  _XTM_LINK_STATUS {
  XTM_LINK_TRAINING = 0, XTM_LINK_UP, XTM_LINK_DOWN, XTM_LINK_DORMANT,
  XTM_LINK_NOT_PRESENT, XTM_LINK_LOWER_LAYER_DOWN, XTM_LINK_UNKNOWN, XTM_LINK_ERROR
}
 

Functions

int xtm_hal_init ()
 
  • Initialise the xtm features
More...
 
int xtm_hal_setLinkEnable (XTM_LINK_TYPE type, unsigned int lineIndex, unsigned char enable)
 
  • Enable/Disable XTM link interface. This bringup the XTM interface up.
More...
 
int xtm_hal_getLinkEnable (XTM_LINK_TYPE type, unsigned char *enable)
 
  • Get XTM link interface enabled or not.
More...
 
int xtm_hal_getLinkStats (XTM_LINK_TYPE type, unsigned int lineIndex, PXTM_LINK_STATS linkStats)
 
  • Get XTM link statistics information
More...
 
int xtm_hal_getLinkName (XTM_LINK_TYPE type, unsigned int lineIndex, char *ifName)
 
  • Get XTM (ATM/PTM) link interface name
More...
 
int xtm_hal_getLinkMacAddress (XTM_LINK_TYPE type, unsigned int lineIndex, char *macAddr)
 
  • Get XTM (ATM/PTM) link interface mac address.
More...
 
int xtm_hal_getLinkStatus (XTM_LINK_TYPE type, unsigned int lineIndex, PXTM_LINK_STATUS linkStatus)
 
  • Get XTM (ATM/PTM) interface link status.
More...
 
int xtm_hal_getLinkNumberOfEntries (XTM_LINK_TYPE type, unsigned int *lineCount)
 
  • Get total number of XTM (ATM/PTM) link entries.
More...
 
int xtm_hal_getLinkLastChange (XTM_LINK_TYPE type, unsigned int lineIndex, unsigned int *timestamp)
 
  • Get XTM (ATM/PTM) link interface last configured time stamp.
More...
 

Macro Definition Documentation

◆ ULLONG

#define ULLONG   unsigned long long

Definition at line 24 of file xtm_hal.h.

◆ ULONG

#define ULONG   unsigned long

Definition at line 28 of file xtm_hal.h.

◆ USHORT

#define USHORT   unsigned short

Definition at line 32 of file xtm_hal.h.

◆ BOOL

#define BOOL   unsigned char

Definition at line 36 of file xtm_hal.h.

◆ CHAR

#define CHAR   char

Definition at line 40 of file xtm_hal.h.

◆ UCHAR

#define UCHAR   unsigned char

Definition at line 44 of file xtm_hal.h.

◆ INT

#define INT   int

Definition at line 48 of file xtm_hal.h.

◆ UINT

#define UINT   unsigned int

Definition at line 52 of file xtm_hal.h.

◆ TRUE

#define TRUE   1

Definition at line 56 of file xtm_hal.h.

◆ FALSE

#define FALSE   0

Definition at line 60 of file xtm_hal.h.

◆ ENABLE

#define ENABLE   1

Definition at line 64 of file xtm_hal.h.

◆ RETURN_OK

#define RETURN_OK   0

Definition at line 68 of file xtm_hal.h.

◆ RETURN_ERR

#define RETURN_ERR   -1

Definition at line 72 of file xtm_hal.h.

Typedef Documentation

◆ XTM_LINK_TYPE

enum to identify the XTM link type. It could be either ATM, PTM or Not Supported.

◆ PXTM_LINK_TYPE

◆ XTM_LINK_STATUS

Enum to store the link status information.

◆ PXTM_LINK_STATUS

◆ XTM_LINK_STATS

Struture used to hold the XTM (PTM/ATM) line Statistics information.

◆ PXTM_LINK_STATS

Enumeration Type Documentation

◆ _XTM_LINK_TYPE

enum to identify the XTM link type. It could be either ATM, PTM or Not Supported.

Enumerator
PTM_LINK 
ATM_LINK 
NOT_SUPPORTED 

Definition at line 79 of file xtm_hal.h.

◆ _XTM_LINK_STATUS

Enum to store the link status information.

Enumerator
XTM_LINK_TRAINING 
XTM_LINK_UP 
XTM_LINK_DOWN 
XTM_LINK_DORMANT 
XTM_LINK_NOT_PRESENT 
XTM_LINK_LOWER_LAYER_DOWN 
XTM_LINK_UNKNOWN 
XTM_LINK_ERROR 

Definition at line 89 of file xtm_hal.h.

Function Documentation

◆ xtm_hal_init()

int xtm_hal_init ( )

  • Initialise the xtm features

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

◆ xtm_hal_setLinkEnable()

int xtm_hal_setLinkEnable ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
unsigned char  enable 
)

  • Enable/Disable XTM link interface. This bringup the XTM interface up.

Parameters
Typeof XTM link type. Could be ATM or PTM
XTMlink line index
Enable/Disableflag
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkEnable()

int xtm_hal_getLinkEnable ( XTM_LINK_TYPE  type,
unsigned char *  enable 
)

  • Get XTM link interface enabled or not.

Parameters
Typeof XTM link type. Could be ATM or PTM
Flagto store enable/disable status
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkStats()

int xtm_hal_getLinkStats ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
PXTM_LINK_STATS  linkStats 
)

  • Get XTM link statistics information

Parameters
Typeof XTM link type. Could be ATM or PTM
Structurepointer to hold statistics information
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkName()

int xtm_hal_getLinkName ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
char *  ifName 
)

  • Get XTM (ATM/PTM) link interface name

Parameters
Typeof XTM link type. Could be ATM or PTM
XTMlink line index
Stringto hold XTM link interface name
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkMacAddress()

int xtm_hal_getLinkMacAddress ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
char *  macAddr 
)

  • Get XTM (ATM/PTM) link interface mac address.

Parameters
Typeof XTM link type. Could be ATM or PTM
XTMlink line index
Stringto hold XTM link interface Mac address
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkStatus()

int xtm_hal_getLinkStatus ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
PXTM_LINK_STATUS  linkStatus 
)

  • Get XTM (ATM/PTM) interface link status.

Parameters
Typeof XTM link type. Could be ATM or PTM
XTMlink line index
Enumobject to hold the link status
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkNumberOfEntries()

int xtm_hal_getLinkNumberOfEntries ( XTM_LINK_TYPE  type,
unsigned int *  lineCount 
)

  • Get total number of XTM (ATM/PTM) link entries.

Parameters
Typeof XTM link type. Could be ATM or PTM
Unsignedinteger to store the total number of XTM line entries
Returns
The status of the operation
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected

◆ xtm_hal_getLinkLastChange()

int xtm_hal_getLinkLastChange ( XTM_LINK_TYPE  type,
unsigned int  lineIndex,
unsigned int *  timestamp 
)

  • Get XTM (ATM/PTM) link interface last configured time stamp.

Parameters
Typeof XTM link type. Could be ATM or PTM
PTMline index number
Stringto hold the last XTM interface configured time.
Returns
The status of the operation
The status of the operation
Return values
Returnlast timestamp value