Home | History | Annotate | Download | only in lapi
      1 /*
      2  * Copyright (c) 2015 Linux Test Project
      3  *
      4  * This program is free software; you can redistribute it and/or
      5  * modify it under the terms of the GNU General Public License as
      6  * published by the Free Software Foundation; either version 2 of
      7  * the License, or (at your option) any later version.
      8  *
      9  * This program is distributed in the hope that it would be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12  * GNU General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU General Public License
     15  * along with this program; if not, write the Free Software Foundation,
     16  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     17  */
     18 
     19 #ifndef __GETRANDOM_H__
     20 #define __GETRANDOM_H__
     21 
     22 #include "config.h"
     23 
     24 #if HAVE_LINUX_RANDOM_H
     25 #include <linux/random.h>
     26 #endif
     27 
     28 /*
     29  * Flags for getrandom(2)
     30  *
     31  * GRND_NONBLOCK	Don't block and return EAGAIN instead
     32  * GRND_RANDOM		Use the /dev/random pool instead of /dev/urandom
     33  */
     34 
     35 #ifndef GRND_NONBLOCK
     36 # define GRND_NONBLOCK	0x0001
     37 #endif
     38 
     39 #ifndef GRND_RANDOM
     40 # define GRND_RANDOM	0x0002
     41 #endif
     42 
     43 #endif /* __GETRANDOM_H__ */
     44