Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/dns_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,13 +1416,14 @@ impl DnsRecordExt for DnsNSec {
}
}

#[derive(PartialEq)]
#[derive(Debug, PartialEq)]
enum PacketState {
Init = 0,
Finished = 1,
}

/// A single packet for outgoing DNS message.
#[derive(Debug)]
pub struct DnsOutPacket {
/// All bytes in `data` is the actual packet on the wire.
data: Vec<u8>,
Expand Down Expand Up @@ -1915,12 +1916,6 @@ impl DnsOutgoing {
self.questions.push(q);
}

/// Returns a list of actual DNS packet data to be sent on the wire.
pub fn to_data_on_wire(&self) -> Vec<Vec<u8>> {
let packet_list = self.to_packets();
packet_list.into_iter().map(|p| p.data).collect()
}

/// Encode self into one or more packets.
pub fn to_packets(&self) -> Vec<DnsOutPacket> {
let mut packet_list = Vec::new();
Expand Down
Loading