mdns_parser/
lib.rs

1//! DNS parsing utility with a focus on mDNS service discovery.
2//!
3//! - [DnsIncoming] is the logic representation of an incoming DNS message.
4//! - [DnsOutgoing] is the logic representation of an outgoing DNS message.
5
6// log for logging (optional).
7#[cfg(feature = "logging")]
8use log::trace;
9
10#[cfg(not(feature = "logging"))]
11#[macro_use]
12mod log {
13    macro_rules! trace {
14        ($($arg:expr),*) => {
15            {
16                let _ = ($($arg),*); // avoid warnings about unused variables.
17            }
18        };
19    }
20}
21
22mod dns_parser;
23
24pub use dns_parser::{
25    ip_address_rr_type, DnsAddress, DnsEntryExt, DnsIncoming, DnsNSec, DnsOutgoing, DnsPointer,
26    DnsRecordBox, DnsRecordExt, DnsSrv, DnsTxt, RRType, TxtProperty, CLASS_CACHE_FLUSH, CLASS_IN,
27    FLAGS_AA, FLAGS_QR_QUERY, FLAGS_QR_RESPONSE, MAX_MSG_ABSOLUTE,
28};