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

Function arcount_inc

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

Source from the content-addressed store, hash-verified

99}
100
101fn arcount_inc(packet: &mut [u8]) -> Result<(), Error> {
102 let mut arcount = arcount(packet);
103 ensure!(arcount < 0xffff, "Too many additional records");
104 arcount += 1;
105 BigEndian::write_u16(&mut packet[10..], arcount);
106 Ok(())
107}
108
109#[inline]
110fn arcount_clear(packet: &mut [u8]) -> Result<(), Error> {

Callers 1

add_edns_sectionFunction · 0.85

Calls 1

arcountFunction · 0.85

Tested by

no test coverage detected