Exemple #1
0
func doXfr(c *dns.Client, m *dns.Msg, nameserver string) {
	if t, e := c.XfrReceive(m, nameserver); e == nil {
		for r := range t {
			if r.Error == nil {
				for _, rr := range r.RR {
					if *short {
						rr = shortRR(rr)
					}
					fmt.Printf("%v\n", rr)
				}
			} else {
				fmt.Fprintf(os.Stderr, "Failure to read XFR: %s\n", r.Error.Error())
			}
		}
	} else {
		fmt.Fprintf(os.Stderr, "Failure to read XFR: %s\n", e.Error())
	}
}