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

Class: Net_DNS2

Source Location: /Net_DNS2-1.4.2/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 253]

  • Access: protected

Type:   mixed


[ Top ]

$cache =  null

[line 258]

  • Access: protected

Type:   mixed


[ Top ]

$cache_file =  '/tmp/net_dns2.cache'

[line 135]

  • Access: public

Type:   mixed


[ Top ]

$cache_serializer =  'serialize'

[line 151]

  • Access: public

Type:   mixed


[ Top ]

$cache_size =  50000

[line 140]

  • Access: public

Type:   mixed


[ Top ]

$cache_type =  'none'

[line 130]

  • Access: public

Type:   mixed


[ Top ]

$dnssec =  false

[line 191]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_ad_flag =  false

[line 203]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_cd_flag =  false

[line 211]

  • Access: public

Type:   mixed


[ Top ]

$dnssec_payload_size =  4000

[line 223]

  • Access: public

Type:   mixed


[ Top ]

$dns_port =  53

[line 99]

  • Access: public

Type:   mixed


[ Top ]

$domain =  ''

[line 120]

  • Access: public

Type:   mixed


[ Top ]

$last_exception =  null

[line 228]

  • Access: public

Type:   mixed


[ Top ]

$last_exception_list = array()

[line 233]

  • Access: public

Type:   mixed


[ Top ]

$local_host =  ''

[line 104]

  • Access: public

Type:   mixed


[ Top ]

$local_port =  0

[line 105]

  • Access: public

Type:   mixed


[ Top ]

$nameservers = array()

[line 238]

  • Access: public

Type:   mixed


[ Top ]

$ns_random =  false

[line 115]

  • Access: public

Type:   mixed


[ Top ]

$recurse =  true

[line 183]

  • Access: public

Type:   mixed


[ Top ]

$search_list = array()

[line 125]

  • Access: public

Type:   mixed


[ Top ]

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

[line 243]

  • Access: protected

Type:   mixed


[ Top ]

$sockets_enabled =  false

[line 248]

  • Access: protected

Type:   mixed


[ Top ]

$strict_query_mode =  false

[line 174]

  • Access: public

Type:   mixed


[ Top ]

$timeout =  5

[line 110]

  • Access: public

Type:   mixed


[ Top ]

$use_cache =  false

[line 263]

  • Access: protected

Type:   mixed


[ Top ]

$use_resolv_options =  false

[line 89]

  • Access: public

Type:   mixed


[ Top ]

$use_tcp =  false

[line 94]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 274]

Net_DNS2 __construct( [array $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 351]

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 743]

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 572]

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 867]

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 772]

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 790]

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 829]

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 886]

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 375]

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 647]

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 604]

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 Tue, 23 Aug 2016 04:00:04 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.