TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::IPv4AddressMask Class Reference

A combination of IP v4 address and network mask. More...

Inheritance diagram for ts::IPv4AddressMask:
Collaboration diagram for ts::IPv4AddressMask:

Public Member Functions

 IPv4AddressMask (const IPv4Address &a=IPv4Address(), const IPv4Address &m=IPv4Address())
 Default constructor. More...
 
IPv4Address broadcastAddress () const
 Get the associated broadcast address. More...
 
int maskSize () const
 Get the network mask size in bits. More...
 
virtual UString toString () const override
 Convert to a string object. More...
 

Public Attributes

IPv4Address address
 IPv4 address.
 
IPv4Address mask
 Network mask.
 

Detailed Description

A combination of IP v4 address and network mask.

Constructor & Destructor Documentation

◆ IPv4AddressMask()

ts::IPv4AddressMask::IPv4AddressMask ( const IPv4Address a = IPv4Address(),
const IPv4Address m = IPv4Address() 
)

Default constructor.

Parameters
[in]aIPv4 address.
[in]mNetwork mask.

Member Function Documentation

◆ maskSize()

int ts::IPv4AddressMask::maskSize ( ) const

Get the network mask size in bits.

Returns
The mask size (e.g. 24 for mask 255.255.255.0).

◆ broadcastAddress()

IPv4Address ts::IPv4AddressMask::broadcastAddress ( ) const

Get the associated broadcast address.

Returns
The associated broadcast address.

◆ toString()

virtual UString ts::IPv4AddressMask::toString ( ) const
overridevirtual

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.


The documentation for this class was generated from the following file: