kernel-user communication - Unix

This is a discussion on kernel-user communication - Unix ; Hi All, I have to communicate a user program and a kernel module in two-way. What are the methods available ? What is the best method to implement?? Please help me. Thanks and regards VASU...

+ Reply to Thread
Results 1 to 3 of 3

Thread: kernel-user communication

  1. kernel-user communication

    Hi All,

    I have to communicate a user program and a kernel module in two-way.
    What are the methods available ?
    What is the best method to implement?? Please help me.

    Thanks and regards
    VASU

  2. Re: kernel-user communication

    VDR wrote:
    > I have to communicate a user program and a kernel module in two-way.
    > What are the methods available ?
    > What is the best method to implement?? Please help me.


    There are lots of different kernels, so your question is rather
    system specific and should probably better posted in a group for
    the system you're using. E.g. if you're using Linux the group
    comp.os.linux.development.system might be a good choice. It's
    also not really clear what you mean with communication between
    a user program and a kernel module, so the only broad answers
    I can come up with (assuming that you write the kernel module)
    are 1. have the module create a device file, so the communica-
    tion uses this file and 2. implement some ioctl() calls that
    allow the user program to send and receive data to/from the
    module. At least under Linux you also could have the module
    create a file somewhere in the /proc directory for the purpose.
    Which way of communication makes the most sense will obviously
    depend on what exactly you want to achieve.

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  3. Re: kernel-user communication

    On Aug 18, 5:22*pm, j...@toerring.de (Jens Thoms Toerring) wrote:
    > VDR wrote:
    > > I have *to communicate a user program and a kernel module in two-way.
    > > What are the methods available ?
    > > What is the best method to implement?? Please help me.

    >
    > There are lots of different kernels, so your question is rather
    > system specific and should probably better posted in a group for
    > the system you're using. E.g. if you're using Linux the group
    > comp.os.linux.development.system might be a good choice. It's
    > also not really clear what you mean with communication between
    > a user program and a kernel module, so the only broad answers
    > I can come up with (assuming that you write the kernel module)
    > are 1. have the module create a device file, so the communica-
    > tion uses this file and 2. implement some ioctl() calls that
    > allow the user program to send and receive data to/from the
    > module. At least under Linux you also could have the module
    > create a file somewhere in the /proc directory for the purpose.
    > Which way of communication makes the most sense will obviously
    > depend on what exactly you want to achieve.



    There is 3rd way in Linux: use NETLINK socket.

    Bin

+ Reply to Thread