mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-15 23:17:14 +00:00
udp: rename method calc_checksum update_checksum
In other contexts (IPv4) 'calc_checksum' merely returns a new checksum that is then installed via 'checksum'. Thus, the UDP 'calc_checksum' that calculates AND installs a new checksum is misleading. Ref #114
This commit is contained in:
parent
ee9c4679df
commit
0ce79f3a8a
@ -110,8 +110,8 @@ class Net::Udp_packet
|
||||
* | 4 bytes | 4 bytes | 1 byte | 1 byte | 2 bytes |
|
||||
* --------------------------------------------------------------
|
||||
*/
|
||||
void calc_checksum(Ipv4_address src,
|
||||
Ipv4_address dst)
|
||||
void update_checksum(Ipv4_address src,
|
||||
Ipv4_address dst)
|
||||
{
|
||||
/* have to reset the checksum field for calculation */
|
||||
_checksum = 0;
|
||||
|
@ -63,7 +63,7 @@ bool Session_component::handle_ip(Ethernet_frame *eth, Genode::size_t size)
|
||||
Dhcp_packet(size - sizeof(Ipv4_packet) - sizeof(Udp_packet));
|
||||
if (dhcp->op() == Dhcp_packet::REQUEST) {
|
||||
dhcp->broadcast(true);
|
||||
udp->calc_checksum(ip->src(), ip->dst());
|
||||
udp->update_checksum(ip->src(), ip->dst());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user