Skip to content

Commit

Permalink
adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarsoo committed Feb 8, 2024
1 parent ee90222 commit dcb257a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnstp/src/byte/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions dnstp/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Bundling config for the server and client

#[derive(Clone)]
pub struct DomainConfig {
Expand Down
2 changes: 2 additions & 0 deletions dnstp/src/crypto/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Method for handling cryptography including ECDH shared secret derivation and symmetric key encryption

#[cfg(test)]
mod tests;

Expand Down
2 changes: 1 addition & 1 deletion dnstp/src/message/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 2 additions & 0 deletions dnstp/src/message_parser.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 2 additions & 0 deletions dnstp/src/net/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Network layer for binding and processing UDP traffic

pub mod socket;
pub mod raw_request;

Expand Down
1 change: 1 addition & 0 deletions dnstp/src/processor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Business-logic-like structures for processing parsed messages

pub mod request;
pub mod response;
Expand Down
2 changes: 2 additions & 0 deletions dnstp/src/string.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Utility functions for manipulating strings

use urlencoding::encode;

pub fn encode_domain_name(name: &String) -> Vec<u8>
Expand Down

0 comments on commit dcb257a

Please sign in to comment.