⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txc_envoy_mac_virtual.c

📁 TranSwitch Envoy CE2 & Envoy CE4 设备驱动及编程指南
💻 C
📖 第 1 页 / 共 2 页
字号:
/*--------------------------------------------------------------------------

  *******                           ****
     *     *****     **    *    *  *       *    *   *  *****   ****   *    *
     *     *    *   *  *   **   *  *       *    *   *    *    *    *  *    *
     *     *    *  *    *  * *  *   ****   *    *   *    *    *       ******
     *     *****   ******  *  * *       *  * ** *   *    *    *       *    *
     *     *   *   *    *  *   **  *    *  **  **   *    *    *    *  *    *
     *     *    *  *    *  *    *   ****   *    *   *    *     ****   *    *

                        Proprietary and Confidential 

    This program is made available only to customers and prospective customers 
of TranSwitch Corporation under license and may be used only with TranSwitch 
semi-conductor products.

                      Copyright(c) 2004 TranSwitch Inc.

 --------------------------------------------------------------------------

             *******  **      **  **        **   ********   **      **
             *******  ***     **  **        **  **********  **      **
             **       ** *    **  **        **  **      **   **    **
             *****    **  *   **   **      **   **      **     *  *
             *****    **   *  **    **    **    **      **      **
             **       **    * **     **  **     **      **      **
             *******  **     ***      ****      **********      **
             *******  **      **       **        ********       **

 --------------------------------------------------------------------------
                           TranSwitch Envoy-CE2/CE4
                                Device Driver
 --------------------------------------------------------------------------
                                                                             
   Workfile:  ENVOY_mac_Virtual.c                                             
                                                                             
   Description:  Virtual MAC functions.                                     
                                                                             
  -------------------------------------------------------------------------- 
                               Revision History                              
  -------------------------------------------------------------------------- 
    Rev       Date          Author               Description
   -----    -------      ------------         -----------------
   0.5.0    6/03/04      F. Giannella         Initial release (beta)
 *--------------------------------------------------------------------------*/


/****************************************************************************
 **                             Include Files                              **
 ****************************************************************************/

#include "txc_envoy_api.h"

/* this file only applies if in virtual device mode */
#ifdef TXC_ENVOY_VIRTUAL_DEVICE_MODE

#include "txc_envoy_mac_support.h"
#include <string.h>



/****************************************************************************
 **                            Static Functions                            **
 ****************************************************************************/



/****************************************************************************
 **                        Static/Global Variables                         **
 ****************************************************************************/

static TXC_IfMAC_CONFIG_STRUCT dummyMacIfaceData;
static ENVOY_MAC_TRAFFIC_CTRL_STRUCT dummyMacTrafficCtrlData;
static TXC_IfMAC_HALF_DUPLEX_STRUCT dummyMacHalfDuplexData;
static TXC_U16BIT dummyPhyData;
static TXC_U32BIT dummyMacStatusData;
static ENVOY_MAC_DIAG_STRUCT dummyMacDiagData;
static ENVOY_MAC_GEN_STATISTICS_STRUCT dummyMacGenStatisticData;
static ENVOY_MAC_TX_STATISTICS_STRUCT  dummyMacTxStatisticsData;
static ENVOY_MAC_RX_STATISTICS_STRUCT  dummyMacRxStatisticsData;
static ENVOY_MAC_DIAG_STRUCT dummyMacDiagData;


/****************************************************************************
 **                                  Code                                  **
 ****************************************************************************/


/*--------------------------------------------------------------------------*
                                                                             
   FUNCTION:  ENVOY_MacResetVirtual                                              
                                                                             
   DESCRIPTION: This function is the virtual device for ENVOY_MacReset                                         
                                                                             
   INPUTS:  Same as ENVOY_MacReset                                   
   
   RETURNS:  TXC_NO_ERR or an appropriate specific error code listed in      
   appendix.                                                                 
                                                                             
   CAVEATS:  None.                                                           
                                                                             
   REVISION HISTORY:

    Rev       Date          Author               Description
   -----    -------      ------------         -----------------
   0.5.0    6/03/04      F. Giannella         Initial release (beta)
 *--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_MacResetVirtual(TXC_U16BIT handle, TXC_U16BIT port,
                                 TXC_IfMAC_RESET_STRUCT * macResetPtr)
{
    return TXC_NO_ERR;
}


/*--------------------------------------------------------------------------*
                                                                             
   FUNCTION:  ENVOY_SetMacIfaceVirtual                                           
                                                                             
   DESCRIPTION: This function is the virtual device for ENVOY_SetMacIface                                          
                                                                             
   INPUTS:  Same as ENVOY_SetMacIface                            
                                                                             
   RETURNS:  TXC_NO_ERR or an appropriate specific error code listed in      
   appendix.                                                                 
                                                                             
   CAVEATS:  The hardware default on the interface comes up in GPSI mode,    
   which is not recommended for use.                                         
                                                                             
   REVISION HISTORY:

    Rev       Date          Author               Description
   -----    -------      ------------         -----------------
   0.0.1    4/24/04      F. Giannella         Pre-Alpha version
 *--------------------------------------------------------------------------*/

TXC_U16BIT ENVOY_SetMacIfaceVirtual(TXC_U16BIT handle, TXC_U16BIT port,
                                    TXC_IfMAC_CONFIG_STRUCT *macIfaceDataPtr)
{
    memcpy (&dummyMacIfaceData, macIfaceDataPtr, sizeof (TXC_IfMAC_CONFIG_STRUCT) );
    return TXC_NO_ERR;
}


/*--------------------------------------------------------------------------*
                                                                             
   FUNCTION:  ENVOY_GetMacIfaceVirtual                                           
                                                                             
   DESCRIPTION: This function is the virtual device for ENVOY_MacIfaceGet                                          
                                                                             
   INPUTS:  Same as ENVOY_MacIfaceGet
                                                                  
   RETURNS:  TXC_NO_ERR or an appropriate specific error code listed in appendix.                                                                   
                                                                             

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -