
Description | Cautions | Example | Errors | See Also
Name: |
int cc_GetDLinkCfg(bdev, dlinkptr, dlinkcfgptr) | |
Inputs: |
LINEDEV bdev |
|
DLINK *dlinkptr |
| |
DLINK_CFG *dlinkcfgptr |
| |
Returns: |
0 on success | |
Includes: |
cclib.h | |
Category: |
System tools | |
Mode: |
synchronous | |
Technology: |
BRI/SC | |
The cc_GetDLinkCfg( ) function retrieves the configuration of a logical link. The logical link is configured using the cc_SetDLinkCfg( ) function.
Parameter |
Description |
bdev: |
Station device handle. |
dlinkptr: |
Pointer to the data link information block. See Section 6.4. DLINK for a description of the elements of this data structure. |
dlinkcfgptr: |
Pointer to the buffer containing the data link logical link configuration block. See Section 6.5. DLINK_CFG for a description of the elements of this data structure. |
Make sure that the DLINK_CFG data structure is initialized to zero.
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#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);
.
.
.
}
}
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 |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation