PREV TOC HOME INDEX NEXT


1.7.6. Retrieve Frame from Application

The GCIS_EXID_GETFRAME extension ID is supported when using Springware boards only. The GCIS_EXID_GETFRAME extension ID is not supported when using DM3 boards; use the gc_GetFrame( ) function instead.

The GCIS_EXID_GETFRAME extension ID is used to retrieve the frame received by the application. The gc_Extension( ) function is called after a GCEV_EXTENSION(ext_id = GCIS_EXEV_L2FRAME) event is received. Each GCEV_EXTENSION event is associated with one frame. This extension function is used for the data link layer only.

Note: To enable Layer 2 access, set parameter number 24 to 01 in the firmware parameter file. When Layer 2 access is enabled, only the gc_Extension( ) function with the ext_id set as either GCIS_EXID_GETFRAME or GCIS_EXID_SNDFRAME can be used (no calls can be made).

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

Parameter

Input

target_type GCTGT_CCLIB_CHAN
target_id the board device handle of the device
ext_id GCIS_EXID_GETFRAME
retblkp 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


set_id - GCIS_SET_IE

parm_id - GCIS_PARM_IEDATA


values - user provided


value_type - char array, length should not exceed MAXLEN_IEDATA

mode EV_SYNC

Note: The gc_Extension( ) function with ext_id set to GCIS_EXID_GETFRAME can be called only after a GCEV_EXTENSION(ext_id = GCIS_EXEV_L2FRAME) event is received. Refer to the protocol specific parameter file.

GCIS_EXID_GETFRAME is not supported for the BRI/2 board or for the PRI DPNSS protocol.

Example

int extGetFrame (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;
    mode = EV_SYNC; 
    ret_val = gc_Extension(GCTGT_GCLIB_CHAN, handle, GCIS_EXID_GETFRAME,
           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);
    } 
    gc_util_delete_parm_blk( parm_blkp );
    gc_util_delete_parm_blk( ret_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