Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DnsQuestion Class Reference

DNS question object. More...

#include <dnsmessage.h>

+ Collaboration diagram for DnsQuestion:

Public Member Functions

 DnsQuestion ()
 DnsQuestion (const DnsQuestion &q)
 copy constructor
 DnsQuestion (domainname qname, u_int16 qtype, u_int16 qclass=1)
 ~DnsQuestion ()
DnsQuestionoperator= (const DnsQuestion &q)

Public Attributes

u_int16 QCLASS
 query class
domainname QNAME
 query domain name
u_int16 QTYPE
 query type

Detailed Description

DNS question object.

This object holds a DNS question object - an entry in the question section of a DNS message.

Constructor & Destructor Documentation

DnsQuestion::DnsQuestion ( )


This is the default constructor.

< Internet class

DnsQuestion::DnsQuestion ( const DnsQuestion q)

copy constructor

This constructor copies the given question.

qQuestion to copy
DnsQuestion::DnsQuestion ( domainname  qname,
u_int16  qtype,
u_int16  qclass = 1 


This constructor takes values for the various fields of the question structure.

qnameDomain name to query
qtypeType to query
qclassClass the data is in (or CLASS_IN if none specified)
qclassInternet class
DnsQuestion::~DnsQuestion ( )


Frees data associated with the object.

Member Function Documentation

DnsQuestion & DnsQuestion::operator= ( const DnsQuestion q)


This is the assignment operator. It works in the same way as the copy constructor.

Member Data Documentation

u_int16 DnsQuestion::QCLASS

query class

The class to query. This is mainly historical, the only class that is used nowadays is CLASS_IN (the internet). Other values as CLASS_HS for Hesiod, CLASS_CH for chaos, and CLASS_CS for CSNET. The QCLASS_ANY constant means you don't care what class, but this is usually not supported. The list of constants can be found in the dnsdefs.h header.

domainname DnsQuestion::QNAME

query domain name

Domain name to query for.

u_int16 DnsQuestion::QTYPE

query type

The type of data to query for. This can be a RR type constant (for example, DNS_TYPE_A), or a QTYPE_* constant (for example, QTYPE_ANY). These constants can be found in the dnsdefs.h header.

The documentation for this class was generated from the following files: