|
| | DnsOverTcpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
| |
| | DnsOverTcpLayer () |
| |
| | DnsOverTcpLayer (const DnsOverTcpLayer &other) |
| |
| uint16_t | getTcpMessageLength () |
| |
| void | setTcpMessageLength (uint16_t value) |
| |
|
void | computeCalculateFields () override |
| | Calculate the TCP message length field.
|
| |
| | DnsLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
| |
| | DnsLayer () |
| |
| | DnsLayer (const DnsLayer &other) |
| |
| DnsLayer & | operator= (const DnsLayer &other) |
| |
| dnshdr * | getDnsHeader () const |
| |
| DnsQuery * | getQuery (const std::string &name, bool exactMatch) const |
| |
| DnsQuery * | getFirstQuery () const |
| |
| DnsQuery * | getNextQuery (DnsQuery *query) const |
| |
| size_t | getQueryCount () const |
| |
| DnsQuery * | addQuery (const std::string &name, DnsType dnsType, DnsClass dnsClass) |
| |
| DnsQuery * | addQuery (DnsQuery *const copyQuery) |
| |
| bool | removeQuery (const std::string &queryNameToRemove, bool exactMatch) |
| |
| bool | removeQuery (DnsQuery *queryToRemove) |
| |
| DnsResource * | getAnswer (const std::string &name, bool exactMatch) const |
| |
| DnsResource * | getFirstAnswer () const |
| |
| DnsResource * | getNextAnswer (DnsResource *answer) const |
| |
| size_t | getAnswerCount () const |
| |
| DnsResource * | addAnswer (const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data) |
| |
| DnsResource * | addAnswer (DnsResource *const copyAnswer) |
| |
| bool | removeAnswer (const std::string &answerNameToRemove, bool exactMatch) |
| |
| bool | removeAnswer (DnsResource *answerToRemove) |
| |
| DnsResource * | getAuthority (const std::string &name, bool exactMatch) const |
| |
| DnsResource * | getFirstAuthority () const |
| |
| DnsResource * | getNextAuthority (DnsResource *authority) const |
| |
| size_t | getAuthorityCount () const |
| |
| DnsResource * | addAuthority (const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data) |
| |
| DnsResource * | addAuthority (DnsResource *const copyAuthority) |
| |
| bool | removeAuthority (const std::string &authorityNameToRemove, bool exactMatch) |
| |
| bool | removeAuthority (DnsResource *authorityToRemove) |
| |
| DnsResource * | getAdditionalRecord (const std::string &name, bool exactMatch) const |
| |
| DnsResource * | getFirstAdditionalRecord () const |
| |
| DnsResource * | getNextAdditionalRecord (DnsResource *additionalRecord) const |
| |
| size_t | getAdditionalRecordCount () const |
| |
| DnsResource * | addAdditionalRecord (const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data) |
| |
| DnsResource * | addAdditionalRecord (const std::string &name, DnsType dnsType, uint16_t customData1, uint32_t customData2, IDnsResourceData *data) |
| |
| DnsResource * | addAdditionalRecord (DnsResource *const copyAdditionalRecord) |
| |
| bool | removeAdditionalRecord (const std::string &additionalRecordNameToRemove, bool exactMatch) |
| |
| bool | removeAdditionalRecord (DnsResource *additionalRecordToRemove) |
| |
|
void | parseNextLayer () override |
| | Does nothing for this layer (DnsLayer is always last)
|
| |
| size_t | getHeaderLen () const override |
| |
| std::string | toString () const override |
| |
| OsiModelLayer | getOsiModelLayer () const override |
| |
| | ~Layer () override |
| |
| Layer * | getNextLayer () const |
| |
| Layer * | getPrevLayer () const |
| |
| ProtocolType | getProtocol () const |
| |
| bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
| |
| uint8_t * | getData () const |
| |
| size_t | getDataLen () const |
| |
| uint8_t * | getLayerPayload () const |
| |
| size_t | getLayerPayloadSize () const |
| |
| bool | isAllocatedToPacket () const |
| |
| void | copyData (uint8_t *toArr) const |
| |
| uint8_t * | getDataPtr (size_t offset=0) const override |
| |
|
| static bool | isDnsPort (uint16_t port) |
| |
| static bool | isDataValid (const uint8_t *data, size_t dataLen, bool dnsOverTcp=false) |
| |
| template<typename T , typename... Args> |
| Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| |
| template<typename T , typename TFallback , typename... Args> |
| Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| |
| template<typename T > |
| static bool | canReinterpretAs (const uint8_t *data, size_t dataLen) |
| | Check if the data is large enough to reinterpret as a type. More...
|
| |
Note: DNS over TCP can spread over more than one packet, but this implementation doesn't support this use-case and assumes the whole message fits in a single packet.
Represents the DNS over TCP layer. DNS over TCP is described here: https://tools.ietf.org/html/rfc7766 . It is very similar to DNS over UDP, except for one field: TCP message length which is added in the beginning of the message before the other DNS data properties. The rest of the data is similar.