[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About reading a text-file from kernel
The better way to get data from a file into kernel is -
1) Create a service script (/etc/init.d/foobar)
2) From this script, load your kernel modules
3) From this script, run a user program (say prog1)
4) Let 'prog1' read the rules from the file and make 'ioctl' calls to your
module and submit these rules via them.
5) # chkconfig <your-script> on
Thanx for this method.
I have one doubt that, I am not writing my classifier as kernel module,
I am directly modifying existing code for this.
Can I still make use of 'ioctl' calls ?
I am little new to this kind of use of ioctl calls,
Can I get some examples, tutorials or existing systems where 'ioctl'
is been used for this kind of interaction?
Is it possible to use "/proc" filesystem over here, to so that in
"step 4)" in above method
the program 'prog1' will read the rules from file and then write them
into some file in /proc which will allow my kernel code to get access
to that data ?
Regards,
- Ratnadeep
Thanx once again.
Regards,
Pravin Shinde
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ