* limitations under the License.
*/
-#include "IPAddressV4.h"
+#include <folly/IPAddressV4.h>
#include <ostream>
#include <string>
namespace folly {
+
// free functions
size_t hash_value(const IPAddressV4& addr) {
return addr.hash();
return (mask == subMask);
}
+bool IPAddressV4::isLoopback() const {
+ static IPAddressV4 loopback_addr("127.0.0.0");
+ return inSubnetWithMask(loopback_addr, fetchMask(8));
+}
+
// public
bool IPAddressV4::isNonroutable() const {
auto ip = toLongHBO();