Struct dnstap::DNSMessage
[−]
[src]
pub struct DNSMessage {
pub identity: Option<Vec<u8>>,
pub version: Option<Vec<u8>>,
pub message_type: MessageType,
pub socket_family: Option<SocketFamily>,
pub socket_protocol: Option<SocketProtocol>,
pub query_address: Option<IpAddr>,
pub query_port: Option<u16>,
pub query_time: Option<Duration>,
pub query_packet: Option<Vec<u8>>,
pub response_address: Option<IpAddr>,
pub response_port: Option<u16>,
pub response_time: Option<Duration>,
pub response_packet: Option<Vec<u8>>,
pub bailiwick: Option<String>,
}A DNS message.
All properties are optional except the message type.
Although socket_family can be explicitly set, it can also be automatically
inferred from query_address or response_address if these are present.
Fields
identity: Option<Vec<u8>>
version: Option<Vec<u8>>
message_type: MessageType
socket_family: Option<SocketFamily>
socket_protocol: Option<SocketProtocol>
query_address: Option<IpAddr>
query_port: Option<u16>
query_time: Option<Duration>
query_packet: Option<Vec<u8>>
response_address: Option<IpAddr>
response_port: Option<u16>
response_time: Option<Duration>
response_packet: Option<Vec<u8>>
bailiwick: Option<String>
Methods
impl DNSMessage[src]
fn new(identity: Option<Vec<u8>>,
version: Option<Vec<u8>>,
message_type: MessageType)
-> DNSMessage
version: Option<Vec<u8>>,
message_type: MessageType)
-> DNSMessage
Returns a minimal DNS message
Trait Implementations
impl Clone for DNSMessage[src]
fn clone(&self) -> DNSMessage
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Hash for DNSMessage[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.