/* Copyright (C) 2006 Ikanos Communications * See IKANOS_PROP_LICENSE.txt for license information. */ #ifndef _USER_API_H_ #define _USER_API_H_ #include "defines.h" #include "apload.h" #include "apflow.h" #include "apbridge.h" #include "apflow_ipv6.h" #include "aplibdefs.h" /* Prototypes of functions used by User */ /* Buffer Manager AP related */ void *getCluster(void); void putCluster(void *ulPtr); void putCluster3(void *ulPtr); unsigned long bmClusterPoolInit ( unsigned short bmPoolSize, unsigned short bmMaxNumClusters); /* Route table APIs */ simResult_t apRouteFlowTable( unsigned char apId, unsigned char function, unsigned long hashMask); simResult_t apAddFlowEntry( unsigned char apId, unsigned short hashValue, apFlowEntry_t *ptr2UserFlowEntry, apFlowEntry_t **ptr2AddedFlowEntry); simResult_t apDeleteFlowEntry( unsigned char apId, unsigned short hashValue, apFlowEntry_t *ptr2UserFlowEntry, UINT32 *ptr2AfterHeadFlowEntry); UINT16 apCalculateHash(UCHAR apId, apFlowEntry_t *ptr2UserFlowEntry); /* Bridge table APIs */ simResult_t apBridgeTable( unsigned char apId, unsigned char function, unsigned long hashMask); UINT16 apBridgeCalculateHash(UCHAR apId, apNewBridgeEntry_t *ptr2UserBridgeEntry) ; simResult_t apAddBridgeEntry( unsigned char apId, unsigned short hashValue, apNewBridgeEntry_t *ptr2UserBridgeEntry, apNewBridgeEntry_t **ptr2AddedBridgeEntry); simResult_t apDeleteBridgeEntry( unsigned char apId, unsigned short hashValue, apNewBridgeEntry_t *ptr2UserBridgeEntry, UINT32 *ptr2AfterHeadBridgeEntry); void apUpdateBridgeEntry(apNewBridgeEntry_t *ptr2APBridgeEntry, apNewBridgeEntry_t *userBridgeEntry); int apSetBridgeAction(unsigned char rxApId , apbridgeMark_t *pMark); #if defined(IS_VX185) && IS_VX185 int apResetBridgeAction(unsigned char rxApId, unsigned short ifIndex); #else int apResetBridgeAction(unsigned char rxApId); #endif #ifdef IPV6 /* IPv6 table APIs */ simResult_t apIpv6RouteFlowTable( unsigned char apId, unsigned char function, unsigned long hashMask); UINT16 apIpv6CalculateHash(UCHAR apId, apIpv6FlowEntry_t *ptr2Ipv6UserEntry); simResult_t apIpv6AddFlowEntry( unsigned char apId, unsigned short hashValue, apIpv6FlowEntry_t *ptr2UserFlowEntry, apIpv6FlowEntry_t **ptr2AddedFlowEntry); simResult_t apIpv6DeleteFlowEntry( unsigned char apId, unsigned short hashValue, apIpv6FlowEntry_t *ptr2UserFlowEntry, UINT32 *ptr2AfterHeadBridgeEntry); #endif /* UART2 related APIs */ void registerUART2ProcessFunc(void (*ptr2UserUart2Func)(apPreHeader_t *ptr2apPreHeader)); void unregisterUART2ProcessFunc(void); /* ap qos related prototypes */ simResult_t apConfigWFQ( unsigned char apId, unsigned long guaranteedBW[AP_ETH_Q_TO_TX], unsigned long maximumBW[AP_ETH_Q_TO_TX], unsigned long linkspeed, unsigned char qBWShareMask, unsigned char qBWContributeMask, unsigned char qTCPAckMask); simResult_t apConfigPQ( unsigned char apId,unsigned long linkspeed, unsigned char qTCPAckMask); /* MAC address configuration related prototypes */ simResult_t apMacAddrConfig( unsigned char apId, unsigned char *pMacAddress, unsigned char mode); /* AP library array */ extern apLibStruct_t apLibArray[]; /* other functions */ simResult_t apEgressConfig(unsigned char apId, unsigned char apEgressType, unsigned long queueNum, unsigned long egressAddr); simResult_t apChangeFeature(unsigned char apId, unsigned char feature, unsigned char mode); unsigned long apDymamicReconfig(unsigned char apId); unsigned long apPortInit(unsigned char apId); UINT32 initDriverApInfo(UCHAR apId, void *pApConfigStruct, UINT16 configSize, UCHAR numIPCQueues, void *pUser, UINT32 (*defaultParmsFunc)(void *apId,void *ptr2ApConf,apLibStruct_t *pApLibStruct), UINT32 (*configParmsFunc)(void *apId,void *ptr2ApConf,apLibStruct_t *pApLibStruct)); unsigned long apVdslPtmUserConfig(unsigned char apId); unsigned long apEthUserConfig(unsigned char apId); unsigned long apPeriUserConfig(unsigned char apId); #endif /* _USER_API_H_ */