 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 ) ;

: dns-MX-query ( name -- message ) MX IN dns-query ;
: dns-NS-query ( name -- message ) NS IN dns-query ;
: dns-TXT-query ( name -- message ) TXT IN dns-query ;

: read-TXT-strings ( byte-array -- strings )
    [

        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 ;
