Drop send_raw parameter threading: arp/icmp/igmp/ipv4 call net_send_raw directly

This commit is contained in:
Ian Gulliver
2026-04-17 14:35:10 -07:00
parent cdc113285a
commit e2daf04bed
10 changed files with 30 additions and 45 deletions

View File

@@ -81,10 +81,10 @@ static void process_frame(std::span<const uint8_t> frame, span_writer& tx) {
switch (eth_hdr.ethertype) {
case eth::ETH_ARP:
arp::handle(frame, tx, state.mac, state.ip, net_send_raw);
arp::handle(frame, tx, state.mac, state.ip);
break;
case eth::ETH_IPV4:
ipv4::handle(frame, tx, state.mac, state.ip, IP_BROADCAST_SUBNET, net_send_raw, handle_udp);
ipv4::handle(frame, tx, state.mac, state.ip, IP_BROADCAST_SUBNET, handle_udp);
break;
}
}
@@ -112,7 +112,7 @@ bool net_init() {
w6300::open_socket(raw_socket, w6300::protocol::macraw, w6300::sock_flag::none);
w6300::set_interrupt_mask(w6300::ik_sock_0);
igmp::join(igmp::PICOMAP_DISCOVERY_GROUP, state.mac, state.ip, net_send_raw);
igmp::join(igmp::PICOMAP_DISCOVERY_GROUP, state.mac, state.ip);
return true;
}