Struct trust_dns::op::DnsResponse [] [src]

pub struct DnsResponse(_);

A DNS response object

For Most DNS requests, only one response is expected, the exception is a multicast request.

Methods

impl DnsResponse
[src]

Important traits for Iter<'a, T>
[src]

Get all the messages in the Response

Important traits for IterMut<'a, T>
[src]

Get all the messages in the Response

[src]

returns the number of messages in the response

Methods from Deref<Target = Message>

[src]

Truncates a Message, this blindly removes all response fields and sets trucation to true

[src]

see Header::set_id

[src]

see Header::set_message_type

[src]

see Header::set_op_code

[src]

see Header::set_authoritative

[src]

see Header::set_truncated

[src]

see Header::set_recursion_desired

[src]

see Header::set_recursion_available

[src]

see Header::set_authentic_data

[src]

see Header::set_checking_disabled

[src]

see Header::set_response_code

[src]

Add a query to the Message, either the query response from the server, or the request Query.

[src]

Adds an iterator over a set of Queries to be added to the message

[src]

Add an answer to the Message

[src]

Add all the records from the iterator to the answers section of the Message

[src]

Sets the answers to the specified set of Records.

Panics

Will panic if answer records are already associated to the message.

[src]

Add a name server record to the Message

[src]

Add all the records in the Iterator to the name server section of the message

[src]

Sets the name_servers to the specified set of Records.

Panics

Will panic if name_servers records are already associated to the message.

[src]

A an addtional Record to the message

[src]

Sets the additional to the specified set of Records.

Panics

Will panic if additional records are already associated to the message.

[src]

Add the EDNS section the the Message

[src]

Add a SIG0 record, i.e. sign this message

This must be don't only after all records have been associated. Generally this will be handled by the client and not need to be used directly

[src]

see Header::id()

[src]

see Header::message_type()

[src]

see Header::op_code()

[src]

see Header::authoritative()

[src]

see Header::truncated()

[src]

see Header::recursion_desired()

[src]

see Header::recursion_available()

[src]

see Header::authentic_data()

[src]

see Header::checking_disabled()

[src]

Return value

The ResponseCode, if this is an EDNS message then this will join the section from the OPT record to create the EDNS ResponseCode

Important traits for &'a mut [u8]
[src]

Question        Carries the query name and other query parameters.

Important traits for &'a mut [u8]
[src]

Answer          Carries RRs which directly answer the query.

Important traits for Vec<u8>
[src]

Removes all the answers from the Message

Important traits for &'a mut [u8]
[src]

Authority       Carries RRs which describe other authoritative servers.
                May optionally carry the SOA RR for the authoritative
                data in the answer section.

Important traits for Vec<u8>
[src]

Remove the name servers from the Message

Important traits for &'a mut [u8]
[src]

Additional      Carries RRs which may be helpful in using the RRs in the
                other sections.

Important traits for Vec<u8>
[src]

Remove the additional Records from the Message

[src]

RFC 6891, EDNS(0) Extensions, April 2013

6.1.1.  Basic Elements

 An OPT pseudo-RR (sometimes called a meta-RR) MAY be added to the
 additional data section of a request.

 The OPT RR has RR type 41.

 If an OPT record is present in a received request, compliant
 responders MUST include an OPT record in their respective responses.

 An OPT record does not carry any DNS data.  It is used only to
 contain control information pertaining to the question-and-answer
 sequence of a specific transaction.  OPT RRs MUST NOT be cached,
 forwarded, or stored in or loaded from master files.

 The OPT RR MAY be placed anywhere within the additional data section.
 When an OPT RR is included within any DNS message, it MUST be the
 only OPT RR in that message.  If a query message with more than one
 OPT RR is received, a FORMERR (RCODE=1) MUST be returned.  The
 placement flexibility for the OPT RR does not override the need for
 the TSIG or SIG(0) RRs to be the last in the additional section
 whenever they are present.

Return value

Returns the EDNS record if it was found in the additional section.

[src]

If edns is_none, this will create a new default Edns.

[src]

Return value

the max payload value as it's defined in the EDNS section.

[src]

Return value

the version as defined in the EDNS record

Important traits for &'a mut [u8]
[src]

RFC 2535, Domain Name System Security Extensions, March 1999

A DNS request may be optionally signed by including one or more SIGs
 at the end of the query. Such SIGs are identified by having a "type
 covered" field of zero. They sign the preceding DNS request message
 including DNS header but not including the IP header or any request
 SIGs at the end and before the request RR counts have been adjusted
 for the inclusions of any request SIG(s).

Return value

The sig0, i.e. signed record, for verifying the sending and package integrity

[src]

Encodes the Message into a buffer

[src]

Finalize the message prior to sending.

Subsequent to calling this, the Message should not change.

Trait Implementations

impl Clone for DnsResponse
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Deref for DnsResponse
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl DerefMut for DnsResponse
[src]

[src]

Mutably dereferences the value.

impl From<SmallVec<[Message; 1]>> for DnsResponse
[src]

[src]

Performs the conversion.

impl From<Message> for DnsResponse
[src]

[src]

Performs the conversion.

impl From<DnsResponse> for Message
[src]

[src]

Performs the conversion.

impl Debug for DnsResponse
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for DnsResponse

impl Sync for DnsResponse