Andreas Kling
72798519cb
IPv4: Use KBuffer instead of ByteBuffer for socket receive queues
...
This drastically reduces the pressure on the kernel heap when receiving
data from IPv4 sockets.
2019-08-04 21:09:38 +02:00
Andreas Kling
27f699ef0c
AK: Rename the common integer typedefs to make it obvious what they are.
...
These types can be picked up by including <AK/Types.h>:
* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Andreas Kling
46a06c23e3
Kernel: Fix all compiler warnings.
2019-06-22 16:22:34 +02:00
Andreas Kling
90b1354688
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
2019-06-21 18:37:47 +02:00
Andreas Kling
bc951ca565
Kernel: Run clang-format on everything.
2019-06-07 11:43:58 +02:00
Andreas Kling
5e938868a2
IPv4: Rename source/destination in socket classes to local/peer.
...
It was way too ambiguous who's the source and who's the destination, and it
didn't really follow a logical pattern. "Local port" vs "Peer port" is super
obvious, so let's call it that.
2019-05-04 16:40:34 +02:00
Andreas Kling
780d2a08c4
IPv4: Save the source address/port together with incoming packet payloads.
...
We need the address/port to fill in the out-params in recvfrom().
It should now be more or less possible to create a UDP server. :^)
2019-05-04 03:27:50 +02:00
Andreas Kling
abb5c890e0
IPv4: Implement bind() for TCP and UDP sockets.
...
We can't accept connections just yet, but this patch makes it possible to
bind() to a given source address/port.
2019-05-03 21:51:40 +02:00
Andreas Kling
03da7046bd
Kernel: Prepare Socket for becoming a File.
...
Make the Socket functions take a FileDescriptor& rather than a socket role
throughout the code. Also change threads to block on a FileDescriptor,
rather than either an fd index or a Socket.
2019-05-03 20:15:54 +02:00
Andreas Kling
2d7cad6a16
Kernel: Make sure we don't use any FPU/MMX/SSE instructions.
2019-04-22 23:38:33 +02:00
Andreas Kling
65d6318c33
Kernel: Support non-blocking connect().
...
If connect() is called on a non-blocking socket, it will "fail" immediately
with -EINPROGRESS. After that, you select() on the socket and wait for it to
become writable.
2019-04-08 04:52:21 +02:00
Andreas Kling
ab43658c55
Kernel: Move devices into Kernel/Devices/.
2019-04-03 12:36:40 +02:00
Andreas Kling
649c81a714
Kernel: Move networking related files into Kernel/Net/.
2019-04-02 19:54:38 +02:00