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

Class: Net_DNS2_Packet

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

Class Overview


This is the base class that holds a standard DNS packet.


Author(s):

Variables

Methods


Child classes:

Net_DNS2_Packet_Request
This class handles building new DNS request packets; packets used for DNS queries and updates.
Net_DNS2_Packet_Response
This class handles building new DNS response packets; it parses binary packed packets that come off the wire

Inherited Variables

Inherited Methods


Class Details

[line 75]
This is the base class that holds a standard DNS packet.

The Net_DNS2_Packet_Request and Net_DNS2_Packet_Response classes extend this class.



[ Top ]


Class Variables

$additional = array()

[line 120]

  • Access: public

Type:   mixed


[ Top ]

$answer = array()

[line 107]

  • Access: public

Type:   mixed


[ Top ]

$authority = array()

[line 115]

  • Access: public

Type:   mixed


[ Top ]

$header =

[line 91]

  • Access: public

Type:   mixed


[ Top ]

$offset =  0

[line 86]

  • Access: public

Type:   mixed


[ Top ]

$question = array()

[line 99]

  • Access: public

Type:   mixed


[ Top ]

$rdata =

[line 80]

  • Access: public

Type:   mixed


[ Top ]

$rdlength =

[line 81]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

compress   [line 203]

string compress( string $name, integer &$offset)

applies a standard DNS name compression on the given name/offset

This logic was based on the Net::DNS::Packet::dn_comp() function by Michanel Fuhr

  • Access: public

Parameters:

string   $name   —  the name to be compressed
integer   &$offset   —  the offset into the given packet object

[ Top ]

copy   [line 394]

boolean copy( Net_DNS2_Packet $packet)

copies the contents of the given packet, to the local packet object. this function intentionally ignores some of the packet data.
  • Access: public

Parameters:

Net_DNS2_Packet   $packet   —  the DNS packet to copy the data from

[ Top ]

expand   [line 296]

mixed expand( Net_DNS2_Packet &$packet, integer &$offset)

expands the domain name stored at a given offset in a DNS Packet

This logic was based on the Net::DNS::Packet::dn_expand() function by Michanel Fuhr

  • Return: either the domain name or null if it's not found.
  • Access: public

Parameters:

Net_DNS2_Packet   &$packet   —  the DNS packet to look in for the domain name
integer   &$offset   —  the offset into the given packet object

[ Top ]

formatIPv6   [line 436]

string formatIPv6( string $address)

formats an IPv6 IP address in the preferred format
  • Return: The IPv6 IP address formatted in the new format
  • Deprecated: function deprecated in 1.1.3
  • Access: public

Parameters:

string   $address   —  The IPv6 IP address to format

[ Top ]

get   [line 166]

string get( )

returns a full binary DNS packet
  • Throws: Net_DNS2_Exception
  • Access: public

[ Top ]

label   [line 359]

mixed label( Net_DNS2_Packet &$packet, integer &$offset)

parses a domain label from a DNS Packet at the given offset
  • Return: either the domain name or null if it's not found.
  • Access: public

Parameters:

Net_DNS2_Packet   &$packet   —  the DNS packet to look in for the domain name
integer   &$offset   —  the offset into the given packet object

[ Top ]

pack   [line 262]

string pack( string $name)

applies a standard DNS name compression on the given name/offset

This logic was based on the Net::DNS::Packet::dn_comp() function by Michanel Fuhr

  • Access: public

Parameters:

string   $name   —  the name to be compressed

[ Top ]

reset   [line 412]

boolean reset( )

resets the values in the current packet object
  • Access: public

[ Top ]

__toString   [line 134]

string __toString( )

magic __toString() method to return the Net_DNS2_Packet as a string
  • Access: public

[ Top ]


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