This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: eCos API to get random value or UID value?
- From: Stanislav Meduna <stano at meduna dot org>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 18 Mar 2011 22:08:39 +0100
- Subject: Re: [ECOS] eCos API to get random value or UID value?
- References: <im0d6e$ijn$1@dough.gmane.org>
On 18.03.2011 20:52, Grant Edwards wrote:
> Is there any eCos API support that the HAL can use to provide either
> random data or a unique id value to application or OS code?
I don't know of any.
> Both random values and UUID values are required for a lot of network
> stuff. It's pretty common for hardware platforms to one or both,
> there doesn't seem to be an eCos API to access it.
This is a very good request.
However, I don't think this belongs into the HAL - it's more
a device driver semantics (see e.g. /dev/{u,}random on linux)
and the cyg_io_lookup / cyg_io_read is everything one needs
here.
What the HAL could provide is an interface supplying a source
of entropy - however, this is hard to do correctly especially
on an embedded system that is often running in a quite
deterministic environment.
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss