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

📄 swpkt.h

📁 VIA VT6524 8口网管交换机源码
💻 H
字号:
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * This software is copyrighted by and is the sole property of
 * VIA Networking Technologies, Inc. This software may only be used
 * in accordance with the corresponding license agreement. Any unauthorized
 * use, duplication, transmission, distribution, or disclosure of this
 * software is expressly forbidden.
 *
 * This software is provided by VIA Networking Technologies, Inc. "as is"
 * and any express or implied warranties, including, but not limited to, the
 * implied warranties of merchantability and fitness for a particular purpose
 * are disclaimed. In no event shall VIA Networking Technologies, Inc.
 * be liable for any direct, indirect, incidental, special, exemplary, or
 * consequential damages.
 *
 *
 * File:    swpkt.h
 *
 * Purpose:
 *
 * Author:  Tevin Chen
 *
 * Date:    Jan 08, 2002
 *
 */


#ifndef __SWPKT_H__
#define __SWPKT_H__

#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif




/*---------------------  Export Definitions  ------------------------*/
#define MAX_ETH_PKT_SIZE    1514

/* The link level header length; this is the offset into
   the SWPKTg_abyEpktBuf where the IP header can be found. For Ethernet, this
   should be set to 14. For SLIP, this should be set to 0. */
#define EPKT_LLH_LEN        14

/* The size of the buffer that holds incoming and
   outgoing packets. */
#define EPKT_BUF_SIZE       1520

/*---------------------  Export Types  ------------------------------*/

/*---------------------  Export Macros  -----------------------------*/

/*---------------------  Export Classes  ----------------------------*/

/*---------------------  Export Variables  --------------------------*/
/*
 * The SWPKTg_abyEpktBuf array is used to hold incoming and outgoing
 * packets. The device driver fills this with incoming packets.
 */
extern UINT8    SWPKTg_abyEpktBuf[EPKT_BUF_SIZE];

/*
 * This pointer points to the application data when the application is
 * called. If the application wishes to send data, this is where the
 * application should write it. The application can also point this to
 * another location.
 */
extern UINT8*   SWPKTg_pbyEpktAppData;

/*
 * When the application is called, SWPKTg_wEpktBufLen contains the length of any
 * new data that has been received from the remote host. The
 * application should set this variable to the size of any data that
 * the application wishes to send. When the network device driver
 * output function is called, SWPKTg_wEpktBufLen should contain the length of the
 * outgoing packet.
 */
extern UINT16   SWPKTg_wEpktBufLen;


/*---------------------  Export Functions  --------------------------*/
void SWPKT_vDrvInit(void);
UINT16 SWPKT_wRecvPkt(void);
void SWPKT_vSendPkt(void);




#endif /* __SWPKT_H__ */

⌨️ 快捷键说明

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