Re: Communication between kernel and user application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mauricio Lin wrote:

Hi all,

Does anyone know how can i develop a program that
communicates with kernel?

I would like to develop an application that can read
some kernel data structures like task struct?

BR,

Mauricio Lin.

as somebody already mentioned write a new system call , and the other way would be to use a device file to read and write something from the kernel. for every read your device_read can read the task_struct of whichever pid you want the task_struct of , and your user program could pass the pid or prog name of the process.
this is a simple and easier way of reading/writing to the kernel. Read a little about module programming and you can implement it without much trouble.


hope that helped.
cheers,
Amith





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux