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

📄 ring.h

📁 这个linux源代码是很全面的~基本完整了~使用c编译的~由于时间问题我没有亲自测试~但就算用来做参考资料也是非常好的
💻 H
字号:
/* -*- linux-c -*- */#ifndef _RING_H_#define _RING_H_/* * Copyright (C) 2001 By Joachim Martillo, Telford Tools, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * */#include <linux/version.h>#include <linux/pci.h>#ifdef __KERNEL__#include <linux/netdevice.h>#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)#define dev_kfree_skb_irq(s) dev_kfree_skb((s))#define dev_kfree_skb_any(s) dev_kfree_skb((s))#define	net_device_stats enet_statistics#define net_device device#else#define NETSTATS_VER2#endif#endif#define	OWNER		((unsigned short)0x8000) /* mask for ownership bit */#define	OWN_DRIVER 	((unsigned short)0x8000) /* value of owner bit == host */#define	OWN_SAB		((unsigned short)0x0000) /* value of owner bit == sab or						  * receive or send */#define LISTSIZE 32#define RXSIZE (8192+3)#define MAXNAMESIZE 11#define MAXSAB8253XDEVICES 256struct counters{	unsigned int interruptcount;	unsigned int freecount;	unsigned int receivepacket;	unsigned int receivebytes;	unsigned int transmitpacket;	unsigned int transmitbytes;  	unsigned int tx_drops;	unsigned int rx_drops;};typedef struct ring_descriptor{	unsigned short		Count;	unsigned char		sendcrc;	unsigned char		crcindex;	unsigned int		crc;	struct sk_buff*		HostVaddr;	struct ring_descriptor*	VNext;} RING_DESCRIPTOR;typedef struct dcontrol2{	RING_DESCRIPTOR *receive;	RING_DESCRIPTOR *transmit;} DCONTROL2;#endif

⌨️ 快捷键说明

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