prepare for tsig

This commit is contained in:
Miek Gieben 2012-02-29 22:00:39 +01:00
parent c7d38a11f1
commit fb8858502b
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import (
var (
printf *bool
compress *bool
tsig *string
)
const dom = "whoami.miek.nl."
@ -109,10 +110,12 @@ func main() {
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to file")
printf = flag.Bool("print", false, "print replies")
compress = flag.Bool("compress", false, "compress replies")
tsig = flag.String("tisg", "", "use SHA1 hmac tsig: keyname:base64")
flag.Usage = func() {
flag.PrintDefaults()
}
flag.Parse()
tsig = tsig //TODO
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)
if err != nil {

View File

@ -55,7 +55,7 @@ const (
// The following values must be put in wireformat, so that the MAC can be calculated.
// RFC 2845, section 3.4.2. TSIG Variables.
type tsigWireFmt struct {
// From RR_HEADER
// From RR_Header
Name string "domain-name"
Class uint16
Ttl uint32