MCPcopy
hub / github.com/AdguardTeam/dnsproxy / AddPrefix

Function AddPrefix

proxyutil/dns.go:13–19  ·  view source on GitHub ↗

AddPrefix adds a 2-byte prefix with the DNS message length.

(b []byte)

Source from the content-addressed store, hash-verified

11
12// AddPrefix adds a 2-byte prefix with the DNS message length.
13func AddPrefix(b []byte) (m []byte) {
14 m = make([]byte, 2+len(b))
15 binary.BigEndian.PutUint16(m, uint16(len(b)))
16 copy(m[2:], b)
17
18 return m
19}
20
21// IPFromRR returns the IP address from rr if any.
22func IPFromRR(rr dns.RR) (ip netip.Addr) {

Callers 5

exchangeQUICMethod · 0.92
handleQUICStreamMethod · 0.92
respondQUICMethod · 0.92
sendQUICMessageFunction · 0.92

Calls

no outgoing calls

Tested by 3

handleQUICStreamMethod · 0.74
sendQUICMessageFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…