/* Copyright (C) 2006 Ikanos Communications * See IKANOS_PROP_LICENSE.txt for license information. */ #ifndef _HOSTAPIF_H_ #define _HOSTAPIF_H_ #include #include typedef struct userRegInfo_s { // pointer to User Stack Interface instance void *handle; // pointer to additional parameter ( used by ATM only ) void *subhandle; // pointer to User function which would be called for // each received packet void (*inputFn)(void *, void *, apPreHeader_t *); // pointer to User function which would be called for any change // of physical link status (like connect, disconnect) void (*linkChangeFn)(void *, int ); }userRegInfo_t; //RVRV Next typedef describes common structure construction for all APs // The information specific to any particular AP SHOULD NOT be presented in this structure // The full application will have array of AP instances ( 1 instance per AP ), when each AP // has his own place inside of Array according to predefined AP Id. typedef struct newapIfStruct_s { //RVRV This element must be removed in the future UINT32 apId; // pointer to configuration structure. Each AP can have his own construction of configuration // information. This pointer would be used at Init time (once) and every time when // Host will try to change configuration information ( by initiating AP_CONFIGURATION_EVENT ) void *pApConf; // pointer to statistics structure. Host will allocate a memory block for this structure // and will use it every time it needs to extract statistics info from AP // ( by initiating AP_STATISTICS_EVENT ) void *pApStats; // start address of array of IPC queues read/write pointers (between AP and Host). // Number of pairs in this array would be same as number of queues for this AP. // This pointer would be initialized by using "mallocSlaveMem" function apQueueState_t *apIndexes; // Number of IPC queues UCHAR numIpcQueues; // Array of structures which are presenting pointer to IPC queue between AP and Host // and Max size of this queue apQueueSpec_t apRxq[MAX_NUMBER_IPC_QUEUES]; //RVRV Check if we need Transmit queues with different sizes UINT32 *apTxFifo; // Address of AP IN Q address // Pointer to IoCtl function ( ptr2Instanse, type of change, ptr2params) UINT32 (*IoCtlFunc)(void *, UINT32, char *); // Pointer to output function ( "to outside world" ) // ( ptr2Instanse, ptr2Cluster ) UINT32 (*outFunc)(void *, apPreHeader_t *); // Pointer to private information related to particular AP void *pApPrivateInfo; // Pointer to structure (or array of structures in ATM case) // which contains all User registered functions, arguments // for data and control transfers userRegInfo_t *userInstanseInfo; }newapIfStruct_t; extern apPreHeader_t * apReceive(UCHAR apId, UCHAR ); extern INT32 apTransmit( unsigned char apId, apPreHeader_t *pFrame); extern INT32 apFlush(UCHAR apId); #endif /* _HOSTAPIF_H_ */