pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJLIB Reference

Random Number Generator
[Miscelaneous]

Functions

void pj_srand (unsigned int seed)
int pj_rand (void)

Detailed Description

This module contains functions for generating random numbers. This abstraction is needed not only because not all platforms have rand() and srand(), but also on some platforms rand() only has 16-bit randomness, which is not good enough.


Function Documentation

int pj_rand ( void   ) 

Generate random integer with 32bit randomness.

Returns:
a random integer.
void pj_srand ( unsigned int  seed  ) 

Put in seed to random number generator.

Parameters:
seed Seed value.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.