FreeBSD kernel kern code
sys_getrandom.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/limits.h>
#include <sys/proc.h>
#include <sys/random.h>
#include <sys/sysproto.h>
#include <sys/systm.h>
#include <sys/uio.h>
Include dependency graph for sys_getrandom.c:

Go to the source code of this file.

Data Structures

struct  getrandom_args
 

Macros

#define GRND_VALIDFLAGS   (GRND_NONBLOCK | GRND_RANDOM | GRND_INSECURE)
 

Functions

 __FBSDID ("$FreeBSD$")
 
 CTASSERT (EWOULDBLOCK==EAGAIN)
 
static int kern_getrandom (struct thread *td, void *user_buf, size_t buflen, unsigned int flags)
 
int sys_getrandom (struct thread *td, struct getrandom_args *uap)
 

Macro Definition Documentation

◆ GRND_VALIDFLAGS

#define GRND_VALIDFLAGS   (GRND_NONBLOCK | GRND_RANDOM | GRND_INSECURE)

Definition at line 41 of file sys_getrandom.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ CTASSERT()

CTASSERT ( EWOULDBLOCK  = =EAGAIN)

◆ kern_getrandom()

static int kern_getrandom ( struct thread *  td,
void *  user_buf,
size_t  buflen,
unsigned int  flags 
)
static

Definition at line 51 of file sys_getrandom.c.

References flags, and GRND_VALIDFLAGS.

Referenced by sys_getrandom().

Here is the caller graph for this function:

◆ sys_getrandom()

int sys_getrandom ( struct thread *  td,
struct getrandom_args uap 
)

Definition at line 127 of file sys_getrandom.c.

References getrandom_args::buf, getrandom_args::buflen, getrandom_args::flags, and kern_getrandom().

Here is the call graph for this function: