Re: sending kernel data to user application

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

 



On Wed, Jul 22, 2009 at 9:46 PM, SandeepKsinha<sandeepksinha@xxxxxxxxx> wrote:
> Hi Krushnal,
>
>
> On Wed, Jul 22, 2009 at 8:40 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>
> wrote:
>>
>> Hi...
>>
>> I hope you don't mind if I cc my reply to kernelnewbies mailing list
>> too...so that you can get more response..
>>
>> On Wed, Jul 22, 2009 at 4:03 PM, krushnaal pai<krisonearth@xxxxxxxxx>
>> wrote:
>> > sir,
>> > how can we send data from kernel space to user application.......
>>
>> AFAIK, most people use netlink socket. But since it seems that you
>> want alternative ways....
>>
>> > also i had an article on that but they have used sockets ,i want one
>> > that
>> > doesnt use sockets
>>
>> if you mean "send data" as "user space read data from kernel space by
>> polling certain file descriptor", then you can create /proc or /sys or
>> debugfs entries, assign the file operation in it. Then when a user
>> space program read the entry, kernel simply send the data to the
>> reader.
sysfs is a good option but here you have limitation of transecting 4k
at a time. On the other hand
using ioctl you can transfer more than this. I am not aware of
limitations of /proc or debugfs.
Another issue with sysfs is related to getting the completion status
of your command. I mean you will not
be aware whether your command completed successfully or it has failed
due to some error.
>
>
> If you are just looking for alternatives, ioctl is the simplest one. Google
> for configfs, thats a good one too.
>
>
>>
>> --
>> regards,
>>
>> Mulyadi Santosa
>> Freelance Linux trainer
>> blog: the-hydra.blogspot.com
>>
>> --
>> To unsubscribe from this list: send an email with
>> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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