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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user