iwyu: random_numbers.h

This commit is contained in:
Hamish Coleman 2023-06-14 20:14:11 +01:00
parent 15ad901b41
commit f67cc8f2a6
14 changed files with 26 additions and 11 deletions

View File

@ -21,21 +21,16 @@
#define RND_H
#include <stdint.h>
#include <stddef.h>
#include <time.h> /* time, clock */
#include "n2n.h" /* traceEvent */
#include <stdint.h> // for uint64_t, uint32_t
// syscall and inquiring random number from hardware generators might fail, so we will retry
#define RND_RETRIES 1000
#if defined (__linux__)
#include <sys/syscall.h> /* syscall, SYS_getrandom */
#include <syscall.h> // for SYS_getrandom
#ifdef SYS_getrandom
#define GRND_NONBLOCK 1
#include <errno.h> /* errno, EAGAIN */
#endif
#endif

View File

@ -19,6 +19,8 @@
#include "auth.h" // for generate_private_key, generate_p...
#include "n2n.h"
#include "pearson.h" // for pearson_hash_64
#include "random_numbers.h" // for n2n_seed, n2n_srand
/* *************************************************** */

View File

@ -17,11 +17,12 @@
*/
#include "auth.h" // for generate_private_key
#include "edge_utils_win32.h"
#include "header_encryption.h" // for packet_header_encrypt, packet_he...
#include "n2n.h" // for n2n_edge_t, peer_info, n2n_edge_...
#include "network_traffic_filter.h" // for create_network_traffic_filter
#include "pearson.h" // for pearson_hash_128, pearson_hash_64
#include "network_traffic_filter.h"
#include "edge_utils_win32.h"
#include "random_numbers.h" // for n2n_rand, n2n_rand_sqr
/* ************************************** */

View File

@ -16,7 +16,10 @@
*
*/
#include "n2n.h"
#include "n2n.h" // for quick_edge_init, setTraceLevel
#include "random_numbers.h" // for n2n_seed, n2n_srand
/*
This tool demonstrates how to easily embed

View File

@ -20,6 +20,7 @@
#include "header_encryption.h" // for packet_header_change_dynamic_key, pac...
#include "n2n.h" // for he_context_t, N2N_COMMUNITY_SIZE, TRA...
#include "pearson.h" // for pearson_hash_128, pearson_hash_64
#include "random_numbers.h" // for n2n_rand
#define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out)

View File

@ -18,7 +18,8 @@
#include "n2n.h"
#include "sn_selection.h"
#include "random_numbers.h" // for n2n_rand
#include "sn_selection.h" // for sn_selection_criterion_default
#include "minilzo.h"

View File

@ -17,6 +17,11 @@
*/
#include <errno.h> // for errno, EAGAIN
#include <stddef.h> // for NULL, size_t
#include <time.h> // for clock, time
#include <unistd.h> // for syscall
#include "n2n.h" // for TRACE_ERROR, traceEvent
#include "random_numbers.h"

View File

@ -21,6 +21,7 @@
#include "header_encryption.h" // for packet_header_encrypt, packet_header_...
#include "n2n.h" // for sn_community, n2n_sn_t, peer_info
#include "pearson.h" // for pearson_hash_128, pearson_hash_32
#include "random_numbers.h" // for n2n_rand, n2n_rand_sqr, n2n_seed, n2n...
#define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out)

View File

@ -19,6 +19,7 @@
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
#include "pearson.h" // for pearson_hash_256
#include "random_numbers.h" // for n2n_rand
// size of random value prepended to plaintext defaults to AES BLOCK_SIZE;

View File

@ -20,6 +20,7 @@
#include "cc20.h" // for CC20_IV_SIZE, cc20_crypt, cc20_deinit
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
#include "pearson.h" // for pearson_hash_256
#include "random_numbers.h" // for n2n_rand
// ChaCha20 plaintext preamble

View File

@ -19,6 +19,7 @@
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_DEBUG
#include "pearson.h" // for pearson_hash_256
#include "random_numbers.h" // for n2n_rand
// Speck plaintext preamble
#define TRANSOP_SPECK_PREAMBLE_SIZE (N2N_SPECK_IVEC_SIZE)

View File

@ -19,6 +19,7 @@
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
#include "pearson.h" // for pearson_hash_256
#include "random_numbers.h" // for n2n_rand
// size of random value prepended to plaintext defaults to TF_BLOCK_SIZE;

View File

@ -19,6 +19,7 @@
#include "json.h" // for _jsonpair, json_object_t, json_free
#include "n2n.h" // for traceEvent, setTraceLevel, getTraceLevel
#include "random_numbers.h" // for n2n_rand, n2n_seed, n2n_srand
#define WITH_PORT 1

View File

@ -19,6 +19,7 @@
#include "json.h" // for _jsonpair, json_object_t, _jsonvalue
#include "n2n.h" // for inaddrtoa, traceEvent, TRACE_WARNING
#include "random_numbers.h" // for n2n_rand, n2n_seed, n2n_srand
#if defined (__linux__) || defined(WIN32) /* currently, Linux and Windows only */