mirror of
https://github.com/miekg/dns.git
synced 2025-08-18 07:26:58 +02:00
Still need to handle the domain name packer, so that we can detect we have an OPT RR, with the different encoding
20 lines
448 B
Go
20 lines
448 B
Go
package dns
|
|
|
|
// Test EDNS RR records
|
|
import (
|
|
"testing"
|
|
"fmt"
|
|
)
|
|
|
|
func TestEDNS_RR(t *testing.T) {
|
|
edns := new(RR_OPT)
|
|
edns.Hdr.Name = "." // must . be for edns
|
|
edns.Hdr.Rrtype = TypeOPT
|
|
edns.Hdr.Class = ClassINET
|
|
edns.Hdr.Ttl = 3600
|
|
edns.Option = make([]Option, 1)
|
|
edns.Option[0].Code = OptionCodeNSID
|
|
edns.Option[0].Data = "lalalala"
|
|
fmt.Printf("%v\n", edns)
|
|
}
|