dns-parser
dns-parser copied to clipboard
Make it suitable for editing and writing packets
Not tested Only briefly tested for one application; allocation-intensive.
Note sure if it belongs to "dns-parser" project, may probably be as a separate crate.
May help employing proptest/QuickCheck way of doing fuzz test for dns-parser.
Intended use style:
let p : Packet;
let mut pp : PacketBuf = p.deep_clone();
// edit pp
let mut buf2 = Vec::with_capacity(1024);
let mut c = std::io::Cursor::new(&mut buf2);
pp.write_to(c)?;
s.send_to(&buf2, cla)?;
Resolves #40.