📄 cd_util.h
字号:
** iHeaderSize, iTotalSize, FALSE );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_LoadUnschedTxPacket( CD_PacketTrrblType *pTrrbl,
UINT8 *pabHeader,
UINT16 iHeaderSize,
UINT16 iTotalSize,
BOOL fConfig
);
/*---------------------------------------------------------------------------
**
** cd_LookupTransportRecord()
**
** Look for a transport record by transport number.
**
**---------------------------------------------------------------------------
**
** Inputs:
** iPort - Port number to do lookup on
** iTransport - Transport number to lookup ( 1 -> n )
**
** Outputs:
** Return - Pointer to transport record
** NULL if transport not active
**
** Usage:
** pTranRecord = cd_LookupTransportRecord( iPort, iTransport );
**
**---------------------------------------------------------------------------
*/
EXTFUNC cd_TransportRecordType *cd_LookupTransportRecord( UINT16 iPort, UINT16 iTransport );
/*---------------------------------------------------------------------------
**
** cd_NumConnSnLinkedToTransport()
**
** Returns the number of connection serial numbers linked to the transport.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTr - Pointer to Transport Record
**
** Outputs:
** Return - Number of conn SN's linked to the transport.
**
** Usage:
** iNumLinks = cd_NumConnSnLinkedToTransport( pTransportRec );
**
**---------------------------------------------------------------------------
*/
INT8 cd_NumConnSnLinkedToTransport( cd_TransportRecordType *pTr );
/*---------------------------------------------------------------------------
**
** cd_ProcessTimer()
**
** Process a Rx transport timer timeout tribble (TOT).
** Ignore nullified TOTs. Request a connection close for valid TOTs.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTrrbl - Pointer to timeout tribble
**
** Outputs:
** None
**
** Usage:
** cd_ProcessTimer( pTrrbl );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_ProcessTimer( CD_TimeoutTrrblType *pTrrbl );
/*---------------------------------------------------------------------------
** cd_ProducerCopyFunction()
**
** This function is called when the application, (could be the other side of
** the bridge) has new data that needs to be produced.
** The function simply copies the data to one of the dual transport buffers.
** Current usage is for a bridging application where a producer transport
** on one side of the bridge provides this function, and a consumer
** transport on the other side calls it via a pointer.
**
**---------------------------------------------------------------------------
**
** Inputs:
** xRxAppHandle - Pointer to application specific data
** (In in this case a transport structure)
** pLeSeqCount - Pointer to Sequence Count of the packet
** pabPacket - Pointer to the raw received packet buffer
** iSize - Size of packet in bytes
**
** Outputs:
** Return - Number of bytes copied.
**
** Usage:
**
**---------------------------------------------------------------------------
*/
UINT16 cd_ProducerCopyFunction( void *xAppHandle, LeUINT16 *pLeSeqCount, UINT8 *pabPacket, UINT16 iSize );
/*---------------------------------------------------------------------------
**
** cd_Reset()
**
** Resets the ASIC. Asserts then releases reset, performs and validates
** ASIC self- test checks, and validates the ASIC firmware revision.
** Does basic ASIC initialization (but not network configuration)
** Enables interrupts at the ASIC. Leaves the ASIC initialized and offline.
**
**---------------------------------------------------------------------------
**
** Inputs:
** None
**
** Outputs:
** None
**
** Usage:
** cd_Reset();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_Reset( void );
/*---------------------------------------------------------------------------
**
** cd_RouteClass3Packet()
**
** Pre-route a received class 3 packet to the appropriate queue per the
** transport information.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTrrbl - Pointer to received packet tribble
**
** Outputs:
** None
**
** Usage:
** cd_RouteClass3Packet( pTrrbl );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_RouteClass3Packet( CD_PacketTrrblType *pTrrbl );
/*---------------------------------------------------------------------------
**
** cd_RouteFixedTagPacket()
**
** Hard coded fixed tag packet "pre-routing" routine.
** Stuffs a tag specific request code prior to sending the tribble to the
** appropriate task queue.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTrrbl - Pointer to received packet tribble
** fCoax - How the packet arrived (Coax or PTC)
**
** Outputs:
** None
**
** Usage:
** cd_RouteFixedTagPacket( pTrrbl, fCoax );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_RouteFixedTagPacket( CD_PacketTrrblType *pTrrbl, BOOL fCoax );
/*---------------------------------------------------------------------------
**
** cd_StartTransport()
**
** ASIC specific initializing and starting up of a transport.
** (one side of a class 1 or both sides of a class 3 connection).
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTransport - Pointer to transport record
**
** Outputs:
** Return - Success/failure status
**
** Usage:
**
** eStatus = cd_StartTransport( pTransport );
**
**---------------------------------------------------------------------------
*/
EXTFUNC StatusType cd_StartTransport( cd_TransportRecordType *pTransport );
/*---------------------------------------------------------------------------
**
** cd_StopTransport()
**
** ASIC specific stopping and cleaning up of a transport.
** (one side of a class 1 or both sides of a class 3 connection).
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTransport - Pointer to transport record
**
** Outputs:
** None
**
** Usage:
**
** cd_StopTransport( pTransport );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_StopTransport( cd_TransportRecordType *pTransport );
/*---------------------------------------------------------------------------
**
** cd_TxClass3Packet()
**
** Initiate the transfer of a class 3 packet into the ASIC for transmission.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTrrbl - Pointer to tribble/combuf to transmit
**
** Outputs:
** None
**
** Usage:
** cd_TxClass3Packet( pTrrbl );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_TxClass3Packet( CD_PacketTrrblType *pTrrbl );
/*---------------------------------------------------------------------------
**
** cd_TxFixedTagPacket()
**
** Initiate the transfer of a fixed tag packet into the ASIC for transmission.
** Delete the combuf and return the tribble when the transfer is complete.
**
**---------------------------------------------------------------------------
**
** Inputs:
** pTrrbl - Pointer to tribble/combuf to transmit
** fConfig - Is this a config or normal packet
**
** Outputs:
** None
**
** Usage:
**
** cd_TxFixedTagPacket( pTrrbl, FALSE );
**
**---------------------------------------------------------------------------
*/
EXTFUNC void cd_TxFixedTagPacket( CD_PacketTrrblType *pTrrbl, BOOL fConfig );
/*---------------------------------------------------------------------------
**
** cd_UnlinkConnSnFromTransport()
**
** Unlinks connection serial number from transport record.
**
**---------------------------------------------------------------------------
**
** Inputs:
** iConnSn - Connection Serial Number
** pTr - Pointer to Transport Record
**
** Outputs:
** Return - Number of conn SN's linked to the transport.
**
** Usage:
** iLocation = cd_UnlinkConnSnFromTransport( iConnectionSn, pTransportRec );
**
**---------------------------------------------------------------------------
*/
INT8 cd_UnlinkConnSnFromTransport( UINT16 iConnSn, cd_TransportRecordType *pTr );
void cd_OpenTransportCount( int *theClass1Count, int *theClass3Count );
#endif /* defined(CD_EN_OBJECTS) */
#endif /* inclusion lock */
/****************************************************************************
**
** End of CD_UTIL.H
**
*****************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -