* get amount of "entropy" in /dev/random ?
@ 2007-10-02 15:25 Yakov Lerner
2007-10-02 15:37 ` Michal Schmidt
2007-10-02 15:49 ` David Schwartz
0 siblings, 2 replies; 3+ messages in thread
From: Yakov Lerner @ 2007-10-02 15:25 UTC (permalink / raw)
To: Kernel Linux
>From the userlevel, can I get an estimate of "amount of entropy"
in /dev/random, that is, the estimate of number of bytes
readable until it blocks ? Of course multiple processes
can read bytes and this would not be exact ... but still .. as an upper
boundary estimate ?
Thanks
Yakov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: get amount of "entropy" in /dev/random ?
2007-10-02 15:25 get amount of "entropy" in /dev/random ? Yakov Lerner
@ 2007-10-02 15:37 ` Michal Schmidt
2007-10-02 15:49 ` David Schwartz
1 sibling, 0 replies; 3+ messages in thread
From: Michal Schmidt @ 2007-10-02 15:37 UTC (permalink / raw)
To: Yakov Lerner; +Cc: Kernel Linux
Yakov Lerner wrote:
> >From the userlevel, can I get an estimate of "amount of entropy"
> in /dev/random, that is, the estimate of number of bytes
> readable until it blocks ? Of course multiple processes
> can read bytes and this would not be exact ... but still .. as an upper
> boundary estimate ?
>
> Thanks
> Yakov
Try ioctl(fd, RNDGETENTCNT, &entropy_count)
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: get amount of "entropy" in /dev/random ?
2007-10-02 15:25 get amount of "entropy" in /dev/random ? Yakov Lerner
2007-10-02 15:37 ` Michal Schmidt
@ 2007-10-02 15:49 ` David Schwartz
1 sibling, 0 replies; 3+ messages in thread
From: David Schwartz @ 2007-10-02 15:49 UTC (permalink / raw)
To: Kernel Linux
> From the userlevel, can I get an estimate of "amount of entropy"
> in /dev/random, that is, the estimate of number of bytes
> readable until it blocks ? Of course multiple processes
> can read bytes and this would not be exact ... but still .. as an upper
> boundary estimate ?
>
> Thanks
> Yakov
Yes. Look in drivers/char/random.c at the random_ioctl handler. You will see
RNDGETENTCNT.
DS
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-02 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 15:25 get amount of "entropy" in /dev/random ? Yakov Lerner
2007-10-02 15:37 ` Michal Schmidt
2007-10-02 15:49 ` David Schwartz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox