NAME

Net::WDNS::Question - Perl interface for libwdns question records

SYNOPSIS

use Net::WDNS;

...

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

DESCRIPTION

Net::WDNS::Question is an object interface to to the question record of dns messages.

CONSTRUCTOR

new($name, $rrclass, $rrtype)

Creates a new Net::WDNS::Question record from a raw (wire-format) domain name, numeric rrclass and numeric rrtype. This should never have to be called directly as question objects are provided by Net::WDNS::Msg objects.

METHODS

name()

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

rrclass()

Return the string version of the rrclass of this query.

rrtype()

Return the string version of the rrtype of this query.

name_raw()

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

rrclass_num()

Return the numeric rrclass of this query.

rrtype_num()

Return the numeric rrtype of this query.

as_str()

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

SEE ALSO

Net::WDNS, Net::WDNS::Msg, Net::WDNS::RR, 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.