mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 15:32:13 +00:00
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.
This commit is contained in:
parent
780d2a08c4
commit
5e938868a2
7 changed files with 80 additions and 88 deletions
|
@ -276,7 +276,7 @@ void handle_udp(const EthernetFrameHeader& eth, int frame_size)
|
|||
}
|
||||
|
||||
ASSERT(socket->type() == SOCK_DGRAM);
|
||||
ASSERT(socket->source_port() == udp_packet.destination_port());
|
||||
ASSERT(socket->local_port() == udp_packet.destination_port());
|
||||
socket->did_receive(ipv4_packet.source(), udp_packet.source_port(), ByteBuffer::copy(&ipv4_packet, sizeof(IPv4Packet) + ipv4_packet.payload_size()));
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ void handle_tcp(const EthernetFrameHeader& eth, int frame_size)
|
|||
}
|
||||
|
||||
ASSERT(socket->type() == SOCK_STREAM);
|
||||
ASSERT(socket->source_port() == tcp_packet.destination_port());
|
||||
ASSERT(socket->local_port() == tcp_packet.destination_port());
|
||||
|
||||
if (tcp_packet.ack_number() != socket->sequence_number()) {
|
||||
kprintf("handle_tcp: ack/seq mismatch: got %u, wanted %u\n", tcp_packet.ack_number(), socket->sequence_number());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue