folly/folly/IPAddressV4.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/IPAddressV4.h>

#include <ostream>
#include <string>

#include <fmt/core.h>

#include <folly/Conv.h>
#include <folly/IPAddress.h>
#include <folly/IPAddressV6.h>
#include <folly/String.h>
#include <folly/detail/IPAddressSource.h>

ostream;
string;

namespace folly {

// free functions
size_t hash_value(const IPAddressV4& addr) {}
ostream& operator<<(ostream& os, const IPAddressV4& addr) {}
void toAppend(IPAddressV4 addr, string* result) {}
void toAppend(IPAddressV4 addr, fbstring* result) {}

bool IPAddressV4::validate(StringPiece ip) noexcept {}

// public static
IPAddressV4 IPAddressV4::fromLong(uint32_t src) {}

IPAddressV4 IPAddressV4::fromLongHBO(uint32_t src) {}

// static public
uint32_t IPAddressV4::toLong(StringPiece ip) {}

// static public
uint32_t IPAddressV4::toLongHBO(StringPiece ip) {}

// public default constructor
IPAddressV4::IPAddressV4() = default;

// ByteArray4 constructor
IPAddressV4::IPAddressV4(const ByteArray4& src) noexcept :{}

// public string constructor
IPAddressV4::IPAddressV4(StringPiece addr) :{}

Expected<IPAddressV4, IPAddressFormatError> IPAddressV4::tryFromString(
    StringPiece str) noexcept {}

// in_addr constructor
IPAddressV4::IPAddressV4(const in_addr src) noexcept :{}

IPAddressV4 IPAddressV4::fromBinary(ByteRange bytes) {}

Expected<IPAddressV4, IPAddressFormatError> IPAddressV4::tryFromBinary(
    ByteRange bytes) noexcept {}

Expected<Unit, IPAddressFormatError> IPAddressV4::trySetFromBinary(
    ByteRange bytes) noexcept {}

// static
IPAddressV4 IPAddressV4::fromInverseArpaName(const std::string& arpaname) {}
IPAddressV6 IPAddressV4::createIPv6() const {}

// public
IPAddressV6 IPAddressV4::getIPv6For6To4() const {}

// public
string IPAddressV4::toJson() const {}

// public
bool IPAddressV4::inSubnet(StringPiece cidrNetwork) const {}

// public
bool IPAddressV4::inSubnetWithMask(
    const IPAddressV4& subnet, const ByteArray4 cidrMask) const {}

// public
bool IPAddressV4::isLoopback() const {}

// public
bool IPAddressV4::isLinkLocal() const {}

// public
bool IPAddressV4::isNonroutable() const {}

// public
bool IPAddressV4::isPrivate() const {}

// public
bool IPAddressV4::isMulticast() const {}

// public
IPAddressV4 IPAddressV4::mask(size_t numBits) const {}

// public
string IPAddressV4::str() const {}

// public
void IPAddressV4::toFullyQualifiedAppend(std::string& out) const {}

// public
string IPAddressV4::toInverseArpaName() const {}

// public
uint8_t IPAddressV4::getNthMSByte(size_t byteIndex) const {}
// protected
ByteArray4 IPAddressV4::fetchMask(size_t numBits) {}
// public static
CIDRNetworkV4 IPAddressV4::longestCommonPrefix(
    const CIDRNetworkV4& one, const CIDRNetworkV4& two) {}

} // namespace folly