Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to make a common memory space between user and Kernel. I need to send each packet to a particular place from my network driver to a memory. And One of the application will take that and will do some process.Is there any way to share a common space between user and kernel. Thanks in advance for your help
You should do this using one of the standard mechanisms. Iptables module is one solution, you can also think about extra /proc or /dev file by your driver, depending on what you want to do with the packet after it is processed.
My suggestion is, using shared memory you can do this. Cretae an shared memory device in /dev, send ur data from ur driver to that share memory. Ur Application can access those spaces as a device, like "/dev/shm".
Sure. I have implemented this concept in RTLinux and Linux.
What type of help you want.
The ceoncept is simple,Create a shared memory device from kernel. Write your data here.Read the same data by application program.
Any other info you need.
Thank you very much Prakash.I understood your thought.But how to access the device from the Kernel(i mean to say from my driver). From the application you can access using open the dev,read and write . But how it is possible from the driver .
Then my logic is not suitable for you.I used IPC to shared the data b/w the processes.Ur case is diffi. You just ignore the above and go to the following link.Hope it will helpful for you.
I dont have more idea abt it, but APMK, we can share the data from kernel to user land by the following ways, relayfs, procfs, debugfs, ioctls, mmap....