Matt Sisk
and 1 contributors

NAME

Net::WDNS::RR - Perl interface for libwdns resource records

SYNOPSIS

  use Net::WDNS;

  ...

  my $msg = parse_message($pkt);
  for my $rr ($msg->answer) {
    print $rr->as_str, "\n";
  }

DESCRIPTION

Net::WDNS::RR is an object interface to the resource records of dns messages.

CONSTRUCTOR

new($name, $rrclass, $rrtype, $rrttl, @rdata)

Creates a new Net::WDNS::RR record from a raw (wire-format) domain name, rrclass, rrtype, rrttl, and rdata entries. This should never have to be called directly as record objects are provided the Net::WDNS::Msg objects.

METHODS

name()

Return the human-readable string version of the domain name of this record.

rrclass()

Return the string version of the rrclass of this record.

rrtype()

Return the string version of the rrtype of this record.

rrttl()

Return the TTL value of this record.

rdata()

Return as a list (array ref in scalar context) of the rdata portions of the record as Net::WDNS::RD objects.

name_raw()

Return the raw (wire format) domain name of this record.

rrclass_num()

Return the numeric rrclass of this record.

rrtype_num()

Return the numeric rrtype of this record.

as_str()

Return a human-readable string representing the record. Objects are also overloaded to render as strings when double-quoted.

SEE ALSO

Net::WDNS, Net::WDNS::Msg, Net::WDNS::Question, Net::WDNS::RD, Net::Nmsg

AUTHOR

Matthew Sisk, <sisk@cert.org>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Carnegie Mellon University

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, under the terms pursuant to Version 2, June 1991.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.