Drop send_raw parameter threading: arp/icmp/igmp/ipv4 call net_send_raw directly
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user