Kea 2.5.9
isc::dns::MessageImpl Class Reference

Public Member Functions

 MessageImpl (Message::Mode mode)
 
void addEDNS (Message::Section section, const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl, const Rdata &rdata)
 
void addRR (Message::Section section, const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl, ConstRdataPtr rdata, Message::ParseOptions options)
 
void addRR (Message::Section section, const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl, Message::ParseOptions options)
 
void addTSIG (Message::Section section, unsigned int count, const InputBuffer &buffer, size_t start_position, const Name &name, const RRClass &rrclass, const RRTTL &ttl, const Rdata &rdata)
 
void init ()
 
int parseQuestion (InputBuffer &buffer)
 
int parseSection (const Message::Section section, InputBuffer &buffer, Message::ParseOptions options)
 
void setOpcode (const Opcode &opcode)
 
void setRcode (const Rcode &rcode)
 
void toWire (AbstractMessageRenderer &renderer, TSIGContext *tsig_ctx)
 

Public Attributes

int counts_ [NUM_SECTIONS]
 
ConstEDNSPtr edns_
 
uint16_t flags_
 
bool header_parsed_
 
Message::Mode mode_
 
const Opcodeopcode_
 
Opcode opcode_placeholder_
 
qid_t qid_
 
vector< QuestionPtrquestions_
 
const Rcodercode_
 
Rcode rcode_placeholder_
 
vector< RRsetPtrrrsets_ [NUM_SECTIONS]
 
ConstTSIGRecordPtr tsig_rr_
 

Static Public Attributes

static const unsigned int NUM_SECTIONS = 4
 

Detailed Description

Definition at line 84 of file dns/message.cc.

Constructor & Destructor Documentation

◆ MessageImpl()

isc::dns::MessageImpl::MessageImpl ( Message::Mode  mode)

Definition at line 141 of file dns/message.cc.

References init().

+ Here is the call graph for this function:

Member Function Documentation

◆ addEDNS()

void isc::dns::MessageImpl::addEDNS ( Message::Section  section,
const Name name,
const RRClass rrclass,
const RRType rrtype,
const RRTTL ttl,
const Rdata rdata 
)

Definition at line 824 of file dns/message.cc.

References isc::dns::createEDNSFromRR(), edns_, isc::dns::Rcode::getCode(), isc_throw, rcode_, isc::dns::Message::SECTION_ADDITIONAL, and setRcode().

Referenced by parseSection().

+ Here is the call graph for this function:

◆ addRR() [1/2]

void isc::dns::MessageImpl::addRR ( Message::Section  section,
const Name name,
const RRClass rrclass,
const RRType rrtype,
const RRTTL ttl,
ConstRdataPtr  rdata,
Message::ParseOptions  options 
)

Definition at line 787 of file dns/message.cc.

References isc::dns::Message::PRESERVE_ORDER, and rrsets_.

Referenced by parseSection().

◆ addRR() [2/2]

void isc::dns::MessageImpl::addRR ( Message::Section  section,
const Name name,
const RRClass rrclass,
const RRType rrtype,
const RRTTL ttl,
Message::ParseOptions  options 
)

Definition at line 807 of file dns/message.cc.

References isc::dns::Message::PRESERVE_ORDER, and rrsets_.

◆ addTSIG()

void isc::dns::MessageImpl::addTSIG ( Message::Section  section,
unsigned int  count,
const InputBuffer buffer,
size_t  start_position,
const Name name,
const RRClass rrclass,
const RRTTL ttl,
const Rdata rdata 
)

Definition at line 842 of file dns/message.cc.

References counts_, isc::util::InputBuffer::getPosition(), isc_throw, isc::dns::Message::SECTION_ADDITIONAL, and tsig_rr_.

Referenced by parseSection().

+ Here is the call graph for this function:

◆ init()

◆ parseQuestion()

int isc::dns::MessageImpl::parseQuestion ( InputBuffer buffer)

◆ parseSection()

◆ setOpcode()

void isc::dns::MessageImpl::setOpcode ( const Opcode opcode)

Definition at line 169 of file dns/message.cc.

References opcode_, and opcode_placeholder_.

◆ setRcode()

void isc::dns::MessageImpl::setRcode ( const Rcode rcode)

Definition at line 175 of file dns/message.cc.

References rcode_, and rcode_placeholder_.

Referenced by addEDNS().

◆ toWire()

Member Data Documentation

◆ counts_

int isc::dns::MessageImpl::counts_[NUM_SECTIONS]

Definition at line 105 of file dns/message.cc.

Referenced by addTSIG(), init(), parseQuestion(), parseSection(), and toWire().

◆ edns_

ConstEDNSPtr isc::dns::MessageImpl::edns_

Definition at line 108 of file dns/message.cc.

Referenced by addEDNS(), init(), and toWire().

◆ flags_

uint16_t isc::dns::MessageImpl::flags_

Definition at line 101 of file dns/message.cc.

Referenced by init(), and toWire().

◆ header_parsed_

bool isc::dns::MessageImpl::header_parsed_

Definition at line 103 of file dns/message.cc.

Referenced by init().

◆ mode_

Message::Mode isc::dns::MessageImpl::mode_

Definition at line 89 of file dns/message.cc.

Referenced by toWire().

◆ NUM_SECTIONS

◆ opcode_

const Opcode* isc::dns::MessageImpl::opcode_

Definition at line 98 of file dns/message.cc.

Referenced by init(), setOpcode(), and toWire().

◆ opcode_placeholder_

Opcode isc::dns::MessageImpl::opcode_placeholder_

Definition at line 99 of file dns/message.cc.

Referenced by setOpcode().

◆ qid_

qid_t isc::dns::MessageImpl::qid_

Definition at line 90 of file dns/message.cc.

Referenced by init(), and toWire().

◆ questions_

vector<QuestionPtr> isc::dns::MessageImpl::questions_

Definition at line 106 of file dns/message.cc.

Referenced by init(), parseQuestion(), and toWire().

◆ rcode_

const Rcode* isc::dns::MessageImpl::rcode_

Definition at line 96 of file dns/message.cc.

Referenced by addEDNS(), init(), setRcode(), and toWire().

◆ rcode_placeholder_

Rcode isc::dns::MessageImpl::rcode_placeholder_

Definition at line 97 of file dns/message.cc.

Referenced by setRcode().

◆ rrsets_

vector<RRsetPtr> isc::dns::MessageImpl::rrsets_[NUM_SECTIONS]

Definition at line 107 of file dns/message.cc.

Referenced by addRR(), init(), and toWire().

◆ tsig_rr_

ConstTSIGRecordPtr isc::dns::MessageImpl::tsig_rr_

Definition at line 109 of file dns/message.cc.

Referenced by addTSIG(), and init().


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