📄 netif.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: netif.h
*
* Purpose:
*
* Author: Tevin Chen
*
* Date: Jan 08, 2002
*
*/
#ifndef __NETIF_H__
#define __NETIF_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
#if !defined(__SWPKT_H__)
#include "swpkt.h"
#endif
/*--------------------- Export Definitions ------------------------*/
#define ETH_TYPE_IP 0x0800 /* Type field for IP */
#define ETH_TYPE_ARP 0x0806 /* Type field for ARP */
#define ETH_TYPE_RARP 0x8035 /* Type field for reverse ARP */
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
// The byte order of array is the same with the one of packet buffer.
// Then we can use memcpy, memcmp, etc., to deal with the packet buffer.
extern UINT8 g_au8MyEthAddr[];
extern UINT32 g_u32MyIpAddr;
extern UINT32 g_u32MyNetmask;
extern UINT32 g_u32MyDefGateway;
extern UINT32 g_u32TftpServeIpAddr;
extern char g_aszTftpFilename[];
/*--------------------- Export Functions --------------------------*/
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
void ETHIF_vInit(void);
void ETHIF_vInput(SRBuf* pPktBuf);
#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */
#endif /* __NETIF_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -