cc_GetDLinkCfg( ) retrieves the configuration of a logical link
108
#include "cclib.h"
/* Global variables */
LINEDEV ldev; /* Board device handle */
main()
{
DLINK dlink;
DLINK_CFG cfg;
.
.
.
dlink.sapi = 0;
dlink.ces = 1;
/* Get config parameters for ces 1, sapi 0 */
if ( cc_GetDLinkCfg(ldev, &dlink, &cfg) < 0) {
printf("error");
} else {
printf(" tei=0x%X state=0x%X protocol=0x%X\n",
cfg.tei, cfg.state, cfg.protocol);
.
.
.
}
}
!
! !
!
Errors
If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function
to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be
used to interpret the reason code. Error codes are defined in the files ccerr.h,
isdnerr.h, and isdncmd.h.
Error codes from the cc_GetDLinkCfg( ) function include the following:
Error Code Description
E_BADDEV | ERR_ISDN_LIB Bad Device Descriptor
E_INVNDIINTERFACE | ERR_ISDN_LIB Invalid NDI Interface
E_INVNRB | ERR_ISDN_LIB Invalid NRB
!
! !
!
See Also
• cc_SetDLinkCfg( )