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

Class: Net_DNS2_Updater

Source Location: /Net_DNS2-1.4.1/Net/DNS2/Updater.php

Class Overview

Net_DNS2
   |
   --Net_DNS2_Updater

The main dynamic DNS updater class.


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: Net_DNS2

Net_DNS2::__construct()
Constructor - base constructor for the Resolver and Updater
Net_DNS2::autoload()
autoload call-back function; used to auto-load classes
Net_DNS2::cacheable()
a simple function to determine if the RR type is cacheable
Net_DNS2::checkServers()
checks the list of name servers to make sure they're set
Net_DNS2::expandIPv6()
formats the given IPv6 address as a fully expanded IPv6 address
Net_DNS2::expandUint32()
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.
Net_DNS2::isIPv4()
returns true/false if the given address is a valid IPv4 address
Net_DNS2::isIPv6()
returns true/false if the given address is a valid IPv6 address
Net_DNS2::sendPacket()
sends a standard Net_DNS2_Packet_Request packet
Net_DNS2::setServers()
sets the name servers to be used
Net_DNS2::signSIG0()
adds a SIG RR object for authentication
Net_DNS2::signTSIG()
adds a TSIG RR object for authentication

Class Details

[line 72]
The main dynamic DNS updater class.

This class provices functions to handle all defined dynamic DNS update requests as defined by RFC 2136.

This is separate from the Net_DNS2_Resolver class, as while the underlying protocol is the same, the functionality is completely different.

Generally, query (recursive) lookups are done against caching server, while update requests are done against authoratative servers.



[ Top ]


Method Detail

__construct (Constructor)   [line 90]

Net_DNS2_Updater __construct( string $zone, [array $options = null])

Constructor - builds a new Net_DNS2_Updater objected used for doing dynamic DNS updates
  • Throws: Net_DNS2_Exception
  • Access: public

Overrides Net_DNS2::__construct() (Constructor - base constructor for the Resolver and Updater)

Parameters:

string   $zone   —  the domain name to use for DNS updates
mixed   $options   —  an array of config options or null

[ Top ]

add   [line 163]

boolean add( Net_DNS2_RR $rr)

2.5.1 - Add To An RRset

RRs are added to the Update Section whose NAME, TYPE, TTL, RDLENGTH and RDATA are those being added, and CLASS is the same as the zone class. Any duplicate RRs will be silently ignored by the primary master.

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

Net_DNS2_RR   $rr   —  the Net_DNS2_RR object to be added to the zone

[ Top ]

checkExists   [line 327]

boolean checkExists( string $name, string $type)

2.4.1 - RRset Exists (Value Independent)

At least one RR with a specified NAME and TYPE (in the zone and class specified in the Zone Section) must exist.

For this prerequisite, a requestor adds to the section a single RR whose NAME and TYPE are equal to that of the zone RRset whose existence is required. RDLENGTH is zero and RDATA is therefore empty. CLASS must be specified as ANY to differentiate this condition from that of an actual RR whose RDLENGTH is naturally zero (0) (e.g., NULL). TTL is specified as zero (0).

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name for the prerequisite
string   $type   —  the RR type for the prerequisite

[ Top ]

checkNameInUse   [line 475]

boolean checkNameInUse( string $name)

2.4.4 - Name Is In Use

Name is in use. At least one RR with a specified NAME (in the zone and class specified by the Zone Section) must exist. Note that this prerequisite is NOT satisfied by empty nonterminals.

For this prerequisite, a requestor adds to the section a single RR whose NAME is equal to that of the name whose ownership of an RR is required. RDLENGTH is zero and RDATA is therefore empty. CLASS must be specified as ANY to differentiate this condition from that of an actual RR whose RDLENGTH is naturally zero (0) (e.g., NULL). TYPE must be specified as ANY to differentiate this case from that of an RRset existence test. TTL is specified as zero (0).

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name for the prerequisite

[ Top ]

checkNameNotInUse   [line 521]

boolean checkNameNotInUse( string $name)

2.4.5 - Name Is Not In Use

Name is not in use. No RR of any type is owned by a specified NAME. Note that this prerequisite IS satisfied by empty nonterminals.

For this prerequisite, a requestor adds to the section a single RR whose NAME is equal to that of the name whose nonownership of any RRs is required. RDLENGTH is zero and RDATA is therefore empty. CLASS must be specified as NONE. TYPE must be specified as ANY. TTL must be specified as zero (0).

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name for the prerequisite

[ Top ]

checkNotExists   [line 420]

boolean checkNotExists( string $name, string $type)

2.4.3 - RRset Does Not Exist

No RRs with a specified NAME and TYPE (in the zone and class denoted by the Zone Section) can exist.

For this prerequisite, a requestor adds to the section a single RR whose NAME and TYPE are equal to that of the RRset whose nonexistence is required. The RDLENGTH of this record is zero (0), and RDATA field is therefore empty. CLASS must be specified as NONE in order to distinguish this condition from a valid RR whose RDLENGTH is naturally zero (0) (for example, the NULL RR). TTL must be specified as zero (0).

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name for the prerequisite
string   $type   —  the RR type for the prerequisite

[ Top ]

checkValueExists   [line 382]

boolean checkValueExists( Net_DNS2_RR $rr)

2.4.2 - RRset Exists (Value Dependent)

A set of RRs with a specified NAME and TYPE exists and has the same members with the same RDATAs as the RRset specified here in this section. While RRset ordering is undefined and therefore not significant to this comparison, the sets be identical in their extent.

For this prerequisite, a requestor adds to the section an entire RRset whose preexistence is required. NAME and TYPE are that of the RRset being denoted. CLASS is that of the zone. TTL must be specified as zero (0) and is ignored when comparing RRsets for identity.

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

Net_DNS2_RR   $rr   —  the RR object to be used as a prerequisite

[ Top ]

delete   [line 194]

boolean delete( Net_DNS2_RR $rr)

2.5.4 - Delete An RR From An RRset

RRs to be deleted are added to the Update Section. The NAME, TYPE, RDLENGTH and RDATA must match the RR being deleted. TTL must be specified as zero (0) and will otherwise be ignored by the primary master. CLASS must be specified as NONE to distinguish this from an RR addition. If no such RRs exist, then this Update RR will be silently ignored by the primary master.

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

Net_DNS2_RR   $rr   —  the Net_DNS2_RR object to be deleted from the zone

[ Top ]

deleteAll   [line 279]

boolean deleteAll( string $name)

2.5.3 - Delete All RRsets From A Name

One RR is added to the Update Section whose NAME is that of the name to be cleansed of RRsets. TYPE must be specified as ANY. TTL must be specified as zero (0) and is otherwise not used by the primary master. CLASS must be specified as ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty. If no such RRsets exist, then this Update RR will be silently ignored by the primary master.

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name to be removed from the zone

[ Top ]

deleteAny   [line 229]

boolean deleteAny( string $name, string $type)

2.5.2 - Delete An RRset

One RR is added to the Update Section whose NAME and TYPE are those of the RRset to be deleted. TTL must be specified as zero (0) and is otherwise not used by the primary master. CLASS must be specified as ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty. If no such RRset exists, then this Update RR will be silently ignored by the primary master

  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

string   $name   —  the RR name to be removed from the zone
string   $type   —  the RR type to be removed from the zone

[ Top ]

packet   [line 555]

Net_DNS2_Packet_Request packet( )

returns the current internal packet object.
  • Access: public

[ Top ]

signature   [line 143]

boolean signature( string $keyname, string $signature)

add a signature to the request for authentication

Parameters:

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

[ Top ]

update   [line 592]

boolean update( [Net_DNS2_Packet_Response &$response = null])

executes the update request with the object informaton
  • Throws: Net_DNS2_Exception
  • Access: public

Parameters:

Net_DNS2_Packet_Response   &$response   —  ref to the response object

[ Top ]


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