?? zl5011xpkc.h
字號(hào):
/******************************************************************************
*
* File name: zl5011xPkc.h
*
* Version: 23
*
* Author: MRC
*
* Date created: 07/05/2002
*
* Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
* All rights reserved.
*
* Module Description:
*
* This is the header file for the PKC block. It contains the function prototypes
* and any definitions.
*
* Revision History:
*
* Rev: Date: Author: Comments:
* 1 07/05/2002 MRC Creation
* 2 13/05/2002 MRC Added pre-classifier functions
* 3 14/05/2002 LCW Minor mods.
* 4 16/05/2002 LCW Minor mods.
* 5 17/05/2002 LCW Minor mods.
* 6 21/05/2002 MRC PKC Rams have to be written in reverse order.
* 7 11/06/2002 LCW Added function: PkcGetStats
* 8 14/06/2002 LCW Added prototypes for delete match fns
* 9 27/06/2002 LCW Review actions.
* 10 12/07/2002 MRC Rationalised the 2 enums for CPU queues
* 11 06/08/2002 MRC Added packet filtering fns
* 12 03/10/2002 JFE Added two functions: zl5011xPkcSetPWInterrupt and..
* 13 08/10/2002 PJE Added three intr functions
* 14 31/10/2002 MRC Added variants + minor fixes
* 15 06/01/2003 MRC Modified function zl5011xPkcProtocolConfigure
* 16 25/03/2003 MRC Added fn zl5011xPkcChecksumConfig
* 17 22/05/2003 MRC Added PW interrupt status fn
* 18 23/10/2003 AMS Added zl5011xPkcProtocolConflictCheck
* 19 28/10/2003 AMS Updated zl5011xPkcProtocolConflictCheck
* 20 06/01/2004 MRC Update
* 21 25/08/2004 MRC Modified PW queue functions
* 22 02/03/2005 APL Updated comments
* 23 21/07/2005 MRC Added functions to check if entries are in use
*
*******************************************************************************/
#ifndef _ZL5011X_PKC_H
#define _ZL5011X_PKC_H
#ifdef __cplusplus
extern "C" {
#endif
/***************** INCLUDE FILES ******************************************/
/***************** # DEFINES **********************************************/
/* defines for the PKC interrupt bit positions */
#define ZL5011X_PACKET_RX_PW_INT 27
/***************** DATA TYPES *********************************************/
/***************** DATA STRUCTURES ****************************************/
/***************** EXPORTED GLOBAL VARIABLE DECLARATIONS ******************/
/***************** FUNCTION DECLARATIONS **********************************/
zlStatusE zl5011xPkcInit(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xPkcSetHostFlowType(zl5011xParamsS *zl5011xParams,
zl5011xFlowTypeE flow);
/* Prototypes for filter (pre-processor) function */
zlStatusE zl5011xPkcFilterGetFreeEntry(zl5011xParamsS *zl5011xParams,
Uint32T *matchNum);
zlStatusE zl5011xPkcFilterEnableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcFilterDisableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcFilterDeleteEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcFilterSetMatch(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, zl5011xPacketFilterMatchS *match);
/* Prototypes for protocol (pre-classifier) functions */
zlStatusE zl5011xPkcProtocolConfigure(zl5011xParamsS *zl5011xParams,
zl5011xBooleanE discard, zl5011xQueueE queueNum);
zlStatusE zl5011xPkcProtocolGetFreeEntry(zl5011xParamsS *zl5011xParams,
Uint32T *matchNum);
zlStatusE zl5011xPkcProtocolEnableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcProtocolDisableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcProtocolDeleteEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcProtocolCheckFreeEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, zl5011xBooleanE *entryFree);
zlStatusE zl5011xPkcProtocolSetMatchField(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, Uint8T *matchIndex);
zlStatusE zl5011xPkcProtocolSetMaskField(zl5011xParamsS *zl5011xParams,
Uint32T maskNum, Uint8T *maskIndex);
zlStatusE zl5011xPkcProtocolSetMatch(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, zl5011xPacketProtocolMatchS *match,
zl5011xPacketProtocolOutputS *output);
zlStatusE zl5011xPkcGetStats(zl5011xParamsS *zl5011xParams,
zl5011xPkcStatsS *stats);
/* Prototypes for classifier functions */
zlStatusE zl5011xPkcClassifyConfigure(zl5011xParamsS *zl5011xParams,
zl5011xBooleanE discard, zl5011xQueueE queueNum,
zl5011xBooleanE verifyDiscard, zl5011xQueueE verifyQueueNum);
zlStatusE zl5011xPkcClassifyGetFreeEntry(zl5011xParamsS *zl5011xParams,
Uint32T *matchNum);
zlStatusE zl5011xPkcClassifyEnableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcClassifyDisableEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcClassifyDeleteEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum);
zlStatusE zl5011xPkcClassifyCheckFreeEntry(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, zl5011xBooleanE *entryFree);
zlStatusE zl5011xPkcProtocolConflictCheck(zl5011xParamsS *zl5011xParams,
Uint32T *matchNum, zl5011xPacketProtocolMatchS *newMatch, zl5011xBooleanE extraCheck );
zlStatusE zl5011xPkcClassifySetMatchField(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, Uint8T *matchIndex, Uint8T protocolNum);
zlStatusE zl5011xPkcClassifySetMaskField(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, Uint8T *maskIndex);
zlStatusE zl5011xPkcClassifySetCheckField(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, Uint8T *checkBytes);
zlStatusE zl5011xPkcClassifySetGeneralMatch(zl5011xParamsS *zl5011xParams,
Uint32T matchNum, zl5011xPacketClassifyMatchS *match,
zl5011xFlowTypeE flow, Uint32T mpid);
zlStatusE zl5011xPkcClassifySetContextMatch(zl5011xParamsS *zl5011xParams,
Uint32T context, Uint32T matchNum, zl5011xPacketClassifyMatchS *match,
zl5011xPacketClassifyOutputS *output);
/* Prototypes for interrupt and PW functions */
zlStatusE zl5011xPkcClearInterrupts(zl5011xParamsS *zl5011xParams, Uint32T interruptBits);
zlStatusE zl5011xPkcEnableInterrupts(zl5011xParamsS *zl5011xParams, Uint32T interruptBits);
zlStatusE zl5011xPkcDisableInterrupts(zl5011xParamsS *zl5011xParams, Uint32T interruptBits);
zlStatusE zl5011xPkcGetInterruptStatus(zl5011xParamsS *zl5011xParams, Uint32T *pIntrStatus);
zlStatusE zl5011xPkcSetPWInterrupt(zl5011xParamsS *zl5011xParams,
Uint32T context, Uint32T matchNum, Uint32T pwStatusRegister);
zlStatusE zl5011xPkcGetPWInterrupt(zl5011xParamsS *zl5011xParams,
Uint32T matchNum,Uint32T *pwStatusRegister);
zlStatusE zl5011xPkcResetPwQueue(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xPkcGetPwStatus(zl5011xParamsS *zl5011xParams,
Uint32T *context, Uint32T *value);
/* Low level device access helper functions */
zlStatusE zl5011xAssembleBitFields(Uint32T *word, Uint8T *index, Uint8T *wordPos,
Uint32T newField, Uint8T newFieldSize);
zlStatusE zl5011xWriteAssembledBitFields(zl5011xParamsS *zl5011xParams,
Uint32T *word, Uint8T numWords, Uint8T wordPos, Uint32T address);
zlStatusE zl5011xPkcChecksumConfig(zl5011xParamsS *zl5011xParams,
zl5011xBooleanE enableIpv4Checksum, zl5011xBooleanE enableUdpChecksum);
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -