#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
 | 
| enum   | _IfStatus_t {  
  IF_UP = 1, 
IF_DOWN, 
IF_UNKNOWN, 
IF_DORMANT, 
 
  IF_NOTPRESENT, 
IF_LOWERLAYERDOWN, 
IF_ERROR
 
 } | 
|   | 
| enum   | _DslLinkStatus_t {  
  LINK_UP = 1, 
LINK_INITIALIZING, 
LINK_ESTABLISHING, 
LINK_NOSIGNAL, 
 
  LINK_DISABLED, 
LINK_ERROR
 
 } | 
|   | 
| enum   | _DslModType_t {  
  MOD_G_922_1_ANNEX_A = 1, 
MOD_G_922_1_ANNEX_B = 1 << 1, 
MOD_G_922_1_ANNEX_C = 1 << 2, 
MOD_T1_413 = 1 << 3, 
 
  MOD_T1_413i2 = 1 << 4, 
MOD_ETSI_101_388 = 1 << 5, 
MOD_G_992_2 = 1 << 6, 
MOD_G_992_3_Annex_A = 1 << 7, 
 
  MOD_G_992_3_Annex_B = 1 << 8, 
MOD_G_992_3_Annex_C = 1 << 9, 
MOD_G_992_3_Annex_I = 1 << 10, 
MOD_G_992_3_Annex_J = 1 << 11, 
 
  MOD_G_992_3_Annex_L = 1 << 12, 
MOD_G_992_3_Annex_M = 1 << 13, 
MOD_G_992_4 = 1 << 14, 
MOD_G_992_5_Annex_A = 1 << 15, 
 
  MOD_G_992_5_Annex_B = 1 << 16, 
MOD_G_992_5_Annex_C = 1 << 17, 
MOD_G_992_5_Annex_I = 1 << 18, 
MOD_G_992_5_Annex_J = 1 << 19, 
 
  MOD_G_992_5_Annex_M = 1 << 20, 
MOD_G_993_1 = 1 << 21, 
MOD_G_993_1_Annex_A = 1 << 22, 
MOD_G_993_2_Annex_A = 1 << 23, 
 
  MOD_G_993_2_Annex_B = 1 << 24, 
MOD_G_993_2_Annex_C = 1 << 25
 
 } | 
|   | 
| enum   | _DslLineEncoding_t {  
  LINE_ENCODING_DMT = 1, 
LINE_ENCODING_CAP, 
LINE_ENCODING_2B1Q, 
LINE_ENCODING_43BT, 
 
  LINE_ENCODING_PAM, 
LINE_ENCODING_QAM
 
 } | 
|   | 
| enum   | _DslProfile_t {  
  VDSL2_8a = 1, 
VDSL2_8b, 
VDSL2_8c, 
VDSL2_8d, 
 
  VDSL2_12a, 
VDSL2_12b, 
VDSL2_17a, 
VDSL2_30a, 
 
  VDSL2_35b
 
 } | 
|   | 
| enum   | _DslPowerManagementState_t {  
  POWER_L0 = 1, 
POWER_L1, 
POWER_L2, 
POWER_L3, 
 
  POWER_L4
 
 } | 
|   | 
| enum   | _DslLineTrainingStatus_t { NOT_TRAINING = 1, 
TRAINING = 2, 
TRAINED = 3
 } | 
|   | 
| enum   | LinkEncapsulation_t {  
  LINK_ENCAP_G_992_3_Annex_K_ATM, 
LINK_ENCAP_G_992_3_Annex_K_PTM, 
LINK_ENCAP_G_993_2_Annex_K_ATM, 
LINK_ENCAP_G_993_2_Annex_K_PTM, 
 
  LINK_ENCAP_G_994_1_Auto
 
 } | 
|   | 
| enum   | DslDiagState_t {  
  ADSL_DIAG_STATE_None = 1, 
ADSL_DIAG_STATE_Requested, 
ADSL_DIAG_STATE_Canceled, 
ADSL_DIAG_STATE_Complete, 
 
  ADSL_DIAG_STATE_Error, 
ADSL_DIAG_STATE_Error_Internal, 
ADSL_DIAG_STATE_Error_Other
 
 } | 
|   | 
| enum   | DslDiagTestType_t { ADSL_LINE_TEST = 1, 
SELTUER, 
SELTQLN, 
SELTP
 } | 
|   | 
 | 
| int  | xdsl_hal_init (void) | 
|   | 
| int  | xdsl_hal_registerDslLinkStatusCallback (dsl_link_status_callback link_status_cb) | 
|   | 
| int  | xdsl_hal_dslGetLineEnable (int lineNo, unsigned char *enable) | 
|   | 
| int  | xdsl_hal_dslSetLineEnable (int lineNo, unsigned char enable) | 
|   | 
| int  | xdsl_hal_dslSetLineEnableDataGathering (int lineNo, unsigned char enable) | 
|   | 
| int  | xdsl_hal_getTotalNoOfLines (void) | 
|   | 
| int  | xdsl_hal_getTotalNoofChannels (int lineNo) | 
|   | 
| int  | xdsl_hal_dslGetLineInfo (int lineNo, DslLineInfo_t *lineInfo) | 
|   | 
| int  | xdsl_hal_dslGetLineStats (int lineNo, DslLineStats_t *lineStats) | 
|   | 
| int  | xdsl_hal_dslGetChannelInfo (int lineNo, int channelNo, DslChannel_t *channelInfo) | 
|   | 
| int  | xdsl_hal_dslGetChannelStats (int lineNo, int channelNo, DslChannelStats_t *channelStats) | 
|   | 
| int  | xdsl_hal_dslGetDiagnosticAdslLineTest (int lineNo, DslDiagAdslLineTest_t *AdslLineTest) | 
|   | 
| int  | xdsl_hal_dslGetDiagnosticSeltuer (int lineNo, DslDiagSeltuer_t *DiagSeltuer) | 
|   | 
| int  | xdsl_hal_dslGetDiagnosticSeltqln (int lineNo, DslDiagSeltqln_t *DiagSeltqln) | 
|   | 
| int  | xdsl_hal_dslGetDiagnosticSeltp (int lineNo, DslDiagSeltp_t *DiagSeltp) | 
|   | 
| int  | xdsl_hal_dslDiagnosticTestStart (int lineNo, DslDiagTestType_t type) | 
|   | 
| int  | xdsl_hal_dslGetXRdk_Nlm (DslXRdkNlm_t *nlmInfo) | 
|   | 
◆ XDSL_MAX_LINES
Common definitions 
Definition at line 31 of file xdsl_hal.h.
 
 
◆ IfStatus_t
Operational status of a line or channel 
 
 
◆ DslLinkStatus_t
Status of the DSL physical link 
 
 
◆ DslModType_t
◆ DslLineEncoding_t
◆ DslProfile_t
◆ DslPowerManagementState_t
◆ DslLineTrainingStatus_t
◆ dsl_link_status_callback
      
        
          | typedef int(* dsl_link_status_callback) (char *ifname, DslLinkStatus_t dsl_status) | 
        
      
 
This callback sends to upper layer when it receives link status from DSL driver
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
Definition at line 449 of file xdsl_hal.h.
 
 
◆ _IfStatus_t
Operational status of a line or channel 
| Enumerator | 
|---|
| IF_UP  |  | 
| IF_DOWN  |  | 
| IF_UNKNOWN  |  | 
| IF_DORMANT  |  | 
| IF_NOTPRESENT  |  | 
| IF_LOWERLAYERDOWN  |  | 
| IF_ERROR  |  | 
Definition at line 34 of file xdsl_hal.h.
 
 
◆ _DslLinkStatus_t
Status of the DSL physical link 
| Enumerator | 
|---|
| LINK_UP  |  | 
| LINK_INITIALIZING  |  | 
| LINK_ESTABLISHING  |  | 
| LINK_NOSIGNAL  |  | 
| LINK_DISABLED  |  | 
| LINK_ERROR  |  | 
Definition at line 45 of file xdsl_hal.h.
 
 
◆ _DslModType_t
DSL modulation types 
| Enumerator | 
|---|
| MOD_G_922_1_ANNEX_A  |  | 
| MOD_G_922_1_ANNEX_B  |  | 
| MOD_G_922_1_ANNEX_C  |  | 
| MOD_T1_413  |  | 
| MOD_T1_413i2  |  | 
| MOD_ETSI_101_388  |  | 
| MOD_G_992_2  |  | 
| MOD_G_992_3_Annex_A  |  | 
| MOD_G_992_3_Annex_B  |  | 
| MOD_G_992_3_Annex_C  |  | 
| MOD_G_992_3_Annex_I  |  | 
| MOD_G_992_3_Annex_J  |  | 
| MOD_G_992_3_Annex_L  |  | 
| MOD_G_992_3_Annex_M  |  | 
| MOD_G_992_4  |  | 
| MOD_G_992_5_Annex_A  |  | 
| MOD_G_992_5_Annex_B  |  | 
| MOD_G_992_5_Annex_C  |  | 
| MOD_G_992_5_Annex_I  |  | 
| MOD_G_992_5_Annex_J  |  | 
| MOD_G_992_5_Annex_M  |  | 
| MOD_G_993_1  |  | 
| MOD_G_993_1_Annex_A  |  | 
| MOD_G_993_2_Annex_A  |  | 
| MOD_G_993_2_Annex_B  |  | 
| MOD_G_993_2_Annex_C  |  | 
Definition at line 55 of file xdsl_hal.h.
 
 
◆ _DslLineEncoding_t
| Enumerator | 
|---|
| LINE_ENCODING_DMT  |  | 
| LINE_ENCODING_CAP  |  | 
| LINE_ENCODING_2B1Q  |  | 
| LINE_ENCODING_43BT  |  | 
| LINE_ENCODING_PAM  |  | 
| LINE_ENCODING_QAM  |  | 
Definition at line 88 of file xdsl_hal.h.
 
 
◆ _DslProfile_t
| Enumerator | 
|---|
| VDSL2_8a  |  | 
| VDSL2_8b  |  | 
| VDSL2_8c  |  | 
| VDSL2_8d  |  | 
| VDSL2_12a  |  | 
| VDSL2_12b  |  | 
| VDSL2_17a  |  | 
| VDSL2_30a  |  | 
| VDSL2_35b  |  | 
Definition at line 98 of file xdsl_hal.h.
 
 
◆ _DslPowerManagementState_t
| Enumerator | 
|---|
| POWER_L0  |  | 
| POWER_L1  |  | 
| POWER_L2  |  | 
| POWER_L3  |  | 
| POWER_L4  |  | 
Definition at line 111 of file xdsl_hal.h.
 
 
◆ _DslLineTrainingStatus_t
| Enumerator | 
|---|
| NOT_TRAINING  |  | 
| TRAINING  |  | 
| TRAINED  |  | 
Definition at line 120 of file xdsl_hal.h.
 
 
◆ LinkEncapsulation_t
| Enumerator | 
|---|
| LINK_ENCAP_G_992_3_Annex_K_ATM  |  | 
| LINK_ENCAP_G_992_3_Annex_K_PTM  |  | 
| LINK_ENCAP_G_993_2_Annex_K_ATM  |  | 
| LINK_ENCAP_G_993_2_Annex_K_PTM  |  | 
| LINK_ENCAP_G_994_1_Auto  |  | 
Definition at line 242 of file xdsl_hal.h.
 
 
◆ DslDiagState_t
| Enumerator | 
|---|
| ADSL_DIAG_STATE_None  |  | 
| ADSL_DIAG_STATE_Requested  |  | 
| ADSL_DIAG_STATE_Canceled  |  | 
| ADSL_DIAG_STATE_Complete  |  | 
| ADSL_DIAG_STATE_Error  |  | 
| ADSL_DIAG_STATE_Error_Internal  |  | 
| ADSL_DIAG_STATE_Error_Other  |  | 
Definition at line 333 of file xdsl_hal.h.
 
 
◆ DslDiagTestType_t
| Enumerator | 
|---|
| ADSL_LINE_TEST  |  | 
| SELTUER  |  | 
| SELTQLN  |  | 
| SELTP  |  | 
Definition at line 344 of file xdsl_hal.h.
 
 
◆ xdsl_hal_init()
      
        
          | int xdsl_hal_init  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
This function initialize and start DSL driver
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_registerDslLinkStatusCallback()
This function sets the function pointer which receives link status event from driver
- Parameters
 - 
  
    | [in] | link_status_cb | - The function pointer which receives link status event from driver. if NULL then need to deregister this callback | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetLineEnable()
      
        
          | int xdsl_hal_dslGetLineEnable  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          unsigned char *  | 
          enable  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the enable status of DSL line
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [out] | enable | status The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslSetLineEnable()
      
        
          | int xdsl_hal_dslSetLineEnable  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          unsigned char  | 
          enable  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function sets the enable/disble of DSL line
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [in] | enable | - configure DSL line | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslSetLineEnableDataGathering()
      
        
          | int xdsl_hal_dslSetLineEnableDataGathering  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          unsigned char  | 
          enable  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function sets the enable/disble for data gathering of DSL line
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [in] | enable | - configure DSL line | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_getTotalNoOfLines()
      
        
          | int xdsl_hal_getTotalNoOfLines  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
This function gets the number of DSL lines
- Returns
 - the number of DSL lines on success. Otherwise a negative value is returned. 
 
 
 
◆ xdsl_hal_getTotalNoofChannels()
      
        
          | int xdsl_hal_getTotalNoofChannels  | 
          ( | 
          int  | 
          lineNo | ) | 
           | 
        
      
 
This function gets the number of DSL channels corresponding line
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
  
   
- Returns
 - the number of DSL channels on success. Otherwise a negative value is returned. 
 
 
 
◆ xdsl_hal_dslGetLineInfo()
      
        
          | int xdsl_hal_dslGetLineInfo  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          DslLineInfo_t *  | 
          lineInfo  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the DSL line information
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [out] | lineInfo | - The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetLineStats()
      
        
          | int xdsl_hal_dslGetLineStats  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          DslLineStats_t *  | 
          lineStats  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the statistics counters of a DSL line
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [out] | lineStats | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetChannelInfo()
      
        
          | int xdsl_hal_dslGetChannelInfo  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          int  | 
          channelNo,  | 
        
        
           | 
           | 
          DslChannel_t *  | 
          channelInfo  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the DSL channel information
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | channelInfo | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetChannelStats()
      
        
          | int xdsl_hal_dslGetChannelStats  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          int  | 
          channelNo,  | 
        
        
           | 
           | 
          DslChannelStats_t *  | 
          channelStats  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the statistics counters of a DSL channel
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | channelStats | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetDiagnosticAdslLineTest()
This function gets the Diagnostic of ADSL Line
- Parameters
 - 
  
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | AdslLineTest | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetDiagnosticSeltuer()
      
        
          | int xdsl_hal_dslGetDiagnosticSeltuer  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          DslDiagSeltuer_t *  | 
          DiagSeltuer  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the Diagnostic Seltuer
- Parameters
 - 
  
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | DiagSeltuer | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetDiagnosticSeltqln()
      
        
          | int xdsl_hal_dslGetDiagnosticSeltqln  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          DslDiagSeltqln_t *  | 
          DiagSeltqln  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the Diagnostic Seltqln
- Parameters
 - 
  
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | DiagSeltqln | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetDiagnosticSeltp()
      
        
          | int xdsl_hal_dslGetDiagnosticSeltp  | 
          ( | 
          int  | 
          lineNo,  | 
        
        
           | 
           | 
          DslDiagSeltp_t *  | 
          DiagSeltp  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function gets the Diagnostic Seltp
- Parameters
 - 
  
    | [in] | channelNo | - The channel number which starts with 0  | 
    | [out] | DiagSeltp | The output parameter to receive the data | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslDiagnosticTestStart()
This function starts the Line Diagnostics
- Parameters
 - 
  
    | [in] | lineNo | - The line number which starts with 0  | 
    | [in] | DslDiagState_t | The diagnostics state to start the test | 
  
   
- Returns
 - 0 on success. Otherwise a negative value is returned 
 
 
 
◆ xdsl_hal_dslGetXRdk_Nlm()
This function retrieves echotonoiseratio
- Parameters
 - 
  
  
 
- Returns
 - 0 on success. Otherwise a negative value is returned