RCP API  6.61.0

◆ rcp_rand()

int rcp_rand ( void  )

Wrapper for getting pseudo-random integer required by the RCP API.

This function must be implemented by the client code.

The client code is responsible for seeding the pseudo-random generator.

One possible implementation could be:

int rcp_rand(void)
{
static int seed = 1;
if (seed)
{
srand(time(NULL));
seed = 0;
}
return rand();
}