GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::DNS::TOOLKIT::RR::TYPE (3)

.ds Aq ’

NAME

Net::DNS::ToolKit::RR::TYPE - Unknown Resource Record Handler

CONTENTS

SYNOPSIS



  DO NOT use Net::DNS::ToolKit::RR::TYPE
  DO NOT require Net::DNS::ToolKit::RR::TYPE

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

  use Net::DNS::ToolKit::RR;
  ($get,$put,$parse) = new Net::DNS::ToolKit::RR;

  ($newoff,$name,$type,$class,$ttl,$rdlength,
        $textdata) = $get->UnknownType(\$buffer,$offset);

  Note: the $get->UnknownType method is normally called
  via:  @stuff = $get->next(\$buffer,$offset);

  ($newoff,@dnptrs)=$put->UnknownType(\$buffer,$offset,\@dnptrs,
        $name,$type,$class,$ttl,$rdlength,$textdata);

  $NAME,$TYPE,$CLASS,$TTL,$rdlength,$textdata)
    = $parse->UnknownType($name,$type,$class,$ttl,$rdlength,
        $textdata);



DESCRIPTION

<B>Net::DNS::ToolKit::RR:TYPEB> is loaded once for all unknown types and their methods redirected to the TYPE module. i.e. for TYPE61, this code snippet is autoloaded.



        package NET::DNS::ToolKit::RR::TYPE61
        *get   = \&Net::DNS::ToolKit::RR::TYPE::get;
        *put   = \&Net::DNS::ToolKit::RR::TYPEnn::put;
        *parse = \&Net::DNS::ToolKit::RR::TYPEnn::parse;

  Description from RFC3597

  5. Text Representation

   In the "type" field of a master file line, an unknown RR type is
   represented by the word "TYPE" immediately followed by the decimal RR
   type number, with no intervening whitespace.  In the "class" field,
   an unknown class is similarly represented as the word "CLASS"
   immediately followed by the decimal class number.

   This convention allows types and classes to be distinguished from
   each other and from TTL values, allowing the "[<TTL>] [<class>]
   <type> <RDATA>" and "[<class>] [<TTL>] <type> <RDATA>" forms of
   [RFC1035] to both be unambiguously parsed.

   The RDATA section of an RR of unknown type is represented as a
   sequence of white space separated words as follows:

      The special token \# (a backslash immediately followed by a hash
      sign), which identifies the RDATA as having the generic encoding
      defined herein rather than a traditional type-specific encoding.

      An unsigned decimal integer specifying the RDATA length in octets.

      Zero or more words of hexadecimal data encoding the actual RDATA
      field, each containing an even number of hexadecimal digits.

   If the RDATA is of zero length, the text representation contains only
   the \# token and the single zero representing the length.

        i.e.
        CLASS32     TYPE731         \# 6 abcd012345



o @stuff = $get->UnknownType(\$buffer,$offset);



  Get the contents of the resource record.

  USE: @stuff = $get->next(\$buffer,$offset);

  where: @stuff = (
  $newoff $name,$type,$class,$ttl,$rdlength,
  $TYPEdata );



All except the last item, <B>B>$textdata<B>B>, is provided by the class loader, <B>Net::DNS::ToolKit::RRB>. The code in this method knows how to retrieve <B>B>$TYPEdata<B>B>.



  input:        pointer to buffer,
                offset into buffer
  returns:      offset to next resource,
                @common RR elements,
                TYPEdata



o ($newoff,@dnptrs)=$put->UnknownType(\$buffer,$offset,\@dnptrs,
        $name,$type,$class,$ttl,$rdlength,$TYPEdata);

Append an unknown record to $buffer.



  where @common = (
        $name,$type,$class,$ttl);



The method will insert the $rdlength and $TYPEdata, then pass through the updated pointer to the array of compressed names

The class loader, <B>Net::DNS::ToolKit::RRB>, inserts the @common elements and returns updated @dnptrs. This module knows how to insert its RDATA and calculate the $rdlength.



  input:        pointer to buffer,
                offset (normally end of buffer),
                pointer to compressed name array,
                @common RR elements,
                TYPEdata
  output:       offset to next RR,
                new compressed name pointer array,
           or   empty list () on error.



o (@COMMON,$TYPEdata) = $parse->UnknownType(@common,$TYPEdata);

Converts binary/numeric field data into human readable form. The common RR elements are supplied by the class loader, <B>Net::DNS::ToolKit::RRB>. For UnknownType RR’s, this returns the hex string described in RFC3597



  input:        unknown binary
  returns:      hex string



DEPENDENCIES



        Net::DNS::ToolKit
        Net::DNS::Codes



EXPORT



        none



AUTHOR

Michael Robinton <michael@bizsystems.com>

COPYRIGHT



    Copyright 2003 - 2011, Michael Robinton <michael@bizsystems.com>



Michael Robinton <michael@bizsystems.com>

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either:



  a) the GNU General Public License as published by the Free
  Software Foundation; either version 2, or (at your option) any
  later version, or

  b) the "Artistic License" which comes with this distribution.



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 either the GNU General Public License or the Artistic License for more details.

You should have received a copy of the Artistic License with this distribution, in the file named Artistic. If not, I’ll be glad to provide one.

You should also have received a copy of the GNU General Public License along with this program in the file named Copying. If not, write to the



        Free Software Foundation, Inc.                       
        59 Temple Place, Suite 330
        Boston, MA  02111-1307, USA



or visit their web page on the internet at:



        http://www.gnu.org/copyleft/gpl.html.



See also:

Net::DNS::Codes(3), Net::DNS::ToolKit(3)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::DNS::TOOLKIT::RR::TYPE (3) 2011-11-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.