NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NetSim::DNSEntry Class Reference

Represents a DNS entry (Resource Record). More...

#include <dnsentry.h>

Public Member Functions

 DNSEntry ()=default
 Default constructor.
 
 DNSEntry (const QString &name, quint16 type, quint16 dnsClass, quint32 ttl=0, const QVector< quint8 > &data=QVector< quint8 >())
 Constructs a new DNSEntry.
 
QString name () const
 Returns the domain name.
 
quint16 type () const
 Returns the type of the DNS entry.
 
quint16 dnsClass () const
 Returns the class of the DNS entry.
 
quint32 ttl () const
 Returns the time-to-live value.
 
quint16 dataLength () const
 Returns the length of the data.
 
QVector< quint8 > data () const
 Returns the data associated with the entry.
 

Detailed Description

Represents a DNS entry (Resource Record).

This class provides a representation of a DNS entry or Resource Record (RR). A Resource Record contains data related to a specific domain name and can include the type of the record, its class, a time-to-live, and the data itself.

Constructor & Destructor Documentation

◆ DNSEntry() [1/2]

NetSim::DNSEntry::DNSEntry ( )
default

Default constructor.

◆ DNSEntry() [2/2]

DNSEntry::DNSEntry ( const QString &  name,
quint16  type,
quint16  dnsClass,
quint32  ttl = 0,
const QVector< quint8 > &  data = QVector<quint8>() 
)

Constructs a new DNSEntry.

Parameters
nameDomain name.
typeType of the DNS entry.
dnsClassClass of the DNS entry.
ttlTime-to-live value.
dataThe data associated with the entry.

Member Function Documentation

◆ data()

QVector< quint8 > DNSEntry::data ( ) const

Returns the data associated with the entry.

◆ dataLength()

quint16 DNSEntry::dataLength ( ) const

Returns the length of the data.

◆ dnsClass()

quint16 DNSEntry::dnsClass ( ) const

Returns the class of the DNS entry.

◆ name()

QString DNSEntry::name ( ) const

Returns the domain name.

◆ ttl()

quint32 DNSEntry::ttl ( ) const

Returns the time-to-live value.

◆ type()

quint16 DNSEntry::type ( ) const

Returns the type of the DNS entry.


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