Remove the non-working RawSetRdlength

Didn't work
This commit is contained in:
Miek Gieben 2011-12-17 20:14:10 +01:00
parent dd14200da0
commit b5c6ec8e5f
1 changed files with 5 additions and 1 deletions

View File

@ -12,11 +12,15 @@ package dns
// If buf does not look like a DNS message false is returned,
// otherwise true.
func (h *RR_Header) RawSetRdlength(buf []byte, off int) bool {
println(h.Name)
off1 := DomainNameLength(h.Name)
println("Lengte", off1)
println("len(buf)", len(buf))
println("off", off+off1+2+2+4+1)
if off1 == 0 || len(buf) < off+off1+2+2+4+1 {
return false
}
// + type(2) + class(2) + ttl(4) is where rdlength it at
// + type(2) + class(2) + ttl(4) is where rdlength is at
buf[off+off1+2+2+4], buf[off+off1+2+2+4+1] = packUint16(h.Rdlength)
return true
}