         2 read be> >>preference
         parse-name >>exchange ;
 
+: parse-srv ( -- srv )
+    srv new
+    2 read be> >>priority
+    2 read be> >>weight
+    2 read be> >>port
+    parse-name >>target ;
+
 GENERIC: parse-rdata ( n type -- obj )
 
 M: object parse-rdata drop read ;

M: NS parse-rdata 2drop parse-name <ns> ;
M: PTR parse-rdata 2drop parse-name <ptr> ;
M: SOA parse-rdata 2drop parse-soa ;

: parse-rr ( -- rr )
    rr new

TUPLE: mx preference exchange ;

TUPLE: soa mname rname serial refresh retry expire minimum ;

TUPLE: srv priority weight port target ;

TUPLE: a name ;
CONSTRUCTOR: <a> a ( name -- obj ) ;
