PREV TOC HOME INDEX NEXT


1.7.4. Retrieve the Logical Data Link State

The GCIS_EXID_GETDLINKSTATE extension ID is supported when using Springware boards only. When using DM3 boards, the GCIS_EXID_GETDLINKSTATE extension ID is not supported.

The GCIS_EXID_GETDLINKSTATE extension ID is used for retrieving the logical data link state (operable, inoperable or disabled) of the specified board device for PRI or station device for BRI.

The following table provides the parameter inputs for the gc_Extension( ) function.

Parameter

Input

target_type GCTGT_GCLIB_CHAN
target_id board device handle for PRI, station device handle for BRI
ext_id GCIS_EXID_GETDLINKSTATE
parmblkp set_id - GCIS_SET_DLINK

parm_id - GCIS_PARM_DLINK_CES


values -

    • 0 for PRI
    • 1-8 for BRI when used as a network-side terminal.

value_type - char


parm_id - GCIS_PARM_DLINK_SAPI


values -

    • 0 for BRI and PRI
    • 16 for X.25 packets over D-channel

value_type - char

retblkp set_id - GCIS_SET_DLINK

parm_id - GCIS_PARM_DLINK_STATE


values -

    • DATA_LINK_DOWN
    • DATA_LINK_UP
    • DATA_LINK_DISABLED

value_type - int

mode EV_SYNC

Example

int extGetDLinkState (LINEDEV handle)
{
    GC_PARM_DATAP parm_datap;
    GC_PARM_BLKP parm_blkp = NULL, ret_blkp = NULL;
    unsigned long mode;
    int ret_val = 0;
    GC_INFO  t_Info;
    char sapi, ces;
    sapi = 0;
    gc_util_insert_parm_ref( &parm_blkp, GCIS_SET_DLINK, GCIS_PARM_DLINK_SAPI,
        sizeof( char ), &sapi); 
    ces = 1;
    gc_util_insert_parm_ref( &parm_blkp, GCIS_SET_DLINK, GCIS_PARM_DLINK_CES,
        sizeof( char ), &ces); 
    mode = EV_SYNC; 
    ret_val = gc_Extension(GCTGT_GCLIB_CHAN, handle,
        GCIS_EXID_GETDLINKSTATE, parm_blkp, &ret_blkp, mode); 
    if ( ret_val )
    {
           ret_val = gc_ErrorInfo(&t_Info);
           if (ret_val == GC_SUCCESS) {
                    printf("gc_ErrorInfo() successfully called\n");
                    PrintGC_INFO(&t_Info);
           } else {
                    printf("gc_ErrorInfo() call failed\n");
           }
    }  
   	 	gc_util_delete_parm_blk( ret_blkp );
    gc_util_delete_parm_blk( parm_blkp );
    return ret_val;
} 

PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003