1.7.11. Send Frame to the Data Link Layer
The GCIS_EXID_SNDFRAME extension ID is supported when using Springware boards only. The GCIS_EXID_SNDFRAME extension ID is not supported when using DM3 boards; use the gc_SndFrame( ) function instead.
The GCIS_EXID_SNDFRAME extension ID is used to send a frame to the data link layer. When the data link layer is successfully established, the application will receive a GCEV_D_CHAN_STATUS event. If the data link layer is not established before the function is called, the function will be returned with a value <0 indicating function failure.
- 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 parameter set to GCIS_EXID_GetFrame can be used (no calls can be made).
The following table shows the inputs for the gc_Extension( ) function
target_type GCTGT_GCLIB_CRN target_id call reference number (CRN) of the call ext_id GCIS_EXID_SNDFRAME parmblkp the pstruct member of parmblkp should point to the L2_BLK data structure. For a description of the L2_BLK data structure, refer to Section 5.2, L2_BLK. Also see example code for details. set_id - GCIS_SET_DLINK parm_id - GCIS_PARM_DLINK_CES parm_id - GCIS_PARM_DLINK_SAPI set_id - GCIS_SET_IE parm_id - GCIS_PARM_IEDATA value_type - char array, length should not exceed MAXLEN_IEDATA
mode EV_SYNC
- Note: The data link layer must be successfully established before the gc_Extension( ) function with ext_id GCIS_EXID_SndFrame is called.
Example
int extSndFrame (LINEDEV handle) { GC_PARM_BLKP parm_blkp = NULL, ret_blkp = NULL; unsigned long mode; int ret_val = 0; GC_INFO t_Info; int indicator char sapi, ces, ie_data[255]; 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); InitSndFrameBlk(ie_data); gc_util_insert_parm_ref( &parm_blkp, GCIS_SET_IE, GCIS_PARM_IEDATA, 13, ie_data); mode = EV_SYNC; ret_val = gc_Extension(GCTGT_GCLIB_CHAN, handle, GCIS_EXID_SNDFRAME, 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; } void InitSndFrameBlk (char *data) { data [0] = 0x08; /* Protocol discriminator */ data [1] = 0x02; /* CRN length - 2 bytes */ data [2] = 0x03; /* CRN = 8003 */ data [3] = 0x80; data [4] = 0x6e; /* msg type = NOTIFY */ /* The first IE */ data [5] = 0x27; /* IE type = 27 (NOTIFY) */ data [6] = 0x01; /* The length of NOTIFY */ data [7] = 0xF1; /* Notify indication */ /* The second IE */ data [8] = 0x76; /* IE type = 76 (REDIRECTION) */ data [9] = 0x03; /* length of redirection */ data [10] = 0x01; /* unknown type and E164 plan */ data [11] = 0x03; /* network provides presentation */ data [12] = 0x8D; /* reason = transfer */ }
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation