extract icmp into its own static library; replace all __attribute__((constructor)) self-registrations with explicit init() calls in dispatch_init

This commit is contained in:
Ian Gulliver
2026-05-01 13:44:53 -07:00
parent 2d7ff98b82
commit a56e034bfb
12 changed files with 30 additions and 23 deletions

View File

@@ -61,11 +61,6 @@ void process_frame(std::span<const uint8_t> frame, span_writer& tx) {
}
}
__attribute__((constructor))
void register_default_mac_filter() {
register_mac_filter(default_mac_filter);
}
} // namespace
void register_ethertype(uint16_t ethertype_be, ethertype_handler fn) {
@@ -114,6 +109,8 @@ bool init() {
w6300::open_socket(raw_socket, w6300::protocol::macraw, w6300::sock_flag::none);
w6300::set_interrupt_mask(w6300::ik_sock_0);
register_mac_filter(default_mac_filter);
return true;
}