Net::WDNS::Msg - Perl interface for libwdns messages
use Net::WDNS qw(:func);
... # get raw DNS packet
my $msg = parse_message($pkt);
print $msg->as_str, "\n";
Net::WDNS::Msg is an object interface to libwdns messages that allows introspection and rendering as human-readable strings.
Creates a new Net::WDNS::Msg object from a raw (wire-format) DNS packet. A slightly faster way to get message objects is to use the parse_message()
function provided by Net::WDNS.
Return the numeric id of this message.
Return a hash of flags and their statuses (0 or 1) for this message. Flags include qr, aa, tc, rd, ra, ad, and cd.
Return the raw bit-encoded integer reprenting the flags.
Return the string version of the rcode.
Return the numeric rcode.
Return the string version of the rcode.
Return the numeric opcode.
Return the QUESTION section of this message as an array (array ref in scalar context) containing Net::WDNS::Question objects.
Return the ANSWER section of this message as an array (array ref in scalar context) containing Net::WDNS::RR objects.
Return the AUTHORITY section of this message as an array (array ref in scalar context) containing Net::WDNS::RR objects.
Return the ADDITIONAL section of this message as an array (array ref in scalar context) containing Net::WDNS::RR objects.
Return a human-readable string representing this message. Message objects are also overloaded to render as strings when double-quoted.
Return the underlying raw message structure, suitable for passing to some utility functions provided by Net::WDNS.
Net::WDNS, Net::WDNS::Question, Net::WDNS::RR, Net::Nmsg
The wdns library can be downloaded from: https://github.com/farsightsec/wdns
Matthew Sisk, <sisk@cert.org>
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.