Hello everyone ,
i have created an element that uses the library unistd.h, and in the
user level it works fine .
Now i'm working in kernel level , and it doesn't work.
in kernel level i have imported :
#include linux/unistd.h
and i have this compile time error:
---
In file included from
You cannot use unistd.h (or any other standard userlevel headers) in the
kernel. Whatever you are trying to do must be done in a different way.
Specifically you cannot use getpid().
What do you want/need getpid for?
Cliff
On Sun, Aug 25, 2013 at 1:35 PM, ndritsos ndrit...@gmail.com wrote:
hello ,
iam trying to port code from openssl , especially
at this time i need the function Rand_poll()
https://github.com/openssl/openssl/blob/master/crypto/rand/rand_unix.c
lines 237 - 420
The function Rand_poll use
1)getpid()
2)close(..)
3)open(...)
4getuid()
and all this functions are
you can likely just use click_random() if you need random data and you want
it to work at both userlevel and in the kernel.
Otherwise, you can use stuff like #ifdef CLICK_LINUXMODULE and use
get_random_bytes() from the linux kernel.
You cannot do direct filesystem access from linux modules, and