Adding code to the Linux Kernel
The
HyperNews
Linux KHG
Discussion Pages
Adding code to the Linux KernelForum: The Linux Kernel Hackers' GuideDate: Wed, 25 Mar 1998 18:04:48 GMTFrom: <barry@skynet.csn.ul.ie>Hi all,
I am currently attempting my first kernel hack. I am adding code into the IP layer to randomly drop packets.
I have two questions:1) I want to be able to include a header file called random.h (usr/src/linux/include/net). This is so that I can generate random numbers. When I include this in my own C file, parse errors appear everywhere. Is this the right place to include this header file?2) I would eventually like to get a random number generated based on seeding it from the current system time. This is so that I can get a new random number on each call to ip_input.
Is there a way around not being able to include standard lib files in the kernel ( ie time.h, stdlib.h etc)?Also it there any documentation on adding such modules to the kernel. It would greatly simplify my task.ThanksPatrick
to: "Adding code to the Linux Kernel"
u
Wyszukiwarka
Podobne podstrony:
19 (234)13 (234)Śpiewnik 234234,2,artykulI CSK 234 12 1234 235231 234więcej podobnych podstron