LLVMFuzzerTestOneInput:
   29|     18|{
   30|     18|    FuzzedDataProvider fdp(data, size);
   31|       |
   32|       |    // 1. Test addrFromBuf with various address families
   33|     18|    int family = fdp.PickValueInArray(
   34|     18|        {AF_INET, AF_INET6, AF_UNSPEC, AF_PACKET, AF_NETLINK, 999});
   35|     18|    std::string buf = fdp.ConsumeRandomLengthString(32);
   36|     18|    try
   37|     18|    {
   38|     18|        (void)phosphor::network::addrFromBuf(family, buf);
   39|     18|    }
   40|     18|    catch (...)
   41|     18|    {
   42|     18|    }
   43|       |
   44|       |    // 2. Test isIPv6LinkLocal with raw bytes
   45|     18|    if (fdp.remaining_bytes() >= sizeof(stdplus::In6Addr))
  ------------------
  |  Branch (45:9): [True: 4, False: 14]
  ------------------
   46|      4|    {
   47|      4|        std::vector<uint8_t> in6_raw =
   48|      4|            fdp.ConsumeBytes<uint8_t>(sizeof(stdplus::In6Addr));
   49|      4|        stdplus::In6Addr in6;
   50|      4|        std::memcpy(&in6, in6_raw.data(), sizeof(in6));
   51|      4|        (void)phosphor::network::isIPv6LinkLocal(in6);
   52|      4|    }
   53|       |
   54|       |    // 3. Test interfaceToUbootEthAddr
   55|     18|    std::string intf = fdp.ConsumeRandomLengthString(64);
   56|     18|    (void)phosphor::network::interfaceToUbootEthAddr(intf);
   57|       |
   58|       |    // 4. Test parseInterfaces
   59|     18|    std::string intfList = fdp.ConsumeRandomLengthString(128);
   60|     18|    (void)phosphor::network::internal::parseInterfaces(intfList);
   61|       |
   62|       |    // 5. Test isValidNtpServer
   63|     18|    std::string ntpServer = fdp.ConsumeRandomLengthString(128);
   64|     18|    (void)phosphor::network::internal::isValidNtpServer(ntpServer);
   65|       |
   66|       |    // 6. Test isHostnameValid
   67|     18|    std::string hostname = fdp.ConsumeRemainingBytesAsString();
   68|     18|    (void)phosphor::network::internal::isHostnameValid(hostname);
   69|       |
   70|     18|    return 0;
   71|     18|}

_ZN8phosphor7network8internal16isValidNtpServerERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   46|     18|{
   47|       |    // Try IP validation (IPv4 or IPv6)
   48|     18|    try
   49|     18|    {
   50|     18|        stdplus::fromStr<stdplus::InAnyAddr>(server);
   51|     18|        return true;
   52|     18|    }
   53|     18|    catch (...)
   54|     18|    {
   55|       |        // Not an IP, try hostname
   56|     18|    }
   57|       |
   58|       |    // Try hostname validation
   59|     18|    try
   60|     18|    {
   61|     18|        stdplus::fromStr<stdplus::Hostname>(server);
   62|     18|        return true;
   63|     18|    }
   64|     18|    catch (...)
   65|     18|    {
   66|     18|        return false;
   67|     18|    }
   68|     18|}
_ZN8phosphor7network8internal15isHostnameValidERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   71|     18|{
   72|     18|    try
   73|     18|    {
   74|     18|        stdplus::fromStr<stdplus::Hostname>(hostname);
   75|     18|        return true;
   76|     18|    }
   77|     18|    catch (const std::invalid_argument&)
   78|     18|    {
   79|     18|        return false;
   80|     18|    }
   81|     18|}
_ZN8phosphor7network8internal15parseInterfacesENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  165|     18|{
  166|     18|    std::unordered_set<std::string> result;
  167|     18|    while (true)
  ------------------
  |  Branch (167:12): [True: 18, Folded]
  ------------------
  168|     18|    {
  169|     18|        auto sep = interfaces.find(',');
  170|     18|        auto interface = interfaces.substr(0, sep);
  171|     18|        while (!interface.empty() && isSpace(interface.front()))
  ------------------
  |  Branch (171:16): [True: 2, False: 16]
  |  Branch (171:38): [True: 0, False: 2]
  ------------------
  172|      0|        {
  173|      0|            interface.remove_prefix(1);
  174|      0|        }
  175|     18|        while (!interface.empty() && isSpace(interface.back()))
  ------------------
  |  Branch (175:16): [True: 2, False: 16]
  |  Branch (175:38): [True: 0, False: 2]
  ------------------
  176|      0|        {
  177|      0|            interface.remove_suffix(1);
  178|      0|        }
  179|     18|        if (!interface.empty())
  ------------------
  |  Branch (179:13): [True: 2, False: 16]
  ------------------
  180|      2|        {
  181|      2|            result.emplace(interface);
  182|      2|        }
  183|     18|        if (sep == interfaces.npos)
  ------------------
  |  Branch (183:13): [True: 18, False: 0]
  ------------------
  184|     18|        {
  185|     18|            break;
  186|     18|        }
  187|      0|        interfaces = interfaces.substr(sep + 1);
  188|      0|    }
  189|     18|    return result;
  190|     18|}
_ZN8phosphor7network23interfaceToUbootEthAddrENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  202|     18|{
  203|     18|    constexpr auto pfx = "eth"sv;
  204|     18|    if (!intf.starts_with(pfx))
  ------------------
  |  Branch (204:9): [True: 18, False: 0]
  ------------------
  205|     18|    {
  206|     18|        return std::nullopt;
  207|     18|    }
  208|      0|    intf.remove_prefix(pfx.size());
  209|      0|    unsigned idx;
  210|      0|    try
  211|      0|    {
  212|      0|        idx = stdplus::StrToInt<10, unsigned>{}(intf);
  213|      0|    }
  214|      0|    catch (...)
  215|      0|    {
  216|      0|        return std::nullopt;
  217|      0|    }
  218|      0|    if (idx == 0)
  ------------------
  |  Branch (218:9): [True: 0, False: 0]
  ------------------
  219|      0|    {
  220|      0|        return "ethaddr";
  221|      0|    }
  222|      0|    stdplus::ToStrHandle<stdplus::IntToStr<10, unsigned>> tsh;
  223|      0|    return stdplus::strCat("eth"sv, tsh(idx), "addr"sv);
  224|      0|}
util.cpp:_ZN8phosphor7network8internalL7isSpaceEc:
   41|      4|{
   42|      4|    return std::isspace(static_cast<unsigned char>(c)) != 0;
   43|      4|}

_ZN8phosphor7network11addrFromBufEiNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   28|     18|{
   29|     18|    switch (family)
  ------------------
  |  Branch (29:13): [True: 9, False: 9]
  ------------------
   30|     18|    {
   31|      6|        case AF_INET:
  ------------------
  |  Branch (31:9): [True: 6, False: 12]
  ------------------
   32|      6|            return stdplus::raw::copyFromStrict<stdplus::In4Addr>(buf);
   33|      3|        case AF_INET6:
  ------------------
  |  Branch (33:9): [True: 3, False: 15]
  ------------------
   34|      3|            return stdplus::raw::copyFromStrict<stdplus::In6Addr>(buf);
   35|     18|    }
   36|      9|    throw std::invalid_argument("Unrecognized family");
   37|     18|}
_ZN8phosphor7network15isIPv6LinkLocalERKN7stdplus7In6AddrE:
   44|      4|{
   45|      4|    auto bytes = stdplus::raw::asView<const uint8_t>(addr);
   46|      4|    return (bytes[0] == 0xfe) && ((bytes[1] & 0xc0) == 0x80);
  ------------------
  |  Branch (46:12): [True: 0, False: 4]
  |  Branch (46:34): [True: 0, False: 0]
  ------------------
   47|      4|}

_ZNK7stdplus7FromStrINS_8HostnameEEclIcEES1_NSt3__117basic_string_viewIT_NS4_11char_traitsIS6_EEEE:
   70|     36|    {
   71|     36|        return Hostname(std::string_view(sv.data(), sv.size()));
   72|     36|    }

_ZN7stdplus7In4AddrC2Ev:
   36|      6|    constexpr In4Addr() noexcept : In4AddrInner({.s4_addr = {}}) {}
_ZN7stdplus7In6AddrC2Ev:
  163|      7|    constexpr In6Addr() noexcept : in6_addr() {}
_ZNK7stdplus7FromStrINS_7In4AddrEEclIcEES1_NSt3__117basic_string_viewIT_NS4_11char_traitsIS6_EEEE:
  120|     18|    {
  121|     18|        constexpr StrToInt<10, uint8_t> sti;
  122|     18|        uint32_t addr = {};
  123|     36|        for (size_t i = 0; i < 3; ++i)
  ------------------
  |  Branch (123:28): [True: 18, False: 18]
  ------------------
  124|     18|        {
  125|     18|            auto loc = sv.find('.');
  126|     18|            addr |= sti(sv.substr(0, loc));
  127|     18|            addr <<= 8;
  128|     18|            sv.remove_prefix(loc == sv.npos ? sv.size() : loc + 1);
  ------------------
  |  Branch (128:30): [True: 0, False: 18]
  ------------------
  129|     18|            if (sv.empty())
  ------------------
  |  Branch (129:17): [True: 0, False: 18]
  ------------------
  130|      0|            {
  131|      0|                throw std::invalid_argument("Missing addr data");
  132|      0|            }
  133|     18|        }
  134|     18|        addr |= sti(sv);
  135|     18|        return in_addr{hton(addr)};
  136|     18|    }
_ZNK7stdplus7FromStrINS_9InAnyAddrEEclIcEES1_NSt3__117basic_string_viewIT_NS4_11char_traitsIS6_EEEE:
  413|     18|    {
  414|     18|        if (sv.find(':') == sv.npos)
  ------------------
  |  Branch (414:13): [True: 18, False: 0]
  ------------------
  415|     18|        {
  416|     18|            return FromStr<In4Addr>{}(sv);
  417|     18|        }
  418|      0|        return FromStr<In6Addr>{}(sv);
  419|     18|    }

_ZN7stdplus6detail9strToUIntILh10EmcEET0_NSt3__117basic_string_viewIT1_NS3_11char_traitsIS5_EEEE:
  151|     18|{
  152|     18|    static_assert(std::is_unsigned_v<T>);
  153|     18|    if (str.empty())
  ------------------
  |  Branch (153:9): [True: 18, False: 0]
  ------------------
  154|     18|    {
  155|     18|        throw std::invalid_argument("Empty Str");
  156|     18|    }
  157|      0|    constexpr auto max = std::numeric_limits<T>::max();
  158|      0|    T ret = 0;
  159|      0|    for (auto c : str)
  ------------------
  |  Branch (159:17): [True: 0, False: 0]
  ------------------
  160|      0|    {
  161|      0|        constexpr auto cmax = 1 << (sizeof(CharT) << 3);
  162|       |        if constexpr (detail::charTable.size() < cmax)
  163|       |        {
  164|       |            if (detail::charTable.size() <= c)
  165|       |            {
  166|       |                throw std::invalid_argument("Invalid numeral");
  167|       |            }
  168|       |        }
  169|      0|        auto v = detail::charTable[c];
  170|      0|        if (v < 0 || v >= base)
  ------------------
  |  Branch (170:13): [True: 0, False: 0]
  |  Branch (170:22): [True: 0, False: 0]
  ------------------
  171|      0|        {
  172|      0|            throw std::invalid_argument("Invalid numeral");
  173|      0|        }
  174|       |        if constexpr (std::popcount(base) == 1)
  175|       |        {
  176|       |            constexpr auto shift = std::countr_zero(base);
  177|       |            constexpr auto maxshift = max >> shift;
  178|       |            if (ret > maxshift)
  179|       |            {
  180|       |                throw std::overflow_error("Integer Decode Overflow");
  181|       |            }
  182|       |            ret = (ret << shift) | v;
  183|       |        }
  184|       |        else
  185|      0|        {
  186|      0|            constexpr auto maxbase = max / base;
  187|      0|            if (ret > maxbase)
  ------------------
  |  Branch (187:17): [True: 0, False: 0]
  ------------------
  188|      0|            {
  189|      0|                throw std::overflow_error("Integer Decode Overflow");
  190|      0|            }
  191|      0|            ret *= base;
  192|      0|            if (max - v < ret)
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|            {
  194|      0|                throw std::overflow_error("Integer Decode Overflow");
  195|      0|            }
  196|      0|            ret += v;
  197|      0|        }
  198|      0|    }
  199|      0|    return ret;
  200|      0|}
_ZN7stdplus6detail10strToUInt0ILh10EmcEET0_NSt3__117basic_string_viewIT1_NS3_11char_traitsIS5_EEEE:
  204|     18|{
  205|       |    if constexpr (base > 0)
  206|     18|    {
  207|     18|        return strToUInt<base, T>(str);
  208|     18|    }
  209|     18|    if (str.starts_with("0x"))
  ------------------
  |  Branch (209:9): [True: 0, False: 18]
  ------------------
  210|      0|    {
  211|      0|        return strToUInt<16, T>(str.substr(2));
  212|      0|    }
  213|     18|    return strToUInt<10, T>(str);
  214|     18|}
_ZN7stdplus6detail8strToIntILh10ETkNSt3__18integralEmcEET0_NS2_17basic_string_viewIT1_NS2_11char_traitsIS5_EEEE:
  218|     18|{
  219|       |    if constexpr (std::is_unsigned_v<T>)
  220|     18|    {
  221|     18|        return strToUInt0<base, T>(str);
  222|     18|    }
  223|      0|    bool is_neg = str.starts_with('-');
  224|     18|    auto ret = strToUInt0<base, std::make_unsigned_t<T>>(str.substr(is_neg));
  225|     18|    if (ret > std::numeric_limits<T>::max())
  ------------------
  |  Branch (225:9): [True: 0, False: 18]
  ------------------
  226|      0|    {
  227|      0|        throw std::overflow_error("Integer Decode Overflow");
  228|      0|    }
  229|     18|    return is_neg ? -static_cast<T>(ret) : ret;
  ------------------
  |  Branch (229:12): [True: 0, False: 18]
  ------------------
  230|     18|}
_ZNK7stdplus8StrToIntILh10EhEclIcEEhNSt3__117basic_string_viewIT_NS3_11char_traitsIS5_EEEE:
  275|     18|    {
  276|     18|        using ptr_t =
  277|     18|            std::conditional_t<std::is_signed_v<T>, intptr_t, uintptr_t>;
  278|     18|        auto ret = detail::strToInt<
  279|     18|            base, std::conditional_t<sizeof(T) <= sizeof(ptr_t), ptr_t, T>>(
  280|     18|            str);
  281|     18|        if (ret > std::numeric_limits<T>::max())
  ------------------
  |  Branch (281:13): [True: 0, False: 18]
  ------------------
  282|      0|        {
  283|      0|            throw std::overflow_error("Integer Decode");
  284|      0|        }
  285|     18|        return ret;
  286|     18|    }

_ZN7stdplus3raw14copyFromStrictITkNS_17TriviallyCopyableENS_7In4AddrETkNS0_6detail15ContainsTrivialENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEET_RKT0_:
   81|      6|    {                                                                          \
   82|      6|        T ret;                                                                 \
   83|      6|        const size_t bytes = std::size(c) * sizeof(*std::data(c));             \
   84|      6|        if (bytes comp sizeof(ret))                                            \
  ------------------
  |  Branch (84:13): [True: 6, False: 0]
  ------------------
   85|      6|        {                                                                      \
   86|      6|            throw exception::Incomplete(                                       \
   87|      6|                std::format(#func ": {} < {}", bytes, sizeof(ret)));           \
   88|      6|        }                                                                      \
   89|      6|        const auto c_bytes = reinterpret_cast<const std::byte*>(std::data(c)); \
   90|      0|        const auto ret_bytes = reinterpret_cast<std::byte*>(&ret);             \
   91|      0|        std::copy(c_bytes, c_bytes + sizeof(ret), ret_bytes);                  \
   92|      0|        return ret;                                                            \
   93|      6|    }
_ZN7stdplus3raw14copyFromStrictITkNS_17TriviallyCopyableENS_7In6AddrETkNS0_6detail15ContainsTrivialENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEET_RKT0_:
   81|      3|    {                                                                          \
   82|      3|        T ret;                                                                 \
   83|      3|        const size_t bytes = std::size(c) * sizeof(*std::data(c));             \
   84|      3|        if (bytes comp sizeof(ret))                                            \
  ------------------
  |  Branch (84:13): [True: 3, False: 0]
  ------------------
   85|      3|        {                                                                      \
   86|      3|            throw exception::Incomplete(                                       \
   87|      3|                std::format(#func ": {} < {}", bytes, sizeof(ret)));           \
   88|      3|        }                                                                      \
   89|      3|        const auto c_bytes = reinterpret_cast<const std::byte*>(std::data(c)); \
   90|      0|        const auto ret_bytes = reinterpret_cast<std::byte*>(&ret);             \
   91|      0|        std::copy(c_bytes, c_bytes + sizeof(ret), ret_bytes);                  \
   92|      0|        return ret;                                                            \
   93|      3|    }
_ZN7stdplus3raw6asViewIKhTkNS0_6detail19NotContainerTrivialENS_7In6AddrEEENSt3__117basic_string_viewIT_NS5_11char_traitsIS7_EEEERKT0_:
  185|      4|{
  186|      4|    static_assert(sizeof(T) % sizeof(CharT) == 0);
  187|      4|    return {reinterpret_cast<const CharT*>(&t), sizeof(T) / sizeof(CharT)};
  188|      4|}

_ZN7stdplus7fromStrINS_9InAnyAddrENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEET_RKT0_:
   20|     18|{
   21|     18|    return FromStr<T>{}(
   22|     18|        std::basic_string_view<std::remove_cvref_t<decltype(*std::begin(str))>>{
   23|     18|            str});
   24|     18|}
_ZN7stdplus7fromStrINS_8HostnameENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEET_RKT0_:
   20|     36|{
   21|     36|    return FromStr<T>{}(
   22|     36|        std::basic_string_view<std::remove_cvref_t<decltype(*std::begin(str))>>{
   23|     36|            str});
   24|     36|}

_ZN7stdplus9exception10IncompleteC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   30|      9|    std::system_error(std::make_error_code(std::errc::illegal_byte_sequence),
   31|      9|                      what)
   32|      9|{}

_ZN7stdplus8HostnameC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  151|     36|{
  152|     36|    if (!is_valid_hostname(hostname))
  ------------------
  |  Branch (152:9): [True: 36, False: 0]
  ------------------
  153|     36|    {
  154|     36|        throw std::invalid_argument(
  155|     36|            "Invalid hostname format: " + std::string(hostname));
  156|     36|    }
  157|       |
  158|       |    // Remove trailing dot if present (example.com. -> example.com)
  159|      0|    if (!hostname.empty() && hostname.back() == '.')
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  |  Branch (159:30): [True: 0, False: 0]
  ------------------
  160|      0|    {
  161|      0|        s = std::string(hostname.substr(0, hostname.length() - 1));
  162|      0|    }
  163|      0|    else
  164|      0|    {
  165|      0|        s = std::string(hostname);
  166|      0|    }
  167|      0|}
_ZN7stdplus17is_valid_hostnameENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   47|     36|{
   48|       |    // RFC 1035: Total hostname length cannot exceed 253 characters
   49|     36|    if (hostname.empty() || hostname.length() > 253)
  ------------------
  |  Branch (49:9): [True: 36, False: 0]
  |  Branch (49:29): [True: 0, False: 0]
  ------------------
   50|     36|    {
   51|     36|        return false;
   52|     36|    }
   53|       |
   54|       |    // Finite state machine states for hostname validation
   55|      0|    enum class State
   56|      0|    {
   57|      0|        Start,     // Initial state, or expecting first char of new label
   58|      0|        LabelChar, // Processing valid alphanumeric characters in label
   59|      0|        Hyphen,    // Just processed a hyphen
   60|      0|        Dot        // Just processed a dot separator
   61|      0|    };
   62|       |
   63|      0|    State state = State::Start;
   64|      0|    std::size_t label_len = 0;
   65|      0|    bool current_label_has_alpha =
   66|      0|        false;                  // Track if current label has alphabetic char
   67|      0|    bool has_any_alpha = false; // Track if entire hostname has any alpha
   68|       |
   69|      0|    for (char c : hostname)
  ------------------
  |  Branch (69:17): [True: 0, False: 0]
  ------------------
   70|      0|    {
   71|      0|        if (c == '.')
  ------------------
  |  Branch (71:13): [True: 0, False: 0]
  ------------------
   72|      0|        {
   73|       |            // Fails if: starts with dot, consecutive dots (empty label),
   74|       |            // or label ends in hyphen
   75|      0|            if (state == State::Start || state == State::Dot ||
  ------------------
  |  Branch (75:17): [True: 0, False: 0]
  |  Branch (75:42): [True: 0, False: 0]
  ------------------
   76|      0|                state == State::Hyphen)
  ------------------
  |  Branch (76:17): [True: 0, False: 0]
  ------------------
   77|      0|            {
   78|      0|                return false;
   79|      0|            }
   80|       |            // Reset for next label
   81|      0|            current_label_has_alpha = false;
   82|      0|            state = State::Dot;
   83|      0|            label_len = 0;
   84|      0|        }
   85|      0|        else if (c == '-')
  ------------------
  |  Branch (85:18): [True: 0, False: 0]
  ------------------
   86|      0|        {
   87|       |            // Fails if: label starts with a hyphen
   88|      0|            if (state == State::Start || state == State::Dot)
  ------------------
  |  Branch (88:17): [True: 0, False: 0]
  |  Branch (88:42): [True: 0, False: 0]
  ------------------
   89|      0|            {
   90|      0|                return false;
   91|      0|            }
   92|      0|            state = State::Hyphen;
   93|      0|            if (++label_len > 63)
  ------------------
  |  Branch (93:17): [True: 0, False: 0]
  ------------------
   94|      0|            {
   95|      0|                return false; // RFC 1035: max label length is 63 characters
   96|      0|            }
   97|      0|        }
   98|      0|        else if (is_alnum(c))
  ------------------
  |  Branch (98:18): [True: 0, False: 0]
  ------------------
   99|      0|        {
  100|       |            // Track if this character is alphabetic
  101|      0|            if (is_alpha(c))
  ------------------
  |  Branch (101:17): [True: 0, False: 0]
  ------------------
  102|      0|            {
  103|      0|                current_label_has_alpha = true;
  104|      0|                has_any_alpha = true;
  105|      0|            }
  106|      0|            state = State::LabelChar;
  107|      0|            if (++label_len > 63)
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|            {
  109|      0|                return false;
  110|      0|            }
  111|      0|        }
  112|      0|        else
  113|      0|        {
  114|       |            // Reject any illegal characters (spaces, underscores, special
  115|       |            // symbols)
  116|      0|            return false;
  117|      0|        }
  118|      0|    }
  119|       |
  120|       |    // Hostname cannot end in a hyphen
  121|      0|    if (state == State::Hyphen)
  ------------------
  |  Branch (121:9): [True: 0, False: 0]
  ------------------
  122|      0|    {
  123|      0|        return false;
  124|      0|    }
  125|       |
  126|       |    // Hostname must end in a valid label or trailing dot
  127|      0|    if (state != State::LabelChar && state != State::Dot)
  ------------------
  |  Branch (127:9): [True: 0, False: 0]
  |  Branch (127:38): [True: 0, False: 0]
  ------------------
  128|      0|    {
  129|      0|        return false;
  130|      0|    }
  131|       |
  132|       |    // Ensure hostname contains at least one alphabetic character
  133|       |    // This rejects pure numeric hostnames (e.g., "123456", "192.168.1")
  134|       |    // while allowing mixed alphanumeric (e.g., "server1", "192.example.com")
  135|      0|    if (!has_any_alpha)
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  ------------------
  136|      0|    {
  137|      0|        return false;
  138|      0|    }
  139|       |
  140|       |    // The final label must contain at least one alphabetic character
  141|       |    // This ensures the TLD or single-label hostname is not purely numeric
  142|      0|    if (state == State::LabelChar && !current_label_has_alpha)
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  |  Branch (142:38): [True: 0, False: 0]
  ------------------
  143|      0|    {
  144|      0|        return false;
  145|      0|    }
  146|       |
  147|      0|    return true;
  148|      0|}

