1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-21 10:31:00 +00:00
serenity/Kernel/Net
Andreas Kling 9026598999 Kernel: Add a more expressive API for getting random bytes
We now have these API's in <Kernel/Random.h>:

    - get_fast_random_bytes(u8* buffer, size_t buffer_size)
    - get_good_random_bytes(u8* buffer, size_t buffer_size)
    - get_fast_random<T>()
    - get_good_random<T>()

Internally they both use x86 RDRAND if available, otherwise they fall
back to the same LCG we had in RandomDevice all along.

The main purpose of this patch is to give kernel code a way to better
express its needs for random data.

Randomness is something that will require a lot more work, but this is
hopefully a step in the right direction.
2020-01-03 12:43:07 +01:00
..
ARP.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
E1000NetworkAdapter.cpp Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
E1000NetworkAdapter.h Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
EthernetFrameHeader.h Net: Try to reuse incoming packet buffers to avoid allocation churn 2019-12-14 11:07:37 +01:00
EtherType.h Kernel: Ignore IPv6 packets; log unknown Ethernet payload types 2019-08-29 06:25:06 +02:00
ICMP.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
IPv4.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
IPv4Socket.cpp Kernel: Allow buffering up to 128 KB in an IPv4Socket before refusing 2019-12-14 12:17:37 +01:00
IPv4Socket.h IPv4: Only buffer payload bytes for SOCK_STREAM sockets 2019-12-14 09:43:31 +01:00
IPv4SocketTuple.h Kernel: Refactor TCP/IP stack 2019-08-06 16:21:17 +02:00
LocalSocket.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
LocalSocket.h Kernel: Add getsockopt(SO_PEERCRED) for local sockets 2019-12-06 18:38:36 +01:00
LoopbackAdapter.cpp Kernel+ifconfig: Add an MTU value to NetworkAdapter 2019-11-28 14:14:26 +01:00
LoopbackAdapter.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
MACAddress.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
NetworkAdapter.cpp Kernel: Route all loopback traffic through the loopback adapter 2019-12-28 02:03:38 +01:00
NetworkAdapter.h Net: Try to reuse incoming packet buffers to avoid allocation churn 2019-12-14 11:07:37 +01:00
NetworkTask.cpp Kernel: Fix code locked behind NETWORK_TASK_DEBUG 2019-12-28 02:03:49 +01:00
NetworkTask.h Kernel: Move networking related files into Kernel/Net/. 2019-04-02 19:54:38 +02:00
Routing.cpp Kernel: Route all loopback traffic through the loopback adapter 2019-12-28 02:03:38 +01:00
Routing.h Kernel: Implement is_zero for RoutingDecision 2019-08-29 06:25:06 +02:00
RTL8139NetworkAdapter.cpp Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
RTL8139NetworkAdapter.h Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
Socket.cpp Kernel: Add getsockopt(SO_PEERCRED) for local sockets 2019-12-06 18:38:36 +01:00
Socket.h Kernel: Add getsockopt(SO_PEERCRED) for local sockets 2019-12-06 18:38:36 +01:00
TCP.h Kernel: Refactor TCP/IP stack 2019-08-06 16:21:17 +02:00
TCPSocket.cpp Kernel: Add a more expressive API for getting random bytes 2020-01-03 12:43:07 +01:00
TCPSocket.h IPv4: Protect the list of unacked TCP packets with a lock 2019-11-23 21:44:47 +01:00
UDP.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
UDPSocket.cpp Kernel: Add a more expressive API for getting random bytes 2020-01-03 12:43:07 +01:00
UDPSocket.h Kernel: Move socket role tracking to the Socket class itself 2019-08-11 16:30:43 +02:00