/******************************************************************************* ** ** Riverstone Networks, Inc ** 5200 Great America Parkway ** Santa Clara CA 95054 ** (c) Copyright Riverstone Networks 2000 ** ** Original Author: Todd Crowley ** Purpose: stub routines for creating a Accounting Entity ** *******************************************************************************/ #include "LfapCCEos.h" #include "LfapFlowMgr.h" /******************************************************************************/ /* */ /* File: LfapCCEos_c */ /* */ /* This file is an example (template) C file for the CCE. These functions */ /* must be implemented by the CCE developers, as the LFAP API calls them. */ /* The functions are declared and are fully described in the LfapCCEos_h */ /* template header file. The comments inside of the functions defined in */ /* this file indicate which functions in the LFAP API need to be called */ /* back. */ /* */ /******************************************************************************/ /******************************************************************************/ /* */ /* Function: LFAPGetUptime */ /* */ /******************************************************************************/ lfapui32_t LFAPGetUptime (void) { return 0; } /******************************************************************************/ /* */ /* Function: LFAPGetStatistics */ /* */ /******************************************************************************/ void LFAPGetStatistics (lfapui32_t flow_id, LFAPFlowStats* flow_stats) { /* arbitrary values, for example only */ flow_stats->type = LFAP_BOTH_STATS; flow_stats->byte_rcvd[0] = 0; flow_stats->byte_rcvd[1] = flow_id*1; flow_stats->byte_sent[0] = 0; flow_stats->byte_sent[1] = flow_id*2; flow_stats->packet_rcvd[0] = 0; flow_stats->packet_rcvd[1] = flow_id*9; flow_stats->packet_sent[0] = 0; flow_stats->packet_sent[1] = flow_id*8; } /******************************************************************************/ /* */ /* Function: LFAPSynchronize */ /* */ /******************************************************************************/ void LFAPSynchronize (void) { /* context switch */ } /******************************************************************************/ /* */ /* Function: LFAPSetSystemTimer */ /* */ /******************************************************************************/ void LFAPSetSystemTimer (const LFAP_CB_ENTRYPOINT lfap_cb_entry, lfapui32_t return_handle, lfapui32_t time_val) { } /******************************************************************************/ /* */ /* Function: LFAPSendMessage */ /* */ /******************************************************************************/ int LFAPSendMessage (void* buf, lfapui16_t buf_len) { return LFAP_SEND_SUCCESS; } /******************************************************************************/ /* */ /* Function: LFAPSendVector */ /* */ /******************************************************************************/ int LFAPSendVector (LFAPMsgHolder* vec, lfapui16_t vec_len, lfapui16_t total_len) { return LFAP_SEND_SUCCESS; } /******************************************************************************/ /* */ /* Function: LFAPConnect */ /* */ /******************************************************************************/ int LFAPConnect (lfapui32_t server_ip) { return LFAP_TCP_CONNECTION_ESTABLISHED; } /******************************************************************************/ /* */ /* Function: LFAPDisconnect */ /* */ /******************************************************************************/ int LFAPDisconnect (lfapui32_t server_ip) { return LFAP_TCP_DISCONNECT_SUCCESS; }