NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
dnsentry.h
Go to the documentation of this file.
1#ifndef DNSENTRY_H
2#define DNSENTRY_H
3
5#include <QString>
6
10
11namespace NetSim {
12
15
18
29class DNSEntry {
30public:
32 DNSEntry() = default;
33
43 DNSEntry(const QString &name, quint16 type, quint16 dnsClass, quint32 ttl = 0,
44 const QVector<quint8> &data = QVector<quint8>());
45
47 QString name() const;
48
50 quint16 type() const;
51
53 quint16 dnsClass() const;
54
56 quint32 ttl() const;
57
59 quint16 dataLength() const;
60
62 QVector<quint8> data() const;
63
64private:
66 QString m_name{};
67
69 quint16 m_type{0};
70
72 quint16 m_class{0};
73
75 quint32 m_ttl{0};
76
78 QVector<quint8> m_data{};
79};
80} // namespace NetSim
81
82#endif // DNSENTRY_H
Represents a DNS entry (Resource Record).
Definition dnsentry.h:29
QVector< quint8 > data() const
Returns the data associated with the entry.
Definition dnsentry.cpp:15
QString name() const
Returns the domain name.
Definition dnsentry.cpp:5
quint32 ttl() const
Returns the time-to-live value.
Definition dnsentry.cpp:11
quint16 dnsClass() const
Returns the class of the DNS entry.
Definition dnsentry.cpp:9
quint16 type() const
Returns the type of the DNS entry.
Definition dnsentry.cpp:7
quint16 dataLength() const
Returns the length of the data.
Definition dnsentry.cpp:13
DNSEntry()=default
Default constructor.
Contains the IPAddress class definition.
Definition logger.h:12
RRAttribute
Enumeration to represent various Resource Record attributes.
Definition dnsentry.h:14
@ TYPE
Definition dnsentry.h:14
@ CLASS
Definition dnsentry.h:14
@ FULL_DATA
Definition dnsentry.h:14
@ DATA_LENGTH
Definition dnsentry.h:14
@ NAME
Definition dnsentry.h:14
@ TTL
Definition dnsentry.h:14
@ DATA
Definition dnsentry.h:14