| 37 | } |
| 38 | |
| 39 | void DecodeAddr(const uint64_t encoded_addr, proto::Addr &addr) { |
| 40 | in_addr in; |
| 41 | in.s_addr = (encoded_addr >> 32); |
| 42 | |
| 43 | addr.set_ip(inet_ntoa(in)); |
| 44 | addr.set_port((encoded_addr >> 16) & 0xFFFF); |
| 45 | addr.set_paxos_port(encoded_addr & 0xFFFF); |
| 46 | } |
| 47 | |
| 48 | string EncodedAddrToIPString(const uint64_t encoded_addr) { |
| 49 | proto::Addr addr; |
no outgoing calls
no test coverage detected