This commit is contained in:
huoji
2023-05-07 22:49:11 +08:00
parent e8a3b9fa98
commit b00e51fdc7
38 changed files with 860 additions and 954 deletions

11
linux_service/tools.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "tools.h"
namespace tools {
auto cover_ip(unsigned int ip) -> std::string {
std::string ip_str;
ip_str = std::to_string(ip & 0xff) + "." +
std::to_string((ip >> 8) & 0xff) + "." +
std::to_string((ip >> 16) & 0xff) + "." +
std::to_string((ip >> 24) & 0xff);
return ip_str;
}
} // namespace tools