Drop send_raw parameter threading: arp/icmp/igmp/ipv4 call net_send_raw directly
This commit is contained in:
@@ -25,7 +25,6 @@ static bool ip_match(const ip4_addr& dst, const ip4_addr& our_ip, const ip4_addr
|
||||
|
||||
void handle(std::span<const uint8_t> frame, span_writer& tx,
|
||||
eth::mac_addr our_mac, ip4_addr our_ip, ip4_addr subnet_broadcast,
|
||||
std::function<void(std::span<const uint8_t>)> send_raw,
|
||||
std::function<void(std::span<const uint8_t>, span_writer&)> handle_udp) {
|
||||
parse_buffer pb(frame);
|
||||
pb.consume<eth::header>();
|
||||
@@ -40,10 +39,10 @@ void handle(std::span<const uint8_t> frame, span_writer& tx,
|
||||
case 1:
|
||||
if (!ip_match(ip->dst, our_ip, subnet_broadcast))
|
||||
return;
|
||||
icmp::handle(frame, tx, our_mac, our_ip, send_raw);
|
||||
icmp::handle(frame, tx, our_mac, our_ip);
|
||||
break;
|
||||
case 2:
|
||||
igmp::handle(frame, tx, our_mac, our_ip, send_raw);
|
||||
igmp::handle(frame, tx, our_mac, our_ip);
|
||||
break;
|
||||
case 17:
|
||||
if (!ip_match(ip->dst, our_ip, subnet_broadcast))
|
||||
|
||||
Reference in New Issue
Block a user