MCPcopy Create free account
hub / github.com/DNSCrypt/encrypted-dns-server / ancount_inc

Function ancount_inc

src/dns.rs:83–89  ·  view source on GitHub ↗
(packet: &mut [u8])

Source from the content-addressed store, hash-verified

81}
82
83fn ancount_inc(packet: &mut [u8]) -> Result<(), Error> {
84 let mut ancount = ancount(packet);
85 ensure!(ancount < 0xffff, "Too many answer records");
86 ancount += 1;
87 BigEndian::write_u16(&mut packet[6..], ancount);
88 Ok(())
89}
90
91#[inline]
92fn nscount(packet: &[u8]) -> u16 {

Callers 3

append_txt_certFunction · 0.85
serve_blocked_responseFunction · 0.85
serve_ip_responseFunction · 0.85

Calls 1

ancountFunction · 0.85

Tested by

no test coverage detected