LLQueryResponder Class Reference

Base class for friendly handling of DNS query responses. More...

#include <llares.h>

Inheritance diagram for LLQueryResponder:

Inheritance graph
[legend]
Collaboration diagram for LLQueryResponder:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLQueryResponder ()
bool valid () const
int result () const
const std::string & query () const
const dns_rrs_tanswers () const
const dns_rrs_tauthorities () const
const dns_rrs_tadditional () const

Protected Member Functions

int parseRR (const char *buf, size_t len, const char *&pos, LLPointer< LLDnsRecord > &r)
int parseSection (const char *buf, size_t len, size_t count, const char *&pos, dns_rrs_t &rrs)
void queryResult (const char *buf, size_t len)
virtual void queryResult ()

Protected Attributes

int mResult
std::string mQuery
LLResType mType
dns_rrs_t mAnswers
dns_rrs_t mAuthorities
dns_rrs_t mAdditional


Detailed Description

Base class for friendly handling of DNS query responses.

This class parses a DNS response and represents it in a friendly manner.

See also:
LLDnsRecord

LLARecord

LLNsRecord

LLCnameRecord

LLPtrRecord

LLAaaaRecord

LLSrvRecord

Definition at line 465 of file llares.h.


Constructor & Destructor Documentation

LLQueryResponder::LLQueryResponder (  ) 

Definition at line 164 of file llares.cpp.


Member Function Documentation

int LLQueryResponder::parseRR ( const char *  buf,
size_t  len,
const char *&  pos,
LLPointer< LLDnsRecord > &  r 
) [protected]

Parse a single RR.

Definition at line 171 of file llares.cpp.

References LLAres::expandName(), llendl, llinfos, NULL, RES_A, RES_AAAA, RES_CNAME, RES_NS, RES_PTR, and RES_SRV.

Referenced by parseSection().

Here is the call graph for this function:

Here is the caller graph for this function:

int LLQueryResponder::parseSection ( const char *  buf,
size_t  len,
size_t  count,
const char *&  pos,
dns_rrs_t rrs 
) [protected]

Parse one section of a response.

Definition at line 248 of file llares.cpp.

References i, parseRR(), and r.

Referenced by queryResult().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLQueryResponder::queryResult ( const char *  buf,
size_t  len 
) [protected, virtual]

void LLQueryResponder::queryResult (  )  [protected, virtual]

Reimplemented in LLAres::SrvResponder, and LLAres::UriRewriteResponder.

Definition at line 351 of file llares.cpp.

References llendl, and llinfos.

Referenced by queryResult().

Here is the caller graph for this function:

bool LLQueryResponder::valid (  )  const [inline]

Indicate whether the response could be parsed successfully.

Definition at line 496 of file llares.h.

References mResult.

int LLQueryResponder::result (  )  const [inline]

The more detailed result of parsing the response.

Definition at line 501 of file llares.h.

References mResult.

const std::string& LLQueryResponder::query (  )  const [inline]

Return the query embedded in the response.

Definition at line 506 of file llares.h.

References mQuery.

const dns_rrs_t& LLQueryResponder::answers (  )  const [inline]

Return the contents of the "answers" section of the response.

Definition at line 511 of file llares.h.

References mAnswers.

const dns_rrs_t& LLQueryResponder::authorities (  )  const [inline]

Return the contents of the "authorities" section of the response.

Definition at line 517 of file llares.h.

References mAuthorities.

const dns_rrs_t& LLQueryResponder::additional (  )  const [inline]

Return the contents of the "additional records" section of the response.

Definition at line 523 of file llares.h.

References mAdditional.


Member Data Documentation

int LLQueryResponder::mResult [protected]

Definition at line 468 of file llares.h.

Referenced by queryResult(), result(), and valid().

std::string LLQueryResponder::mQuery [protected]

Definition at line 469 of file llares.h.

Referenced by query(), and queryResult().

Definition at line 473 of file llares.h.

Referenced by authorities(), and queryResult().

Definition at line 474 of file llares.h.

Referenced by additional(), and queryResult().


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

Generated on Fri May 16 09:01:09 2008 for SecondLife by  doxygen 1.5.5