This file is indexed.

/usr/include/measurement_kit/net/utils.hpp is in libmeasurement-kit-dev 0.7.1-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Part of measurement-kit <https://measurement-kit.github.io/>.
// Measurement-kit is free software. See AUTHORS and LICENSE for more
// information on the copying conditions.
#ifndef MEASUREMENT_KIT_NET_UTILS_HPP
#define MEASUREMENT_KIT_NET_UTILS_HPP

#include <measurement_kit/common.hpp>

namespace mk {
namespace net {

class Endpoint {
  public:
    std::string hostname;
    uint16_t port = 0;
};

bool is_ipv4_addr(std::string s);
bool is_ipv6_addr(std::string s);
bool is_ip_addr(std::string s);

ErrorOr<Endpoint> parse_endpoint(std::string s, uint16_t def_port);
std::string serialize_endpoint(Endpoint);

ErrorOr<Endpoint> endpoint_from_sockaddr_storage(
        sockaddr_storage *storage
) noexcept;

Error make_sockaddr(
        std::string address,
        std::string port,
        sockaddr_storage *storage,
        socklen_t *len
) noexcept;

Error make_sockaddr(
        std::string address,
        uint16_t port,
        sockaddr_storage *storage,
        socklen_t *len
) noexcept;

} // namespace net
} // namespace mk
#endif