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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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....
Seems netlink is a good technique ofr these kind of application.But i am not able to find any Good working program in Linux kernle 2.6 . Anybodies please help me
Thanks & regards
Gomathisankar
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.