mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
IPv4: Factor out UDP parts of IPv4Socket into a UDPSocket class.
This commit is contained in:
parent
274b500bac
commit
edb986c276
6 changed files with 157 additions and 90 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <Kernel/IPv4.h>
|
||||
#include <Kernel/IPv4Socket.h>
|
||||
#include <Kernel/TCPSocket.h>
|
||||
#include <Kernel/UDPSocket.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/EtherType.h>
|
||||
#include <AK/Lock.h>
|
||||
|
@ -235,7 +236,7 @@ void handle_udp(const EthernetFrameHeader& eth, int frame_size)
|
|||
);
|
||||
#endif
|
||||
|
||||
auto socket = IPv4Socket::from_udp_port(udp_packet.destination_port());
|
||||
auto socket = UDPSocket::from_port(udp_packet.destination_port());
|
||||
if (!socket) {
|
||||
kprintf("handle_udp: No UDP socket for port %u\n", udp_packet.destination_port());
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue