Structure used to encode part of a DNS query.
More...
#include <inet.h>
Structure used to encode part of a DNS query.
Definition at line 397 of file inet.h.
Sets the entire header to zero.
Definition at line 423 of file inet.h.
Authoritative Answer Flag.
This bit is set to 1 in a response to indicate that the server that created the response is authoritative for the zone in which the domain name specified in the Question section is located. If it is 0, the response is non-authoritative.
Definition at line 406 of file inet.h.
uint16_t DNSHeader::flags |
uint16_t DNSHeader::identification |
A 16-bit identification number chosen by the client.
The server will reply with the same number so the client can match a response to a request.
Definition at line 399 of file inet.h.
nint16_t DNSHeader::numberOfAdditionalRRs |
Additional Record Count.
Specifies the number of resource records in the Additional section of the message.
Definition at line 418 of file inet.h.
Answer Record Count.
Specifies the number of resource records in the Answer section of the message.
Definition at line 416 of file inet.h.
nint16_t DNSHeader::numberOfAuthorityRRs |
Authority Record Count.
Specifies the number of resource records in the Authority section of the message.
Definition at line 417 of file inet.h.
Question Count.
Specifies the number of questions in the Question section of the message.
Definition at line 415 of file inet.h.
uint8_t DNSHeader::opcode |
Operation Code.
Definition at line 407 of file inet.h.
Query or Response.
Query:0, Response:1
Definition at line 408 of file inet.h.
Recursion Available.
Set to 1 or cleared to 0 in a response to indicate whether the server creating the response supports recursive queries. This can then be noted by the device that sent the query for future use.
Definition at line 411 of file inet.h.
Response Code.
This field indicates whether the query was successful (0) or not (nonzero)
Definition at line 409 of file inet.h.
Recursion Desired.
When set in a query, requests that the server receiving the query attempt to answer the query recursively, if the server supports recursive resolution. The value of this bit is not changed in the response.
Definition at line 404 of file inet.h.
uint8_t DNSHeader::reserved |
Truncation Flag.
When set to 1, indicates that the message was truncated due to its length being longer than the maximum permitted for the type of transport mechanism used. TCP doesn't have a length limit for messages, while UDP messages are limited to 512 bytes, so this bit being sent usually is an indication that the message was sent using UDP and was too long to fit. The client may need to establish a TCP session to get the full message. On the other hand, if the portion truncated was part of the Additional section, it may choose not to bother.
Definition at line 405 of file inet.h.
The documentation for this struct was generated from the following file:
- /home/jander/temp/etherdune/inet.h