Author image Michael Vincent
and 1 contributors

NAME

Net::Frame::Layer::DNS::Question - DNS Question type object

SYNOPSIS

   use Net::Frame::Layer::DNS::Question qw(:consts);

   my $layer = Net::Frame::Layer::DNS::Question->new(
      name  => '',
      type  => NF_DNS_TYPE_A,
      class => NF_DNS_CLASS_IN,
   );
   $layer->pack;

   print 'RAW: '.$layer->dump."\n";

   # Read a raw layer
   my $layer = Net::Frame::Layer::DNS::Question->new(raw => $raw);

   print $layer->print."\n";
   print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
      if $layer->payload;

DESCRIPTION

This modules implements the encoding and decoding of the DNS Question object.

See also Net::Frame::Layer for other attributes and methods.

ATTRIBUTES

name

Question name (hostname / domain).

type

Record type requested. See CONSTANTS for more information.

class

Class type requested. See CONSTANTS for more information.

The following are inherited attributes. See Net::Frame::Layer for more information.

raw
payload
nextLayer

METHODS

new
new (hash)

Object constructor. You can pass attributes that will overwrite default ones. See SYNOPSIS for default values.

The following are inherited methods. Some of them may be overriden in this layer, and some others may not be meaningful in this layer. See Net::Frame::Layer for more information.

layer
computeLengths
computeChecksums
pack
unpack
encapsulate
getLength
getPayloadLength
print
dump

CONSTANTS

Load them: use Net::Frame::Layer::DNS::Question qw(:consts);

See Net::Frame::Layer::DNS::Constants for more information.

SEE ALSO

Net::Frame::Layer::DNS, Net::Frame::Layer

AUTHOR

Michael Vincent

COPYRIGHT AND LICENSE

Copyright (c) 2012, Michael Vincent

You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.