ipaddress 1.1.0
Loading...
Searching...
No Matches
ip-any-network.hpp File Reference

Defines the ip_network class for representing both IPv4 and IPv6 networks. More...

#include "ipv4-network.hpp"
#include "ipv6-network.hpp"
#include "ip-any-address.hpp"
#include "ip-any-iterator.hpp"

Go to the source code of this file.

Classes

class  ip_network
 A class that encapsulates both IPv4 and IPv6 network functionalities. More...
 

Namespaces

namespace  ipaddress
 Namespace dedicated to IP addresses and networks operations.
 

Functions

template<fixed_string FixedString>
consteval inline ip_network operator""_net () noexcept
 User-defined literal operator for creating an ip_network object from a string literal.
 

Detailed Description

Defines the ip_network class for representing both IPv4 and IPv6 networks.

Author
Vladimir Shaleev

This file includes the definition of the ip_network class, which is a versatile representation of an IP network that can handle both IPv4 and IPv6 addresses. It provides methods to retrieve network properties such as the network and broadcast addresses, netmask, and hostmask, as well as to check for various types of networks like multicast, private, global, reserved, loopback, link-local, unspecified, site-local and etc.

It integrates the ipv4_network and ipv6_network classes through a union, ensuring optimal space usage while maintaining the ability to represent both IP networks versions. This file is part of a larger library that aims to provide comprehensive support for network operations.