Net_DNS2
[ class tree: Net_DNS2 ] [ index: Net_DNS2 ] [ all elements ]

Class: Net_DNS2_RR_OPT

Source Location: /Net_DNS2-1.4.1/Net/DNS2/RR/OPT.php

Class Overview

Net_DNS2_RR
   |
   --Net_DNS2_RR_OPT

OPT Resource Record - RFC2929 section 3.1


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Net_DNS2_RR

Net_DNS2_RR::__construct()
Constructor - builds a new Net_DNS2_RR object
Net_DNS2_RR::buildString()
builds an array of strings from an array of chunks of text split by spaces
Net_DNS2_RR::cleanString()
cleans up some RR data
Net_DNS2_RR::formatString()
return a formatted string; if a string has spaces in it, then return it with double quotes around it, otherwise, return it as it was passed in.
Net_DNS2_RR::fromString()
parses a standard RR format lines, as defined by rfc1035 (kinda)
Net_DNS2_RR::get()
returns a binary packed DNS RR object
Net_DNS2_RR::parse()
parses a binary packet, and returns the appropriate Net_DNS2_RR object, based on the RR type of the binary content.
Net_DNS2_RR::rrFromString()
abstract definition - parses a RR from a standard DNS config line
Net_DNS2_RR::rrGet()
abstract definition - returns a binary packet DNS RR object
Net_DNS2_RR::rrSet()
abstract definition - sets a Net_DNS2_RR from a Net_DNS2_Packet object
Net_DNS2_RR::rrToString()
abstract definition - method to return a RR as a string; not to be confused with the __toString() magic method.
Net_DNS2_RR::set()
builds a new Net_DNS2_RR object
Net_DNS2_RR::__toString()
magic __toString() method to return the Net_DNS2_RR object object as a string

Class Details

[line 73]
OPT Resource Record - RFC2929 section 3.1

+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | OPTION-CODE | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | OPTION-LENGTH | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | / OPTION-DATA / / / +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+



[ Top ]


Class Variables

$do =

[line 103]

  • Access: public

Type:   mixed


[ Top ]

$extended_rcode =

[line 93]

  • Access: public

Type:   mixed


[ Top ]

$option_code =

[line 78]

  • Access: public

Type:   mixed


[ Top ]

$option_data =

[line 88]

  • Access: public

Type:   mixed


[ Top ]

$option_length =

[line 83]

  • Access: public

Type:   mixed


[ Top ]

$version =

[line 98]

  • Access: public

Type:   mixed


[ Top ]

$z =

[line 108]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 123]

Net_DNS2_RR_OPT __construct( [Net_DNS2_Packet &$packet = null], [array $rr = null])

Constructor - builds a new Net_DNS2_RR_OPT object; normally you wouldn't call this directly, but OPT RR's are a little different
  • Throws: Net_DNS2_Exception
  • Access: public

Overrides Net_DNS2_RR::__construct() (Constructor - builds a new Net_DNS2_RR object)

Parameters:

Net_DNS2_Packet   &$packet   —  a Net_DNS2_Packet packet or null to create an empty object
array   $rr   —  an array with RR parse values or null to create an empty object

[ Top ]

preBuild   [line 240]

void preBuild( )

pre-builds the TTL value for this record; we needed to separate this out from the rrGet() function, as the logic in the Net_DNS2_RR packs the TTL value before it builds the rdata value.
  • Access: protected

[ Top ]

rrFromString   [line 172]

boolean rrFromString( array $rdata)

parses the rdata portion from a standard DNS config line. There is no definition for parsing a OPT RR by string- this is just here to validate the binary parsing / building routines.
  • Access: protected

Overrides Net_DNS2_RR::rrFromString() (abstract definition - parses a RR from a standard DNS config line)

Parameters:

array   $rdata   —  a string split line of values for the rdata

[ Top ]

rrGet   [line 266]

mixed rrGet( Net_DNS2_Packet &$packet)

returns the rdata portion of the DNS packet
  • Return: either returns a binary packed string or null on failure
  • Access: protected

Overrides Net_DNS2_RR::rrGet() (abstract definition - returns a binary packet DNS RR object)

Parameters:

Net_DNS2_Packet   &$packet   —  a Net_DNS2_Packet packet use for compressed names

[ Top ]

rrSet   [line 197]

boolean rrSet( Net_DNS2_Packet &$packet)

parses the rdata of the Net_DNS2_Packet object
  • Access: protected

Overrides Net_DNS2_RR::rrSet() (abstract definition - sets a Net_DNS2_RR from a Net_DNS2_Packet object)

Parameters:

Net_DNS2_Packet   &$packet   —  a Net_DNS2_Packet packet to parse the RR from

[ Top ]

rrToString   [line 156]

string rrToString( )

method to return the rdata portion of the packet as a string. There is no defintion for returning an OPT RR by string- this is just here to validate the binary parsing / building routines.
  • Access: protected

Overrides Net_DNS2_RR::rrToString() (abstract definition - method to return a RR as a string; not to be confused with the __toString() magic method.)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:01:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.