struct device *next;
/* The device initialization function. Called only once. */
/* 指向驱动程序的初始化方法。 */
int (*init)(struct device *dev);
/* Some hardware also needs these fields, but they are not part of the
usual set specified in Space.c. */
/* 一些硬件可以在一块板上支持多个接口,可能用到if_port。 */
/* 一些硬件可以在一块板上支持多个接口,可能用到if_port。 */
unsigned char if_port; /* Selectable AUI, TP,..*/
unsigned char dma; /* DMA channel */
struct enet_statistics* (*get_stats)(struct device *dev);
/*
* This marks the end of the "visible" part of the structure. All
* fields hereafter are internal to the system, and may change at
* will (read: may be cleaned up at will).
*/
/* These may be needed for future network-power-down code. */
/* trans_start记录最后一次成功发送的时间。可以用来确定硬件是否工作正常。*/ unsigned long trans_start; /* Time (in jiffies) of last Tx */
unsigned long last_rx; /* Time of last Rx */
/* flags里面有很多内容,定义在include/linux/if.h里。*/
unsigned short flags; /* interface flags (a la BSD) */
unsigned short family; /* address family ID (AF_INET) */ unsigned short metric; /* routing metric (not used) */
unsigned short mtu; /* interface MTU value */
/* type标明物理硬件的类型。主要说明硬件是否需要arp。定义在
include/linux/if_arp.h里。 */
unsigned short type; /* interface hardware type */
/* 上层协议层根据hard_header_len在发送数据缓冲区前面预留硬件帧头空间。*/ unsigned short hard_header_len; /* hardware hdr length */
/* priv指向驱动程序自己定义的一些参数。*/
void *priv; /* pointer to private data */
/* Interface address info. */
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
发信人: Bordi (halfelf), 信区: linux 标题: Linux 网络驱动程序编写 发信站: 饮水思源站 (Thu Aug 5 21:56:40 1999) , 转信 工作需要写了我们公司一块...
? Linux则允许块设备传送任意数目的字节。 因此,块和字符设备的区别仅仅是驱动与 内核的接口不同。 网络接口任何网络事务都通过一个接口来进行,一 个接口通常是一...
Linux下的网卡驱动程序的编写过程_计算机软件及应用_IT/计算机_专业资料。Linux 编程 网卡工作需要写了我们公司一块网卡的linux驱动程序。经历一个从无到有的过程,...
下面结合作者利用Linux2.6.18内核在深圳优龙公司的FS2410开发板(SAMSUNG S3C2410处理器)上移植编写嵌入式CS8900A网卡驱动程序的实例,说明网络驱动程序的实现原理。 2...
当你学习编写驱动程序的时候,你也会发现很多关于 Linux 内核的知识,这对理解你...另一个例子是 TCP/IP 的网络分层结构: 操作系统提供抽象的套接字操作, 是...
Linux驱动编写_工学_高等教育_教育专区。教你如何编写linux下的驱动程序!对初学...网络设备 通过BSD套接口访问,网络接口 – 任何网络事务处理都是通过接口实现的,...
编译器:– EABI_4.3.3_EmbedSky_20090812.tar.bz2 网络摄像机的实现—安装驱动 ? 解压\linux-2.6.30.4_20090826.tar.bz2文件 ? 进入\linux-2.6.30.4...
如何编写linux设备驱动程序_信息与通信_工程科技_专业资料。本书主要讲解了linux设备驱动的概念,以及linux设备驱动的编写过程,通过实例来解析linux设备驱动程序如何开发...
linux网卡驱动程序的编译与安装_IT/计算机_专业资料。LINUX nic一般来说,目前新版的 Linux 预设可以支持的网络卡芯片组数量已经很完备了,很多网络卡芯片都已经被...
本论文通过对 Linux 网络设备驱动程序的工作原理和结构组成的 研究, 探讨 Linux 环境下网络驱动程序的开发过程, 首先详细的对 Linux 设备驱动程序进行分析介绍,其次...
热门文档