On Tue, Jan 28, 2003 at 04:00:06PM -0500, Ying Ge wrote: > Dear Newsgroup, Minor nitpick: we are a mailing list :) > I'm just starting to look at the linux kernel, please help me... > > In the Orinoco Driver code, one can get the information about the packet > the driver received, such as packet type, sender, etc. However, these > information are obtained in the kernel space, how can I write the > programme to access these infor from user space? > > My understanding is that I can write a new ioctl to access these info, > or I can create a new entry in /proc file system and write these infor > to the file in the kernel space. But how can I do these things? Can > anybody provide me any sample code? You just want raw packets and the code for that is already in place, just run 'tcpdump -i eth0' and you'll see the packet headers going over your screen. If you want something better, have a look at ethereal and/or libpcap. Erik -- J.A.K. (Erik) Mouw Email: J.A.K.Mouw@its.tudelft.nl mouw@nl.linux.org WWW: http://www-ict.its.tudelft.nl/~erik/
Attachment:
pgp00277.pgp
Description: PGP signature