Skip to main content

hickory_proto/op/
mod.rs

1/*
2 * Copyright (C) 2015 Benjamin Fry <benjaminfry@me.com>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//! Operations to send with a `Client` or server, e.g. `Query`, `Message`, or `UpdateMessage` can
18//! be used together to either query or update resource records sets.
19
20use core::time::Duration;
21
22mod dns_request;
23pub use dns_request::{DnsRequest, DnsRequestOptions};
24
25mod dns_response;
26pub use dns_response::DnsResponse;
27
28mod edns;
29pub use edns::{DEFAULT_MAX_PAYLOAD_LEN, Edns, EdnsFlags};
30
31mod header;
32pub use header::{Flags, Header, HeaderCounts, MessageType, Metadata};
33
34mod lower_query;
35pub use lower_query::LowerQuery;
36
37mod message;
38pub use message::{EmitAndCount, Message, emit_message_parts};
39
40mod op_code;
41pub use op_code::OpCode;
42
43mod query;
44pub use query::Query;
45
46mod response_code;
47pub use response_code::ResponseCode;
48
49mod serial_message;
50pub use serial_message::SerialMessage;
51
52pub mod update_message;
53pub use update_message::UpdateMessage;
54
55/// Default retry interval floor.  This value is somewhat arbitrary, but is based on
56/// observed, real-world latencies and offers the chance to send three queries in a
57/// second to maximize the chance of a successful response in periods of high packet
58/// loss without overwhelming upstream servers.
59pub const DEFAULT_RETRY_FLOOR: Duration = Duration::from_millis(333);