Kea
1.9.9-git
|
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 Opcode * | opcode_ |
Opcode | opcode_placeholder_ |
qid_t | qid_ |
vector< QuestionPtr > | questions_ |
const Rcode * | rcode_ |
Rcode | rcode_placeholder_ |
vector< RRsetPtr > | rrsets_ [NUM_SECTIONS] |
ConstTSIGRecordPtr | tsig_rr_ |
Static Public Attributes | |
static const unsigned int | NUM_SECTIONS = 4 |
Definition at line 88 of file dns/message.cc.
isc::dns::MessageImpl::MessageImpl | ( | Message::Mode | mode | ) |
Definition at line 142 of file dns/message.cc.
References init().
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 820 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().
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 781 of file dns/message.cc.
References isc::dns::Message::PRESERVE_ORDER, and rrsets_.
Referenced by parseSection().
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 802 of file dns/message.cc.
References isc::dns::Message::PRESERVE_ORDER, and rrsets_.
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 839 of file dns/message.cc.
References counts_, isc::util::InputBuffer::getPosition(), isc_throw, isc::dns::Message::SECTION_ADDITIONAL, and tsig_rr_.
Referenced by parseSection().
void isc::dns::MessageImpl::init | ( | ) |
Definition at line 151 of file dns/message.cc.
References counts_, edns_, flags_, header_parsed_, NUM_SECTIONS, opcode_, qid_, questions_, rcode_, rrsets_, isc::dns::Message::SECTION_ADDITIONAL, isc::dns::Message::SECTION_ANSWER, isc::dns::Message::SECTION_AUTHORITY, and tsig_rr_.
Referenced by isc::dns::Message::clear(), and MessageImpl().
int isc::dns::MessageImpl::parseQuestion | ( | InputBuffer & | buffer | ) |
Definition at line 657 of file dns/message.cc.
References counts_, isc::util::InputBuffer::getLength(), isc::util::InputBuffer::getPosition(), isc_throw, questions_, isc::util::InputBuffer::readUint16(), and isc::dns::Message::SECTION_QUESTION.
Referenced by isc::dns::Message::fromWire().
int isc::dns::MessageImpl::parseSection | ( | const Message::Section | section, |
InputBuffer & | buffer, | ||
Message::ParseOptions | options | ||
) |
Definition at line 728 of file dns/message.cc.
References addEDNS(), addRR(), addTSIG(), isc::dns::RRClass::ANY(), counts_, isc::dns::rdata::createRdata(), isc::util::InputBuffer::getLength(), isc::util::InputBuffer::getPosition(), isc_throw, isc::dns::RRClass::NONE(), NUM_SECTIONS, isc::dns::RRType::OPT(), isc::util::InputBuffer::readUint16(), isc::util::InputBuffer::readUint32(), and isc::dns::RRType::TSIG().
Referenced by isc::dns::Message::fromWire().
void isc::dns::MessageImpl::setOpcode | ( | const Opcode & | opcode | ) |
Definition at line 171 of file dns/message.cc.
References opcode_, and opcode_placeholder_.
Referenced by isc::dns::Message::parseHeader(), and isc::dns::Message::setOpcode().
void isc::dns::MessageImpl::setRcode | ( | const Rcode & | rcode | ) |
Definition at line 177 of file dns/message.cc.
References rcode_, and rcode_placeholder_.
Referenced by addEDNS(), isc::dns::Message::parseHeader(), and isc::dns::Message::setRcode().
void isc::dns::MessageImpl::toWire | ( | AbstractMessageRenderer & | renderer, |
TSIGContext * | tsig_ctx | ||
) |
Definition at line 229 of file dns/message.cc.
References isc::dns::AbstractMessageRenderer::clear(), counts_, edns_, flags_, isc::dns::Opcode::getCode(), isc::dns::Rcode::getCode(), isc::dns::AbstractMessageRenderer::getCompressMode(), isc::dns::Rcode::getExtendedCode(), isc::dns::AbstractMessageRenderer::getLengthLimit(), isc::dns::TSIGContext::getTSIGLength(), isc::dns::Message::HEADERFLAG_TC, isc_throw, mode_, opcode_, qid_, questions_, rcode_, isc::dns::Message::RENDER, rrsets_, isc::dns::Message::SECTION_ADDITIONAL, isc::dns::Message::SECTION_ANSWER, isc::dns::Message::SECTION_AUTHORITY, isc::dns::Message::SECTION_QUESTION, isc::dns::AbstractMessageRenderer::setCompressMode(), isc::dns::AbstractMessageRenderer::setLengthLimit(), isc::dns::TSIGContext::sign(), and isc::dns::AbstractMessageRenderer::skip().
Referenced by isc::dns::Message::toWire().
int isc::dns::MessageImpl::counts_[NUM_SECTIONS] |
Definition at line 109 of file dns/message.cc.
Referenced by isc::dns::Message::addQuestion(), isc::dns::Message::addRRset(), addTSIG(), isc::dns::Message::clearSection(), isc::dns::Message::fromWire(), isc::dns::Message::getRRCount(), init(), isc::dns::Message::makeResponse(), isc::dns::Message::parseHeader(), parseQuestion(), parseSection(), isc::dns::Message::removeRRset(), isc::dns::Message::toText(), and toWire().
ConstEDNSPtr isc::dns::MessageImpl::edns_ |
Definition at line 112 of file dns/message.cc.
Referenced by addEDNS(), isc::dns::Message::getEDNS(), init(), isc::dns::Message::makeResponse(), isc::dns::Message::setEDNS(), isc::dns::Message::toText(), and toWire().
uint16_t isc::dns::MessageImpl::flags_ |
Definition at line 105 of file dns/message.cc.
Referenced by isc::dns::Message::getHeaderFlag(), init(), isc::dns::Message::makeResponse(), isc::dns::Message::parseHeader(), isc::dns::Message::setHeaderFlag(), and toWire().
bool isc::dns::MessageImpl::header_parsed_ |
Definition at line 107 of file dns/message.cc.
Referenced by init(), and isc::dns::Message::parseHeader().
Message::Mode isc::dns::MessageImpl::mode_ |
Definition at line 93 of file dns/message.cc.
Referenced by isc::dns::Message::addQuestion(), isc::dns::Message::addRRset(), isc::dns::Message::clear(), isc::dns::Message::clearSection(), isc::dns::Message::fromWire(), isc::dns::Message::getTSIGRecord(), isc::dns::Message::makeResponse(), isc::dns::Message::parseHeader(), isc::dns::Message::setEDNS(), isc::dns::Message::setHeaderFlag(), isc::dns::Message::setOpcode(), isc::dns::Message::setQid(), isc::dns::Message::setRcode(), and toWire().
|
static |
Definition at line 108 of file dns/message.cc.
Referenced by isc::dns::Message::addRRset(), isc::dns::Message::appendSection(), isc::dns::Message::beginSection(), isc::dns::Message::clearSection(), isc::dns::Message::endSection(), isc::dns::Message::getRRCount(), isc::dns::Message::hasRRset(), init(), parseSection(), and isc::dns::Message::removeRRset().
const Opcode* isc::dns::MessageImpl::opcode_ |
Definition at line 102 of file dns/message.cc.
Referenced by isc::dns::Message::getOpcode(), init(), setOpcode(), isc::dns::Message::toText(), and toWire().
Opcode isc::dns::MessageImpl::opcode_placeholder_ |
Definition at line 103 of file dns/message.cc.
Referenced by setOpcode().
qid_t isc::dns::MessageImpl::qid_ |
Definition at line 94 of file dns/message.cc.
Referenced by isc::dns::Message::getQid(), init(), isc::dns::Message::parseHeader(), isc::dns::Message::setQid(), isc::dns::Message::toText(), and toWire().
vector<QuestionPtr> isc::dns::MessageImpl::questions_ |
Definition at line 110 of file dns/message.cc.
Referenced by isc::dns::Message::addQuestion(), isc::dns::Message::beginQuestion(), isc::dns::Message::clearSection(), isc::dns::Message::endQuestion(), init(), parseQuestion(), isc::dns::Message::toText(), and toWire().
const Rcode* isc::dns::MessageImpl::rcode_ |
Definition at line 100 of file dns/message.cc.
Referenced by addEDNS(), isc::dns::Message::getRcode(), init(), setRcode(), isc::dns::Message::toText(), and toWire().
Rcode isc::dns::MessageImpl::rcode_placeholder_ |
Definition at line 101 of file dns/message.cc.
Referenced by setRcode().
vector<RRsetPtr> isc::dns::MessageImpl::rrsets_[NUM_SECTIONS] |
Definition at line 111 of file dns/message.cc.
Referenced by addRR(), isc::dns::Message::addRRset(), isc::dns::Message::beginSection(), isc::dns::Message::clearSection(), isc::dns::Message::endSection(), isc::dns::Message::hasRRset(), init(), isc::dns::Message::makeResponse(), isc::dns::Message::removeRRset(), isc::dns::Message::toText(), and toWire().
ConstTSIGRecordPtr isc::dns::MessageImpl::tsig_rr_ |
Definition at line 113 of file dns/message.cc.
Referenced by addTSIG(), isc::dns::Message::getTSIGRecord(), init(), and isc::dns::Message::toText().