Documentation

Documentation

Includes

netif/ppp/ppp_opts.h

#include "netif/ppp/ppp_opts.h"
#include "netif/ppp/ppp_opts.h"

Macros

Marco MAGIC_H

#define MAGIC_H

      

Functions

Func magic_init

void magic_init(void);
/*
 * Initialize the random number generator.
 */

Func magic_randomize

void magic_randomize(void);
/*
 * Randomize our random seed value.  To be called for truely random events
 * such as user operations and network traffic.
 */

Func magic

u32_t magic(void);
/*
 * Return a new random number.
 */

Func magic_random_bytes

void magic_random_bytes(unsigned char *buf, u32_t buf_len);
/*
 * Fill buffer with random bytes
 *
 * Use the random pool to generate random data.  This degrades to pseudo
 * random when used faster than randomness is supplied using magic_churnrand().
 * Thus it's important to make sure that the results of this are not
 * published directly because one could predict the next result to at
 * least some degree.  Also, it's important to get a good seed before
 * the first use.
 */

Func magic_pow

u32_t magic_pow(u8_t pow);
/*
 * Return a new random number between 0 and (2^pow)-1 included.
 */

Vars

Consts

Types

Typedefs