net::/ipv4:: namespace, mac/addr filter framework with default filters, dlog on registry overflow

This commit is contained in:
Ian Gulliver
2026-05-01 10:15:54 -07:00
parent ca624e0e70
commit b82c038091
12 changed files with 216 additions and 113 deletions

View File

@@ -24,7 +24,7 @@ void handle(std::span<const uint8_t> frame, span_writer& tx) {
if (!icmp_pkt) return;
if (icmp_pkt->type != 8) return;
const auto& ns = net_get_state();
const auto& ns = net::get_state();
prepend_buffer<4096> buf;
memcpy(buf.append(icmp_len), pb.remaining().data() - sizeof(echo), icmp_len);
@@ -34,7 +34,7 @@ void handle(std::span<const uint8_t> frame, span_writer& tx) {
reply->checksum = ipv4::checksum(reply, icmp_len);
ipv4::prepend(buf, eth_hdr->src, ns.mac, ns.ip, ip->src, 1, icmp_len);
net_send_raw(buf.span());
net::send_raw(buf.span());
}
__attribute__((constructor))