Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DnsRR Class Reference

resource record More...

List of all members.


Public Member Functions

  DnsRR ()
  constructor

  DnsRR (domainname NAME, u_int16 TYPE, u_int16 CLASS, u_int32 TTL)
  constructor taking some fields

  DnsRR (domainname NAME, u_int16 TYPE, u_int16 CLASS, u_int32 TTL, uint16_t RDLENGTH, const char *RDATA)
  constructor taking some fields

  DnsRR (const DnsRR &rr)
  copy constructor

DnsRR operator= (const DnsRR &rr)
  assignment operator

  ~DnsRR ()
  destructor


Public Attributes

domainname  NAME
  domain name

u_int16  TYPE
  RR type.

u_int16  CLASS
  class

u_int32  TTL
  time to live

u_int16  RDLENGTH
  length of RR data

char *  RDATA
  RR data.


Detailed Description

resource record

This class represents a resource record (RR), the fundamental building block of the DNS. A RR contains type-dependent information in its RDATA field, as well as some general information on the RR itself, such as its TTL.

Definition at line 199 of file dnsmessage.h.


Constructor & Destructor Documentation

DnsRR::DnsRR  ) 
 

constructor

This is the default constructor.

DnsRR::DnsRR domainname  NAME,
u_int16  TYPE,
u_int16  CLASS,
u_int32  TTL
 

constructor taking some fields

This constructor sets the values of many of the class members, but not for the RR data.

Parameters:
NAME  The domain name
TYPE  Resource Record type
CLASS  Class the RR is in
TTL  Time To Live for the RR

DnsRR::DnsRR domainname  NAME,
u_int16  TYPE,
u_int16  CLASS,
u_int32  TTL,
uint16_t  RDLENGTH,
const char *  RDATA
 

constructor taking some fields

This constructor sets the values of all class members, including the RR data.

Parameters:
NAME  The domain name
TYPE  Resource Record type
CLASS  Class the RR is in
TTL  Time To Live for the RR
RDLENGTH  Length of RR data
RDATA  RR data (this is copied into the RR)

DnsRR::DnsRR const DnsRR rr  ) 
 

copy constructor

This constructor copies the given RR. It dynamically allocates its own copy of the RRs RDATA field.

Parameters:
rr  Resource Record to copy

DnsRR::~DnsRR  ) 
 

destructor

Frees all memory associated with the RR, including the RDATA.


Member Function Documentation

DnsRR& DnsRR::operator= const DnsRR rr  ) 
 

assignment operator

The assignment operator works the same as the copy constructor.

Parameters:
rr  Resource Record to copy

Member Data Documentation

u_int16 DnsRR::CLASS
 

class

The DNS class the RR is in. See DnsQuestion::QCLASS for a list, except that it can not be QCLASS_ALL in this case. Defaults to CLASS_IN.

Definition at line 280 of file dnsmessage.h.

domainname DnsRR::NAME
 

domain name

The domain name the Resource Record is bound to. Defaults to the root domain.

Definition at line 264 of file dnsmessage.h.

char* DnsRR::RDATA
 

RR data.

Binary data for the RR. Use the RR functions from rr.h to interpret this field. Automatically freed upon destruction.

See also:
rr_tostring(), rr_getdomain(), rr_getmail(), ...

Definition at line 304 of file dnsmessage.h.

u_int16 DnsRR::RDLENGTH
 

length of RR data

The length in bytes of the data pointed to by RDATA.

Definition at line 295 of file dnsmessage.h.

u_int32 DnsRR::TTL
 

time to live

The time to live for the RR - that is, the time in seconds it may be stored in cache.

Definition at line 288 of file dnsmessage.h.

u_int16 DnsRR::TYPE
 

RR type.

The type of the RR. One of the constants defined in dnsdefs.h, for example DNS_TYPE_A or DNS_TYPE_MX (or the value of the rr_type.type field).

Definition at line 272 of file dnsmessage.h.


The documentation for this class was generated from the following file:
Generated on Fri Dec 24 19:55:16 2004 for Poslib by doxygen 1.3.7