diff --git a/dnstp/src/byte/mod.rs b/dnstp/src/byte/mod.rs index f046323..41bee4e 100644 --- a/dnstp/src/byte/mod.rs +++ b/dnstp/src/byte/mod.rs @@ -1,4 +1,4 @@ -//! Utility functions for operating on bytes +//! Utility functions for operating on bytes including splitting multi-byte integers into bytes and vice versa #[cfg(test)] mod tests; diff --git a/dnstp/src/config.rs b/dnstp/src/config.rs index a5f9afa..3490288 100644 --- a/dnstp/src/config.rs +++ b/dnstp/src/config.rs @@ -1,3 +1,4 @@ +//! Bundling config for the server and client #[derive(Clone)] pub struct DomainConfig { diff --git a/dnstp/src/crypto/mod.rs b/dnstp/src/crypto/mod.rs index 5c16f5b..1a37695 100644 --- a/dnstp/src/crypto/mod.rs +++ b/dnstp/src/crypto/mod.rs @@ -1,3 +1,5 @@ +//! Method for handling cryptography including ECDH shared secret derivation and symmetric key encryption + #[cfg(test)] mod tests; diff --git a/dnstp/src/message/mod.rs b/dnstp/src/message/mod.rs index 4bebf4d..457754b 100644 --- a/dnstp/src/message/mod.rs +++ b/dnstp/src/message/mod.rs @@ -1,4 +1,4 @@ -//! Structures making up the DNS workflow including requests, responses and headers +//! Structures making up the DNS workflow including messages and headers pub mod header; pub mod question; pub mod message; diff --git a/dnstp/src/message_parser.rs b/dnstp/src/message_parser.rs index 9ba7e8c..3d33c7b 100644 --- a/dnstp/src/message_parser.rs +++ b/dnstp/src/message_parser.rs @@ -1,3 +1,5 @@ +//! Functions for constructing internal DNS structures from network message bytes + use crate::byte; use crate::message::{DNSMessage, Direction, DNSHeader, Opcode, ResponseCode, QuestionParseError, questions_from_bytes, records_from_bytes, RecordParseError}; use crate::net::NetworkMessage; diff --git a/dnstp/src/net/mod.rs b/dnstp/src/net/mod.rs index 79269ae..74405ab 100644 --- a/dnstp/src/net/mod.rs +++ b/dnstp/src/net/mod.rs @@ -1,3 +1,5 @@ +//! Network layer for binding and processing UDP traffic + pub mod socket; pub mod raw_request; diff --git a/dnstp/src/processor/mod.rs b/dnstp/src/processor/mod.rs index e8d1ffb..3bffa48 100644 --- a/dnstp/src/processor/mod.rs +++ b/dnstp/src/processor/mod.rs @@ -1,3 +1,4 @@ +//! Business-logic-like structures for processing parsed messages pub mod request; pub mod response; diff --git a/dnstp/src/string.rs b/dnstp/src/string.rs index 011e43d..e2cba13 100644 --- a/dnstp/src/string.rs +++ b/dnstp/src/string.rs @@ -1,3 +1,5 @@ +//! Utility functions for manipulating strings + use urlencoding::encode; pub fn encode_domain_name(name: &String) -> Vec