网络设备驱动程序 [英] Network device driver

查看:134
本文介绍了网络设备驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为基于网络的设备编写Linux设备驱动程序.该网络设备仅是输入输出控制,并且该设备还通过以太网电缆通过以太网端口进行连接.如何编写驱动程序?如何在设备和内核之间传输数据?

I want to write Linux device driver for network based device. This network device is just Input output control only and also this device connects through Ethernet port via ethernet cable. How can i write driver? How to transfer data between device and kernel?

推荐答案

如果设备只是通过以太网连接到Linux计算机,那么您根本不需要编写内核驱动程序-用户空间守护程序可以完全访问通过AF_PACKET套接字地址系列连接到以太网.有关详细信息,请参见 packet(7) 手册页.

If the device just connects to the Linux machine through Ethernet, then you don't need to write a kernel driver at all - a userspace daemon can have full access to Ethernet through the AF_PACKET socket address family. See the packet(7) man page for details.

这篇关于网络设备驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆