Net::DNS::ToolKit::Question - Resource Handler


Net-DNS-ToolKit documentation  | view source Contained in the Net-DNS-ToolKit distribution.

Index


NAME

Top

Net::DNS::ToolKit::Question - Resource Handler

SYNOPSIS

Top

  DO NOT use Net::DNS::ToolKit::Question
  DO NOT require Net::DNS::ToolKit::Question

  Net::DNS::ToolKit::Question is autoloaded by
  class Net::DNS::ToolKit::RR and its methods
  are instantiated in a 'special' manner.

DESCRIPTION

Top

* ($newoff,$name,$type,$class) = $get->Question(\$buffer,$offset);

Get question from $buffer. Returns the expanded name, type and class.

  input:	pointer to buffer,
		offset into buffer
  returns:	new offset,
		expanded name,
		type,
		class

* ($newoff,@dnptrs) = $put->Question(\$buffer,$offset, $name,$type,$class,\@dnptrs);

Append a question to the $buffer. Returns a new pointer array for compressed names and the offset to the next RR.

NOTE: it is up to the user to update the question count. See: put_qdcount

Since the question usually is the first record to be appended to the buffer, @dnptrs may be ommitted. See the details at dn_comp.

Usage: ($newoff,@dnptrs)=$put->Question(\$buffer,$offset, $name,$type,$class);

  input:	pointer to buffer,
		offset into buffer,
		domain name,
		question type,
		question class,
		pointer to array of
		  previously compressed names,
  returns:	offset to next record,
		updated array of offsets to
		  previous compressed names
=cut

sub put { my($self,$bp,$off,$name,$type,$class,$dp) = @_; ($off, my @dnptrs)=dn_comp($bp,$off,\$name,$dp); $off = put16($bp,$off,$type); if (! $class && exists $self->{class}) { $class = $self->{class}; } $off = put16($bp,$off,$class); return $off unless wantarray; return($off,@dnptrs); }

* ($name,$typeTXT,$classTXT) = $parse->Question($name,$type,$class);

Convert non-printable and numeric data into ascii text.

  input:	domain name,
		question type (numeric)
		question class (numeric)
  returns:	domain name,
		type TEXT,
		class TEXT

DEPENDENCIES

Top

	Net::DNS::ToolKit

EXPORT

Top

	none

AUTHOR

Top

Michael Robinton <michael@bizsystems.com>

COPYRIGHT

Top

See also:

Top

Net::DNS::ToolKit(3)


Net-DNS-ToolKit documentation  | view source Contained in the Net-DNS-ToolKit distribution.