[LIP] kernel programming
"suresh kumar" <suresh_vin-/iAzse42w/[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
Hi
I have the following queries. Kindly help me out.
1)What is the difference among, module_init, init_module, __init, __init_data and their corresponding deinit function? How do we select what should be used?
2)(I have used MODULE_PARAM macro to pass some arguments while insmod a module.
The program looks some thing like this. Kindly tell me where I have gone wrong.
/* hello-5.c - Demonstrates command line argument passing to a module.
*/
#define __KERNEL__
#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
static short int myshort = 1;
MODULE_PARM (myshort, "h");
static int __init hello_5_init(void)
{
printk("this is junk`");
printk("Hello, world 5\n=============\n");
printk("myshort is a short integer: %hd\n", myshort);
return 0;
}
module_init(hello_5_init);
module_deinit(hello_5_init);
insmod <name> <values>
3)Proc is the image of the kernel which can be used to configure kernel at runtime. I want to do the same with the module that I write. kindly tell how this has to be done. It is known that it can be done using ioctls. For a bigger module, which has more configuration, which is advised, a)configuration through proc b) through CLI using ioctls. I mean the tradeoff in terms of flexibility, complexity, efficiency etc...
4)How do we set the IP address to the interface permanenly using ifconfig in redhat 9.0. Previous versions, I used to disable and set the interface and enable it.I remember it working. Does it vary from distribution to distribution? I can not use setup or any thing else.
5) Ne one tell me good material to read for tasklets programming and kernel scheduling.
V.V Suresh Kumar
--
______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
Powered by Outblaze
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl