| 33 | } |
| 34 | |
| 35 | uint32_t Utils::GetSvrID(const string &ip) { |
| 36 | uint32_t svrid = 0; |
| 37 | uint32_t tmp[4] = { 0 }; |
| 38 | |
| 39 | sscanf(ip.c_str(), "%u.%u.%u.%u", &tmp[3], &tmp[2], &tmp[1], &tmp[0]); |
| 40 | svrid = (tmp[3] << 24) | (tmp[2] << 16) | (tmp[1] << 8) | tmp[0]; |
| 41 | return svrid; |
| 42 | } |
| 43 | |
| 44 | uint64_t Utils::GetCheckSum(const uint64_t &old_checksum, const char *value, const size_t &value_size) { |
| 45 | uint64_t checksum = old_checksum; |
nothing calls this directly
no outgoing calls
no test coverage detected