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

Class: Net_DNS_Header

Source Location: /Net_DNS-1.0.7/Net/DNS/Header.php

Class Overview


Object representation of the HEADER section of a DNS packet


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Object representation of the HEADER section of a DNS packet

The Net_DNS::Header class contains the values of a DNS packet. It parses the header of a DNS packet or can generate the binary data representation of the packet. The format of the header is described in RFC1035.



[ Top ]


Class Variables

$aa =

[line 59]

The AA (authoritative answer) bit in a DNS packet header

The AA bit as described in RFC1035. AA is set to 1 if the answer is authoritative. It has no meaning if QR is set to 0.


Type:   mixed


[ Top ]

$ancount =

[line 106]

Number of answer RRs contained within the packet

16bit integer representing the number of answer resource records contained in the answer section of the DNS packet.

  • See: Net_DNS_RR class

Type:   integer


[ Top ]

$arcount =

[line 126]

Number of additional RRs within the packet

16bit integer representing the number of additional resource records contained in the additional section of the DNS packet.

  • See: Net_DNS_RR class

Type:   integer


[ Top ]

$id =

[line 39]

The packet's request id

The request id of the packet represented as a 16 bit integer.


Type:   mixed


[ Top ]

$nscount =

[line 116]

Number of authority RRs within the packet

16bit integer representing the number of authority (NS) resource records contained in the authority section of the DNS packet.

  • See: Net_DNS_RR class

Type:   integer


[ Top ]

$opcode =

[line 52]

The OPCODE name of this packet.

The string value (name) of the opcode for the DNS packet.


Type:   mixed


[ Top ]

$qdcount =

[line 96]

Number of questions contained within the packet

16bit integer representing the number of questions in the question section of the DNS packet.

  • See: Net_DNS_Question class

Type:   integer


[ Top ]

$qr =

[line 46]

The QR bit in a DNS packet header

The QR bit as described in RFC1035. QR is set to 0 for queries, and

  1. for repsones.


Type:   mixed


[ Top ]

$ra =

[line 80]

The RA (recursion available) bit in a DNS packet header

This bit is set to 1 by the DNS server if the server is willing to perform recursion.


Type:   mixed


[ Top ]

$rcode =

[line 86]

The RCODE name for this packet.

The string value (name) of the rcode for the DNS packet.


Type:   mixed


[ Top ]

$rd =

[line 73]

The RD (recursion desired) bit in a DNS packet header

This bit should be set to 1 in a query if recursion is desired by the DNS server.


Type:   mixed


[ Top ]

$tc =

[line 66]

The TC (truncated) bit in a DNS packet header

This flag is set to 1 if the response was truncated. This flag has no meaning in a query packet.


Type:   mixed


[ Top ]



Method Detail

Net_DNS_Header (Constructor)   [line 140]

object Net_DNS_Header Net_DNS_Header( [string $data = ''])

Initializes the default values for the Header object.

Builds a header object from either default values, or from a DNS packet passed into the constructor as $data

  • Access: public

Parameters:

string   $data   —  A DNS packet of which the header will be parsed.

[ Top ]

data   [line 252]

string data( )

Returns the binary data containing the properties of the header

Packs the properties of the Header object into a binary string suitable for using as the Header section of a DNS packet.

  • Return: binary representation of the header object
  • Access: public

[ Top ]

display   [line 199]

void display( )

Displays the properties of the header.

Displays the properties of the header.

  • Access: public

[ Top ]

string   [line 212]

string string( )

Returns a formatted string containing the properties of the header.
  • Return: a formatted string containing the properties of the header.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:41:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.