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

Class: Net_DNS2

Source Location: /Net_DNS2-1.4.0/Net/DNS2.php

Class Overview


This is the base class for the Net_DNS2_Resolver and Net_DNS2_Updater classes.


Author(s):

Variables

Methods


Child classes:

Net_DNS2_Updater
The main dynamic DNS updater class.
Net_DNS2_Resolver
This is the main resolver class, providing DNS query functions.

Inherited Variables

Inherited Methods


Class Details

[line 70]
This is the base class for the Net_DNS2_Resolver and Net_DNS2_Updater classes.


[ Top ]


Class Variables

$auth_signature =  null

[line 241]

  • Access: protected

Type:   mixed


[ Top ]

$cache =  null

[line 246]

  • Access: protected

Type:   mixed


[ Top ]

$cache_file =  '/tmp/net_dns2.cache'

[line 126]

  • Access: public

Type:   mixed


[ Top ]

$cache_serializer =  'serialize'

[line 142]

  • Access: public

Type:   mixed


[ Top ]

$cache_size =  10000

[line 131]

  • Access: public

Type:   mixed


[ Top ]

$cache_type =  'none'

[line 121]

  • Access: public

Type:   mixed


[ Top ]

$dnssec =  false

[line 182]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_ad_flag =  false

[line 194]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_cd_flag =  false

[line 202]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_payload_size =  1280

[line 211]

  • Access: public

Type:   mixed


[ Top ]

$dns_port =  53

[line 90]

  • Access: public

Type:   mixed


[ Top ]

$domain =  ''

[line 111]

  • Access: public

Type:   mixed


[ Top ]

$last_exception =  null

[line 216]

  • Access: public

Type:   mixed


[ Top ]

$last_exception_list = array()

[line 221]

  • Access: public

Type:   mixed


[ Top ]

$local_host =  ''

[line 95]

  • Access: public

Type:   mixed


[ Top ]

$local_port =  0

[line 96]

  • Access: public

Type:   mixed


[ Top ]

$nameservers = array()

[line 226]

  • Access: public

Type:   mixed


[ Top ]

$ns_random =  false

[line 106]

  • Access: public

Type:   mixed


[ Top ]

$recurse =  true

[line 174]

  • Access: public

Type:   mixed


[ Top ]

$search_list = array()

[line 116]

  • Access: public

Type:   mixed


[ Top ]

$sock = array('udp' => array(),'tcp'=>array())

[line 231]

  • Access: protected

Type:   mixed


[ Top ]

$sockets_enabled =  false

[line 236]

  • Access: protected

Type:   mixed


[ Top ]

$strict_query_mode =  false

[line 165]

  • Access: public

Type:   mixed


[ Top ]

$timeout =  5

[line 101]

  • Access: public

Type:   mixed


[ Top ]

$use_cache =  false

[line 251]

  • Access: protected

Type:   mixed


[ Top ]

$use_tcp =  false

[line 85]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 262]

Net_DNS2 __construct( [ $options = null])

Constructor - base constructor for the Resolver and Updater
  • Throws: Net_DNS2_Exception
  • Access: public

Overridden in child classes as:

Net_DNS2_Updater::__construct()
Constructor - builds a new Net_DNS2_Updater objected used for doing dynamic DNS updates
Net_DNS2_Resolver::__construct()
Constructor - creates a new Net_DNS2_Resolver object

Parameters:

mixed   $options     array of options or null for none

[ Top ]

autoload   [line 331]

void autoload( string $name)

autoload call-back function; used to auto-load classes
  • Access: public

Parameters:

string   $name     the name of the class

[ Top ]

cacheable   [line 663]

bool cacheable( stream $_type)

a simple function to determine if the RR type is cacheable
  • Return: returns true/false if the RR type if cachable
  • Access: public

Parameters:

stream   $_type     the RR type string

[ Top ]

checkServers   [line 492]

boolean checkServers( [mixed $default = null])

checks the list of name servers to make sure they're set
  • Throws: Net_DNS2_Exception
  • Access: protected

Parameters:

mixed   $default     a path to a resolv.conf file or an array of servers.

[ Top ]

expandIPv6   [line 787]

string expandIPv6( string $_address)

formats the given IPv6 address as a fully expanded IPv6 address
  • Return: the fully expanded IPv6 address
  • Access: public

Parameters:

string   $_address     the IPv6 address to expand

[ Top ]

expandUint32   [line 692]

string expandUint32( string $_int)

PHP doesn't support unsigned integers, but many of the RR's return unsigned values (like SOA), so there is the possibility that the value will overrun on 32bit systems, and you'll end up with a negative value.

64bit systems are not affected, as their PHP_IN_MAX value should be 64bit (ie 9223372036854775807)

This function returns a negative integer value, as a string, with the correct unsigned value.

  • Return: returns the unsigned value as a string.
  • Access: public

Parameters:

string   $_int     the unsigned integer value to check

[ Top ]

isIPv4   [line 710]

boolean isIPv4( string $_address)

returns true/false if the given address is a valid IPv4 address
  • Return: returns true/false if the address is IPv4 address
  • Access: public

Parameters:

string   $_address     the IPv4 address to check

[ Top ]

isIPv6   [line 749]

boolean isIPv6( string $_address)

returns true/false if the given address is a valid IPv6 address
  • Return: returns true/false if the address is IPv6 address
  • Access: public

Parameters:

string   $_address     the IPv6 address to check

[ Top ]

sendPacket   [line 840]

mixed sendPacket( Net_DNS2_Packet $request, boolean $use_tcp)

sends a standard Net_DNS2_Packet_Request packet
  • Return: returns a Net_DNS2_Packet_Response object, or false on error
  • Throws: Net_DNS2_Exception
  • Access: protected

Parameters:

Net_DNS2_Packet   $request     a Net_DNS2_Packet_Request object
boolean   $use_tcp     true/false if the function should use TCP for the request

[ Top ]

setServers   [line 355]

boolean setServers( mixed $nameservers)

sets the name servers to be used
  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

mixed   $nameservers     either an array of name servers, or a file name to parse, assuming it's in the resolv.conf format

[ Top ]

signSIG0   [line 567]

boolean signSIG0( string $filename)

adds a SIG RR object for authentication
  • Throws: Net_DNS2_Exception
  • Since: function available since release 1.1.0
  • Access: public

Parameters:

string   $filename     the name of a file to load the signature from.

[ Top ]

signTSIG   [line 524]

boolean signTSIG( string $keyname, [string $signature = ''], [string $algorithm = Net_DNS2_RR_TSIG::HMAC_MD5])

adds a TSIG RR object for authentication
  • Since: function available since release 1.1.0
  • Access: public

Parameters:

string   $keyname     the key name to use for the TSIG RR
string   $signature     the key to sign the request.
string   $algorithm     the algorithm to use

[ Top ]


Documentation generated on Mon, 15 Dec 2014 05:30:10 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.