random: Rename random header

rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2023-10-06 22:38:53 +00:00 committed by Johan Hedberg
parent c928e3b125
commit e7bd10ae71
133 changed files with 225 additions and 206 deletions

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>

View file

@ -11,7 +11,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/init.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
static int entropy_mcux_css_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length)
{

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include "fsl_rng.h"

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include "fsl_rnga.h"

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include "fsl_trng.h"

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include "fsl_trng.h"

View file

@ -12,7 +12,7 @@
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/init.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>

View file

@ -8,7 +8,7 @@
#define ZEPHYR_DRIVERS_ETHERNET_ETH_H_
#include <zephyr/types.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
/* helper macro to return mac address octet from local_mac_address prop */
#define NODE_MAC_ADDR_OCTET(node, n) DT_PROP_BY_IDX(node, local_mac_address, n)

View file

@ -13,7 +13,7 @@
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/stats/stats.h>
#include <string.h>

View file

@ -19,7 +19,7 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/ieee802154_radio.h>
#include <zephyr/irq.h>
#if defined(CONFIG_NET_L2_OPENTHREAD)

View file

@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>

View file

@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(ieee802154_cc13xx_cc26xx);
#include <zephyr/net/ieee802154_radio.h>
#include <zephyr/net/ieee802154.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <zephyr/sys/sys_io.h>

View file

@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(ieee802154_cc13xx_cc26xx_subg);
#include <zephyr/net/ieee802154.h>
#include <zephyr/net/ieee802154_radio.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/crc.h>
#include <zephyr/sys/sys_io.h>

View file

@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/drivers/gpio.h>

View file

@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(dw1000, LOG_LEVEL_INF);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/debug/stack.h>
#include <math.h>

View file

@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "fsl_xcvr.h"

View file

@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/debug/stack.h>
#include <zephyr/drivers/gpio.h>

View file

@ -39,7 +39,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/ieee802154_radio.h>
#include <zephyr/irq.h>

View file

@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/sys/byteorder.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/linker/sections.h>
#include <zephyr/sys/atomic.h>

View file

@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/init.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/drivers/uart_pipe.h>
#include <zephyr/net/ieee802154_radio.h>

View file

@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);
#include <zephyr/drivers/gpio.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/net_context.h>
#include <zephyr/net/net_if.h>

View file

@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(net_ppp, LOG_LEVEL);
#include <zephyr/sys/crc.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/drivers/console/uart_mux.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "../../subsys/net/ip/net_stats.h"
#include "../../subsys/net/ip/net_private.h"

View file

@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/net/net_core.h>
#include <zephyr/net/dummy.h>
#include <zephyr/drivers/uart_pipe.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "slip.h"

View file

@ -1,86 +1,15 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright (c) 2023 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Random number generator header file
*
* This header file declares prototypes for the kernel's random number
* generator APIs.
*
* Typically, a platform enables the appropriate source for the random
* number generation based on the hardware platform's capabilities or
* (for testing purposes only) enables the TEST_RANDOM_GENERATOR
* configuration option.
*/
#ifndef ZEPHYR_INCLUDE_RANDOM_RAND32_H_
#define ZEPHYR_INCLUDE_RANDOM_RAND32_H_
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/kernel.h>
#include <zephyr/random/random.h>
/**
* @brief Random Function APIs
* @defgroup random_api Random Function APIs
* @ingroup crypto
* @{
*/
#warning "<zephyr/random/rand32.h> is deprecated, include <zephyr/random/random.h> instead"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Return a 32-bit random value that should pass general
* randomness tests.
*
* @note The random value returned is not a cryptographically secure
* random number value.
*
* @return 32-bit random value.
*/
__syscall uint32_t sys_rand32_get(void);
/**
* @brief Fill the destination buffer with random data values that should
* pass general randomness tests.
*
* @note The random values returned are not considered cryptographically
* secure random number values.
*
* @param [out] dst destination buffer to fill with random data.
* @param len size of the destination buffer.
*
*/
__syscall void sys_rand_get(void *dst, size_t len);
/**
* @brief Fill the destination buffer with cryptographically secure
* random data values.
*
* @note If the random values requested do not need to be cryptographically
* secure then use sys_rand_get() instead.
*
* @param [out] dst destination buffer to fill.
* @param len size of the destination buffer.
*
* @return 0 if success, -EIO if entropy reseed error
*
*/
__syscall int sys_csrand_get(void *dst, size_t len);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#include <syscalls/rand32.h>
#endif /* ZEPHYR_INCLUDE_RANDOM_RAND32_H_ */

View file

@ -0,0 +1,87 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright (c) 2023 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Random number generator header file
*
* This header file declares prototypes for the kernel's random number
* generator APIs.
*
* Typically, a platform enables the appropriate source for the random
* number generation based on the hardware platform's capabilities or
* (for testing purposes only) enables the TEST_RANDOM_GENERATOR
* configuration option.
*/
#ifndef ZEPHYR_INCLUDE_RANDOM_RANDOM_H_
#define ZEPHYR_INCLUDE_RANDOM_RANDOM_H_
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/kernel.h>
/**
* @brief Random Function APIs
* @defgroup random_api Random Function APIs
* @ingroup crypto
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Return a 32-bit random value that should pass general
* randomness tests.
*
* @note The random value returned is not a cryptographically secure
* random number value.
*
* @return 32-bit random value.
*/
__syscall uint32_t sys_rand32_get(void);
/**
* @brief Fill the destination buffer with random data values that should
* pass general randomness tests.
*
* @note The random values returned are not considered cryptographically
* secure random number values.
*
* @param [out] dst destination buffer to fill with random data.
* @param len size of the destination buffer.
*
*/
__syscall void sys_rand_get(void *dst, size_t len);
/**
* @brief Fill the destination buffer with cryptographically secure
* random data values.
*
* @note If the random values requested do not need to be cryptographically
* secure then use sys_rand_get() instead.
*
* @param [out] dst destination buffer to fill.
* @param len size of the destination buffer.
*
* @return 0 if success, -EIO if entropy reseed error
*
*/
__syscall int sys_csrand_get(void *dst, size_t len);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#include <syscalls/random.h>
#endif /* ZEPHYR_INCLUDE_RANDOM_RANDOM_H_ */

View file

@ -15,7 +15,7 @@
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/debug/stack.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/linker/sections.h>
#include <zephyr/toolchain.h>
#include <zephyr/kernel_structs.h>

View file

@ -26,7 +26,7 @@
#include <stdbool.h>
#include <zephyr/irq_offload.h>
#include <zephyr/sys/check.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/iterable_sections.h>

View file

@ -13,7 +13,7 @@
#include <zephyr/kernel.h>
#ifdef CONFIG_THREAD_LOCAL_STORAGE
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
__thread k_tid_t z_tls_current;
#endif

View file

@ -13,7 +13,7 @@
#include <zephyr/init.h>
#include <zephyr/app_memory/app_memdomain.h>
#include <zephyr/drivers/entropy.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <mbedtls/entropy.h>
#include <mbedtls/debug.h>

View file

@ -5,7 +5,7 @@
*/
#include <zephyr/kernel.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/logging/log.h>
#include <openthread/platform/entropy.h>

View file

@ -7,7 +7,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/settings/settings.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <openthread/platform/settings.h>

View file

@ -7,7 +7,7 @@
#include <zephyr/kernel.h>
#include <stdio.h>
#include <zephyr/sys/crc.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
/* Amount of parallel processed sender/receiver queues of packet headers */

View file

@ -7,7 +7,7 @@
#include <zephyr/kernel.h>
#include <stdio.h>
#include <zephyr/sys/crc.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
struct phdr_desc {
struct phdr_desc *next; /* Next pkt descriptor in respective queue */

View file

@ -7,7 +7,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/hash_map.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
LOG_MODULE_REGISTER(hashmap_sample);

View file

@ -11,7 +11,7 @@
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/kernel.h>

View file

@ -17,7 +17,7 @@
#include <zephyr/net/sntp.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/data/json.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/posix/time.h>
#include <zephyr/logging/log.h>

View file

@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(mqtt_azure, LOG_LEVEL_DBG);
#include <zephyr/net/mqtt.h>
#include <zephyr/sys/printk.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>

View file

@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL);
#include <zephyr/kernel.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/http/client.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <stdio.h>
#include "wifi.h"

View file

@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <zephyr/drivers/sensor.h>
#include <zephyr/net/lwm2m.h>
#include <zephyr/kernel.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <stdint.h>
static struct k_work_delayable temp_work;

View file

@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(net_mqtt_publisher_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>

View file

@ -16,7 +16,7 @@ LOG_MODULE_DECLARE(net_echo_client_sample, LOG_LEVEL_DBG);
#include <zephyr/net/socket.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "common.h"
#include "ca_certificate.h"

View file

@ -16,7 +16,7 @@ LOG_MODULE_DECLARE(net_echo_client_sample, LOG_LEVEL_DBG);
#include <zephyr/net/socket.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "common.h"
#include "ca_certificate.h"

View file

@ -11,7 +11,7 @@ LOG_MODULE_REGISTER(net_websocket_client_sample, LOG_LEVEL_DBG);
#include <zephyr/net/socket.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/net/websocket.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/shell/shell.h>
#include "ca_certificate.h"

View file

@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(wpan_serial, CONFIG_USB_DEVICE_LOG_LEVEL);
#include <zephyr/drivers/uart.h>
#include <zephyr/kernel.h>
#include <zephyr/usb/usb_device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/buf.h>
#include <net_private.h>

View file

@ -8,7 +8,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/uart.h>
#include <string.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/usb/usb_device.h>
#include <zephyr/usb/class/usb_hid.h>

View file

@ -35,7 +35,7 @@ extern "C" {
#include <fsl_common.h>
#include <zephyr/device.h>
#include <zephyr/sys/util.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif /* !_ASMLANGUAGE */

View file

@ -20,7 +20,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#ifdef CONFIG_GPIO_INTEL

View file

@ -20,7 +20,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#ifdef CONFIG_GPIO_INTEL

View file

@ -19,7 +19,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
/* PCI definitions */

View file

@ -20,7 +20,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#ifdef CONFIG_GPIO_INTEL

View file

@ -19,7 +19,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
/* PCI definitions */

View file

@ -11,7 +11,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#ifdef CONFIG_HPET_TIMER
#include "sedi_driver_hpet.h"

View file

@ -18,7 +18,7 @@
#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#ifdef CONFIG_GPIO_INTEL

View file

@ -10,7 +10,7 @@
#include "access.h"
#include "dfu.h"
#include "blob.h"
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <common/bt_str.h>
#define LOG_LEVEL CONFIG_BT_MESH_DFU_LOG_LEVEL

View file

@ -6,7 +6,7 @@
#include <stdlib.h>
#include <zephyr/sys/slist.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/mesh/rpr_srv.h>

View file

@ -5,7 +5,7 @@
*/
#include <zephyr/logging/log.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/fs/ext2.h>
#include <zephyr/sys/byteorder.h>

View file

@ -15,7 +15,7 @@
#include <mbedtls/pk.h>
#include <mbedtls/rsa.h>
#include <mbedtls/sha256.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#ifdef CONFIG_JWT_SIGN_ECDSA
@ -24,7 +24,7 @@
#include <tinycrypt/ecc_dsa.h>
#include <tinycrypt/constants.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
/*

View file

@ -15,7 +15,7 @@
#include <zephyr/kernel.h>
#include <zephyr/lorawan/lorawan.h>
#include <zephyr/logging/log.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
LOG_MODULE_REGISTER(lorawan_clock_sync, CONFIG_LORAWAN_SERVICES_LOG_LEVEL);

View file

@ -12,7 +12,7 @@
#ifdef CONFIG_OSDP_SC_ENABLED
#include <zephyr/crypto/crypto.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#endif
#include "osdp_common.h"

View file

@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(net_dhcpv4, CONFIG_NET_DHCPV4_LOG_LEVEL);
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/net_if.h>

View file

@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(net_dhcpv6, CONFIG_NET_DHCPV6_LOG_LEVEL);
#include <zephyr/net/dhcpv6.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/math_extras.h>
#include "dhcpv6_internal.h"

View file

@ -29,7 +29,7 @@
LOG_MODULE_REGISTER(net_icmp, ICMP_LOG_LEVEL);
#include <errno.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/slist.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/icmp.h>

View file

@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(net_ipv4_autoconf, CONFIG_NET_IPV4_AUTO_LOG_LEVEL);
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_if.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "ipv4_autoconf_internal.h"

View file

@ -14,7 +14,7 @@ LOG_MODULE_DECLARE(net_ipv4, CONFIG_NET_IPV4_LOG_LEVEL);
#include <zephyr/net/net_stats.h>
#include <zephyr/net/net_context.h>
#include <zephyr/net/net_mgmt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "net_private.h"
#include "connection.h"
#include "icmpv4.h"

View file

@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(net_ipv6, CONFIG_NET_IPV6_LOG_LEVEL);
#include <zephyr/net/net_stats.h>
#include <zephyr/net/net_context.h>
#include <zephyr/net/net_mgmt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "net_private.h"
#include "connection.h"
#include "icmpv6.h"

View file

@ -15,7 +15,7 @@
LOG_MODULE_REGISTER(net_ctx, CONFIG_NET_CONTEXT_LOG_LEVEL);
#include <zephyr/kernel.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>

View file

@ -11,7 +11,7 @@ LOG_MODULE_REGISTER(net_if, CONFIG_NET_IF_LOG_LEVEL);
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/linker/sections.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/syscall_handler.h>
#include <stdlib.h>
#include <string.h>

View file

@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(net_shell, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <kernel_internal.h>
#include <zephyr/pm/device.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <stdlib.h>
#include <stdio.h>
#include <zephyr/shell/shell.h>

View file

@ -11,7 +11,7 @@ LOG_MODULE_REGISTER(net_tcp, CONFIG_NET_TCP_LOG_LEVEL);
#include <stdio.h>
#include <stdlib.h>
#include <zephyr/kernel.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#if defined(CONFIG_NET_TCP_ISN_RFC6528)
#include <mbedtls/md5.h>

View file

@ -14,7 +14,7 @@
#define __TCP_INTERNAL_H
#include <zephyr/types.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_ip.h>

View file

@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(net_trickle, CONFIG_NET_TRICKLE_LOG_LEVEL);
#include <errno.h>
#include <zephyr/sys/util.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/trickle.h>

View file

@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(net_ethernet, CONFIG_NET_L2_ETHERNET_LOG_LEVEL);
#include <zephyr/net/ethernet.h>
#include <zephyr/net/ethernet_mgmt.h>
#include <zephyr/net/gptp.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#if defined(CONFIG_NET_LLDP)
#include <zephyr/net/lldp.h>

View file

@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(net_gptp, CONFIG_NET_GPTP_LOG_LEVEL);
#include <zephyr/net/net_pkt.h>
#include <zephyr/drivers/ptp_clock.h>
#include <zephyr/net/ethernet_mgmt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/net/gptp.h>

View file

@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(net_ieee802154, CONFIG_NET_L2_IEEE802154_LOG_LEVEL);
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_l2.h>
#include <zephyr/net/net_linkaddr.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#ifdef CONFIG_NET_6LO
#include "ieee802154_6lo.h"

View file

@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(net_ieee802154_csma, CONFIG_NET_L2_IEEE802154_LOG_LEVEL);
#include <zephyr/net/ieee802154.h>
#include <zephyr/net/ieee802154_radio.h>
#include <zephyr/net/net_if.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/toolchain.h>
#include <errno.h>

View file

@ -12,7 +12,7 @@ LOG_MODULE_DECLARE(net_l2_ppp, CONFIG_NET_L2_PPP_LOG_LEVEL);
#include <zephyr/net/net_if.h>
#include <zephyr/net/ppp.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "net_private.h"

View file

@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(net_virtual, CONFIG_NET_L2_VIRTUAL_LOG_LEVEL);
#include <zephyr/net/net_mgmt.h>
#include <zephyr/net/virtual.h>
#include <zephyr/net/virtual_mgmt.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include "net_private.h"

View file

@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(net_coap, CONFIG_COAP_LOG_LEVEL);
#include <string.h>
#include <stdbool.h>
#include <errno.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/util.h>

View file

@ -14,7 +14,7 @@
LOG_MODULE_REGISTER(net_dns_resolve, CONFIG_DNS_RESOLVER_LOG_LEVEL);
#include <zephyr/types.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

View file

@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(net_sock_tls, CONFIG_NET_SOCKETS_LOG_LEVEL);
#include <zephyr/init.h>
#include <zephyr/sys/util.h>
#include <zephyr/net/socket.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/sys/fdtable.h>

View file

@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(net_websocket, CONFIG_NET_WEBSOCKET_LOG_LEVEL);
#include <zephyr/net/http/client.h>
#include <zephyr/net/websocket.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/base64.h>
#include <mbedtls/sha1.h>

View file

@ -3,7 +3,7 @@
if (CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR OR
CONFIG_TIMER_RANDOM_GENERATOR OR
CONFIG_XOSHIRO_RANDOM_GENERATOR)
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/random/rand32.h)
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/random/random.h)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_USERSPACE rand32_handlers.c)
endif()

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/syscall_handler.h>

View file

@ -14,7 +14,7 @@
* provide a random number generator.
*/
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/kernel.h>
#include <zephyr/spinlock.h>

View file

@ -8,7 +8,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/busy_sim.h>
#include <zephyr/sys/ring_buffer.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#define BUFFER_SIZE 32

View file

@ -22,7 +22,7 @@ static bool failed_expectation;
#include <stdlib.h>
#include <time.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#define NUM_ITER_PER_SUITE CONFIG_ZTEST_SHUFFLE_SUITE_REPEAT_COUNT
#define NUM_ITER_PER_TEST CONFIG_ZTEST_SHUFFLE_TEST_REPEAT_COUNT
#else

View file

@ -6,7 +6,7 @@
#include <zephyr/ztress.h>
#include <zephyr/ztest_test.h>
#include <zephyr/sys/printk.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <string.h>
/* Flag set at startup which determines if stress test can run on this platform.

View file

@ -70,7 +70,7 @@
#include <zephyr/types.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/kernel.h>

View file

@ -9,7 +9,7 @@
#include <zephyr/devicetree.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/flash.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <soc/soc_memory_layout.h>
/* definitions used in Flash & RAM operations */

View file

@ -15,7 +15,7 @@
#include <zephyr/ztest.h>
#include <kernel_internal.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#define N_VALUES 10

View file

@ -67,7 +67,7 @@
#include <zephyr/test_utils.h>
#include "test_ecc_utils.h"
#include <zephyr/sys/util.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -10,7 +10,7 @@
#include <zephyr/storage/disk_access.h>
#include <zephyr/device.h>
#include <zephyr/timing/timing.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#if defined(CONFIG_DISK_DRIVER_SDMMC)
#define DISK_NAME CONFIG_SDMMC_VOLUME_NAME

View file

@ -1 +0,0 @@
emulated_board.conf

View file

@ -0,0 +1,4 @@
# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
CONFIG_EMUL=y

View file

@ -7,7 +7,7 @@
#include <zephyr/ztest.h>
#include <zephyr/tc_util.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/drivers/pcie/pcie.h>
#include <zephyr/drivers/smbus.h>

View file

@ -14,7 +14,7 @@
#include <zephyr/drivers/uart.h>
#include <zephyr/ztest.h>
#include <zephyr/drivers/counter.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
/* RX and TX pins have to be connected together*/
#if DT_NODE_EXISTS(DT_NODELABEL(dut))

View file

@ -5,7 +5,7 @@
*/
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#define NUM_THREADS 8
/* this should be large enough for us

View file

@ -6,7 +6,7 @@
#include <zephyr/ztest.h>
#include <zephyr/types.h>
#include <zephyr/sys/time_units.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#define NUM_RANDOM 100

View file

@ -6,7 +6,7 @@
#include <stdlib.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/hash_function.h>
#include <zephyr/ztest.h>

View file

@ -7,7 +7,7 @@
#include <zephyr/ztress.h>
#include <zephyr/sys/mpsc_pbuf.h>
#include <zephyr/sys/ring_buffer.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(test);

Some files were not shown because too many files have changed in this diff Show more