Add dlogf printf formatting, ipv4::to_string helper, clean up string building
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user