libcppwrap
A collection of C++ wrappers for native APIs
Loading...
Searching...
No Matches
ipv6.hpp
Go to the documentation of this file.
1//
2// libcppwrap - A collection of C++ wrappers for native APIs
3// Copyright (C) 2021-2023 David A. Norris <danorris@gmail.com>
4// Published under the MIT license - https://opensource.org/licenses/MIT
5//
6
7#pragma once
8
9#include <string>
10
11#include <netinet/ip6.h>
12
13namespace wx::ipv6
14{
23 bool is_link_local(const in6_addr& address) noexcept;
24
38 struct sockaddr_in6 get_link_local_address(const char *interface_name);
39
47 std::string to_string(const in6_addr& address);
48}
Definition: ipv6.hpp:14
struct sockaddr_in6 get_link_local_address(const char *interface_name)
Gets the first link-local address for the specified network interface.
Definition: ipv6.cpp:26
bool is_link_local(const in6_addr &address) noexcept
Tests if an IPv6 address has link-local scope.
Definition: ipv6.cpp:20
std::string to_string(const in6_addr &address)
Produces a string representation of an IPv6 address.
Definition: ipv6.cpp:48