• Ian Gudger's avatar
    dns/dnsmessage: add support for parsing and packing of DNS messages · d379faa2
    Ian Gudger authored
    The Go standard library contains support for packing and unpacking of
    DNS messages, but it is not exported, doesn't follow Go style, and is
    not very well optimized. Low level DNS functionality is clearly useful
    to the Go community as evidenced by the success of
    github.com/miekg/dns. This implementation endeavors to avoid the
    limitations of both the standard library and github.com/miekg/dns
    implementations and is an almost complete rewrite of the code
    currently found in on net/dnsmsg.go and net/dnsmsg_test.go.
    
    Goals:
    * Minimize heap allocations.
    * Allow parsing only what is needed. Avoid unnecessary parsing and
      heap allocations for parts of the message that you don't care about.
      Parsing should be allowed on as small of a granularity as is useful,
      but no smaller as to avoid complicating the interface.
    * Parse and pack each byte of the message at most one time.
    
    Updates golang/go#16218
    Updates golang/go#10622
    
    Change-Id: Ib754d0007609a617d88be867f21c2feb15b6fcd7
    Reviewed-on: https://go-review.googlesource.com/35237
    Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
    d379faa2
Name
Last commit
Last update
bpf Loading commit data...
context Loading commit data...
dict Loading commit data...
dns/dnsmessage Loading commit data...
html Loading commit data...
http2 Loading commit data...
icmp Loading commit data...
idna Loading commit data...
internal Loading commit data...
ipv4 Loading commit data...
ipv6 Loading commit data...
lex/httplex Loading commit data...
lif Loading commit data...
nettest Loading commit data...
netutil Loading commit data...
proxy Loading commit data...
publicsuffix Loading commit data...
route Loading commit data...
trace Loading commit data...
webdav Loading commit data...
websocket Loading commit data...
xsrftoken Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
codereview.cfg Loading commit data...