NXSeedRandom

Returns a random value for use as a seed.

Library:LibC
Classification:NKS
Service:NKS Platform

Syntax

  #include <nks/plat.h> 
   
  int NXSeedRandom (
     size_t   width,
     void    *seed);
  

Parameters

width

(IN) Specifies the size, in bytes, to use for the seed.

seed

(OUT) Points to a buffer to hold the returned random number.

Return Values

If successful, returns zero. Otherwise, it returns one of the following errors:

Decimal

Constant

Description

66

NX_ENOSYS

Not implemented for the host hardware; therefore it is not supported.

79

NX_ENOTSUP

The host hardware does not implement this functionality, and the underlying chipset. does not respond as supporting it.

Remarks

You must decide how to use and manipulate the resulting random number.

IMPORTANT:Not all chipsets support the NXSeedRandom function, and if supported, it might be disabled. Currently, only the Intel 82802 FirmWare Hub is known to work with NXSeedRandom.

See Also

rand, rand_r