1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt

This commit is contained in:
Idan Horowitz 2021-10-27 23:20:24 +03:00 committed by Andreas Kling
parent 20c7fcfedf
commit adc9939a7b
9 changed files with 37 additions and 8 deletions

View file

@ -87,7 +87,7 @@ KResultOr<size_t> UDPSocket::protocol_send(const UserOrKernelBuffer& data, size_
udp_packet.set_length(udp_buffer_size);
SOCKET_TRY(data.read(udp_packet.payload(), data_length));
routing_decision.adapter->fill_in_ipv4_header(*packet, local_address(), routing_decision.next_hop,
peer_address(), IPv4Protocol::UDP, udp_buffer_size, ttl());
peer_address(), IPv4Protocol::UDP, udp_buffer_size, type_of_service(), ttl());
routing_decision.adapter->send_packet(packet->bytes());
return data_length;
}