Add dlogf printf formatting, ipv4::to_string helper, clean up string building

This commit is contained in:
Ian Gulliver
2026-04-11 08:21:59 +09:00
parent c35c1de76a
commit 3a3c5873c3
5 changed files with 32 additions and 7 deletions

View File

@@ -44,9 +44,7 @@ static void test_ping(const responder& resp, ipv4::ip4_addr dst_ip) {
return;
}
*done = true;
std::string ip_str = std::to_string(src_ip[0]) + "." + std::to_string(src_ip[1]) + "." +
std::to_string(src_ip[2]) + "." + std::to_string(src_ip[3]);
resp.respond(ResponseTest{true, {"reply from " + ip_str}});
resp.respond(ResponseTest{true, {"reply from " + ipv4::to_string(src_ip)}});
};
net_add_frame_callback(*cb);