remove some debugging code

This commit is contained in:
Miek Gieben 2010-12-23 17:10:06 +01:00
parent 04a18e9937
commit d1e5b182a7
4 changed files with 22 additions and 16 deletions

7
README
View File

@ -5,10 +5,15 @@ to send it.
The library is asynchronise (thanks to Go) from the get go.
Implemented RFCS
Implemented RFCS:
* RFC2671, EDNS
* RFC1034/1035
* RFC4033/4034/4035 (todo: validation)
* RFC5155 (NSEC)
Loosly based upon:
* ldns
* NSD
* Net::DNS

4
TODO
View File

@ -1,6 +1,10 @@
EDNS -- finish EDNS0 support
DNSSEC - validation and the remaining records, DS (encoding), NSEC and NSEC3
unknown RRs - if I ever get around to make it
convience functions
parsing from strings
"miek.nl IN A 192.168.1.2" -> <correct Go type>
in msg.go, clean out the code and put it in helper functions
quotes in quotes in txt records
fix os.Erros usage (extend or whatever)

5
msg.go
View File

@ -204,9 +204,7 @@ func packStructValue(val *reflect.StructValue, msg []byte, off int) (off1 int, o
msg[off+3] = byte(len(data))
off += 4
copy(msg[off:off+len(data)], []byte(data))
off += len(data) // +1??
println("data", data)
println("off", off)
off += len(data) // +1?? MG TODO
}
case "A":
if fv.Len() > net.IPv4len || off+fv.Len() > len(msg) {
@ -552,7 +550,6 @@ type Msg struct {
Question []Question
Answer []RR
Ns []RR
// EDNS0 has to be put in this section
Extra []RR
}

View File

@ -17,7 +17,7 @@ func TestResolverEdns(t *testing.T) {
m := new(Msg)
m.MsgHdr.Recursion_desired = true //only set this bit
m.Question = make([]Question, 1)
m.Extra = make([]RR, 1)
m.Ns = make([]RR, 1)
// Add EDNS rr
edns := new(RR_OPT)
@ -32,7 +32,7 @@ func TestResolverEdns(t *testing.T) {
// ask something
m.Question[0] = Question{"miek.nl", TypeSOA, ClassINET}
m.Extra[0] = edns
m.Ns[0] = edns
fmt.Printf("Sending: %v\n", m)