diff --git a/msg.go b/msg.go index 14fbbfd6..43a6bbe7 100644 --- a/msg.go +++ b/msg.go @@ -109,6 +109,7 @@ var Rr_str = map[uint16]string{ TypeOPT: "OPT", TypeDS: "DS", TypeDHCID: "DHCID", + TypeHIP: "HIP" TypeIPSECKEY: "IPSECKEY", TypeSSHFP: "SSHFP", TypeRRSIG: "RRSIG", diff --git a/parse_test.go b/parse_test.go index 34f155cf..c51b6577 100644 --- a/parse_test.go +++ b/parse_test.go @@ -409,3 +409,14 @@ moutamassey NS ns01.yahoodomains.jp. fmt.Printf("%s\n", x.RR) } } + +func ExampleHIP() { + h := `www.example.com. IN HIP ( 2 200100107B1A74DF365639CC39F1D578 + AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p + 9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQ + b1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D + rvs.example.com. )` + if hip, err := NewRR(h); err != nil { + fmt.Printf("%s\n", hip.String()) + } +} diff --git a/zscan_rr.go b/zscan_rr.go index ce1c31d3..ef257a41 100644 --- a/zscan_rr.go +++ b/zscan_rr.go @@ -406,7 +406,7 @@ func setHIP(h RR_Header, c chan lex, o, f string) (RR, *ParseError) { } <-c // _BLANK l = <-c // _STRING - rr.Hit = l.token // Can this have spaces? TODO + rr.Hit = l.token // This can not contain spaces, see RFC 5205 Section 6. <-c // _BLANK l = <-c // _STRING