libtins  3.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
Tins::DNS::soa_record Class Reference

Class that represents a Start Of Authority record. More...

#include <dns.h>

Public Member Functions

 soa_record ()
 Default constructor.
 
 soa_record (const DNS::resource &resource)
 Constructs a SOA record from a DNS::resource. More...
 
 soa_record (const uint8_t *buffer, uint32_t total_sz)
 Constructs a SOA record from a buffer. More...
 
 soa_record (const std::string &mname, const std::string &rname, uint32_t serial, uint32_t refresh, uint32_t retry, uint32_t expire, uint32_t minimum_ttl)
 Constructs a SOA record. More...
 
const std::string & mname () const
 Getter for the primary source name field. More...
 
const std::string & rname () const
 Getter for the responsible person name field. More...
 
uint32_t serial () const
 Getter for the serial number field. More...
 
uint32_t refresh () const
 Getter for the refresh field. More...
 
uint32_t retry () const
 Getter for the retry field. More...
 
uint32_t expire () const
 Getter for the expire field. More...
 
uint32_t minimum_ttl () const
 Getter for the minimum TTL field. More...
 
void mname (const std::string &value)
 Getter for the primary source name field. More...
 
void rname (const std::string &value)
 Getter for the responsible person name field. More...
 
void serial (uint32_t value)
 Getter for the serial number field. More...
 
void refresh (uint32_t value)
 Getter for the refresh field. More...
 
void retry (uint32_t value)
 Getter for the retry field. More...
 
void expire (uint32_t value)
 Getter for the expire field. More...
 
void minimum_ttl (uint32_t value)
 Getter for the minimum TTL field. More...
 
PDU::serialization_type serialize () const
 Serialize this SOA record. More...
 

Detailed Description

Class that represents a Start Of Authority record.

Constructor & Destructor Documentation

Tins::DNS::soa_record::soa_record ( const DNS::resource resource)

Constructs a SOA record from a DNS::resource.

Parameters
resourceThe resource from which to construct this record
Tins::DNS::soa_record::soa_record ( const uint8_t *  buffer,
uint32_t  total_sz 
)

Constructs a SOA record from a buffer.

Parameters
bufferThe buffer from which to construct this SOA record
total_szThe size of the buffer
Tins::DNS::soa_record::soa_record ( const std::string &  mname,
const std::string &  rname,
uint32_t  serial,
uint32_t  refresh,
uint32_t  retry,
uint32_t  expire,
uint32_t  minimum_ttl 
)

Constructs a SOA record.

Parameters
mnameThe primary source name
rnameThe responsible person name
serialThe serial number
refreshThe refresh value
retryThe retry value
expireThe expire value
minimum_ttlThe minimum TTL value

Member Function Documentation

uint32_t Tins::DNS::soa_record::expire ( ) const
inline

Getter for the expire field.

Returns
The expire field
void Tins::DNS::soa_record::expire ( uint32_t  value)

Getter for the expire field.

Parameters
valueThe new expire field value
uint32_t Tins::DNS::soa_record::minimum_ttl ( ) const
inline

Getter for the minimum TTL field.

Returns
The minimum TTL field
void Tins::DNS::soa_record::minimum_ttl ( uint32_t  value)

Getter for the minimum TTL field.

Parameters
valueThe new minimum TTL field value
const std::string& Tins::DNS::soa_record::mname ( ) const
inline

Getter for the primary source name field.

The returned domain name is already decoded.

Returns
mname The primary source name field
void Tins::DNS::soa_record::mname ( const std::string &  value)

Getter for the primary source name field.

Parameters
valueThe new primary source name field value
uint32_t Tins::DNS::soa_record::refresh ( ) const
inline

Getter for the refresh field.

Returns
The refresh field
void Tins::DNS::soa_record::refresh ( uint32_t  value)

Getter for the refresh field.

Parameters
valueThe new refresh field value
uint32_t Tins::DNS::soa_record::retry ( ) const
inline

Getter for the retry field.

Returns
The retry field
void Tins::DNS::soa_record::retry ( uint32_t  value)

Getter for the retry field.

Parameters
valueThe new retry field value
const std::string& Tins::DNS::soa_record::rname ( ) const
inline

Getter for the responsible person name field.

The returned domain name is already decoded.

Returns
mname The responsible person name field
void Tins::DNS::soa_record::rname ( const std::string &  value)

Getter for the responsible person name field.

Parameters
valueThe new responsible person name field value
uint32_t Tins::DNS::soa_record::serial ( ) const
inline

Getter for the serial number field.

Returns
The serial number field
void Tins::DNS::soa_record::serial ( uint32_t  value)

Getter for the serial number field.

Parameters
valueThe new serial number field value
PDU::serialization_type Tins::DNS::soa_record::serialize ( ) const

Serialize this SOA record.

Returns
The serialized SOA record

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