libDwmRDAP-0.1.4
Dwm::RDAP::IPv4Response Class Reference

Encapsulate an RDAP ip query response. More...

#include <DwmRDAPResponse.hh>

Inheritance diagram for Dwm::RDAP::IPv4Response:
Collaboration diagram for Dwm::RDAP::IPv4Response:

Public Member Functions

 IPv4Response ()
 Default constructor.
 
 IPv4Response (const Json::Value &jv)
 Construct from a Json::Value (a generic RDAP response).
 
DateTime LastChanged () const
 Returns the time of the 'last changed' event in the response. More...
 
std::pair< Ipv4Address, Ipv4Address > AddressRange () const
 Returns the address range in the response. More...
 
std::vector< Ipv4Prefix > Prefixes () const
 Returns the prefixes required to cover the address range in the response. More...
 
std::string Country () const
 Returns the country code in the response. More...
 
- Public Member Functions inherited from Dwm::RDAP::Response
 Response (const Json::Value &jv)
 

Detailed Description

Encapsulate an RDAP ip query response.

No data of our own, this just prevides some convenient member functions.

Member Function Documentation

◆ AddressRange()

std::pair<Ipv4Address,Ipv4Address> Dwm::RDAP::IPv4Response::AddressRange ( ) const

Returns the address range in the response.

If not found, both members of the returned pair will he set to INADDR_ANY.

◆ Country()

std::string Dwm::RDAP::IPv4Response::Country ( ) const

Returns the country code in the response.

If there was no country code, returns an empty string.

◆ LastChanged()

DateTime Dwm::RDAP::IPv4Response::LastChanged ( ) const

Returns the time of the 'last changed' event in the response.

If it doesn't exist, returns the UNIX epoch.

◆ Prefixes()

std::vector<Ipv4Prefix> Dwm::RDAP::IPv4Response::Prefixes ( ) const

Returns the prefixes required to cover the address range in the response.

If this fails, an empty vector will be returned.


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