dns/strconv.go

21 lines
635 B
Go
Raw Normal View History

2010-12-25 01:53:17 +11:00
package dns
2010-12-25 23:09:27 +11:00
// use scanner or ebnf
// Convert a string to an resource record. The string must fir on one line.
2010-12-25 01:53:17 +11:00
// miek.nl. 3600 IN A 192.168.1.1 // ok
// miek.nl. IN A 192.168.1.1 // ok, ttl may be omitted
// miek.nl. A 192.168.1.1 // ok, ttl and class omitted
// miek.nl. 3600 A 192.168.1.1 // ok, class omitted
// IN A 192.168.1.1 // not ok
2010-12-28 00:31:31 +11:00
func ParseString(s string) *RR {
// up to first whitespace is domainname
// next word is:
// <number> -> TTL
// IN|CH|HS -> Class
// <rest> -> Type
// When the type is seen, we can read the rest
// of the string in an rr-specific manner
return nil
2010-12-25 01:53:17 +11:00
}