detect_dns_packet 0.1.6

A Rust library to detect DNS packets
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Debug, Error)]
pub enum DnsQueryParseError {
    // #[error("Insufficient data: required {required} more bytes at offset {offset}, but only {available} bytes available")]
    // InsufficientData {
    //     required: usize,
    //     offset: usize,
    //     available: usize,
    // },
    #[error("Out of bound parse")]
    OutOfBoundParse,
    #[error("UTF-8 parsing error: {0}")]
    Utf8Error(#[from] std::string::FromUtf8Error),
}