[][src]Struct dnstap::DNSMessage

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: MessageTypesocket_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]

pub fn new(
    identity: Option<Vec<u8>>,
    version: Option<Vec<u8>>,
    message_type: MessageType
) -> DNSMessage
[src]

Returns a minimal DNS message

Trait Implementations

impl Into<DNSMessage> for AuthQuery[src]

impl Into<DNSMessage> for AuthResponse[src]

impl Into<DNSMessage> for ResolverQuery[src]

impl Into<DNSMessage> for ResolverResponse[src]

impl Into<DNSMessage> for ClientQuery[src]

impl Into<DNSMessage> for ClientResponse[src]

impl Clone for DNSMessage[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for DNSMessage[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for DNSMessage

impl Sync for DNSMessage

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]