BIND 10 trac1138, updated. ed6fc7857e3fe7d64f19a0bed27226964009f095 [1138] accessor added; source untabified
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Aug 16 12:30:16 UTC 2011
The branch, trac1138 has been updated
via ed6fc7857e3fe7d64f19a0bed27226964009f095 (commit)
from edbcbf0ab15f140b96efab5fae808b35e705cf67 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ed6fc7857e3fe7d64f19a0bed27226964009f095
Author: Dima Volodin <dvv at isc.org>
Date: Tue Aug 16 08:28:04 2011 -0400
[1138] accessor added; source untabified
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rdata/in_1/dhcid_49.cc | 18 ++++++++++++------
src/lib/dns/rdata/in_1/dhcid_49.h | 10 +++++++---
2 files changed, 19 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/in_1/dhcid_49.cc b/src/lib/dns/rdata/in_1/dhcid_49.cc
index ce3b619..b0a76f1 100644
--- a/src/lib/dns/rdata/in_1/dhcid_49.cc
+++ b/src/lib/dns/rdata/in_1/dhcid_49.cc
@@ -43,15 +43,15 @@ DHCID::DHCID(const string& dhcid_str) {
// < 2 octets > Identifier type code
// < 1 octet > Digest type code
if (digest_.size() < 3) {
- isc_throw(InvalidRdataLength, "DHCID length " << digest_.size() <<
- " too short, need at least 3 bytes");
+ isc_throw(InvalidRdataLength, "DHCID length " << digest_.size() <<
+ " too short, need at least 3 bytes");
}
}
DHCID::DHCID(InputBuffer& buffer, size_t rdata_len) {
if (rdata_len < 3) {
- isc_throw(InvalidRdataLength, "DHCID length " << rdata_len <<
- " too short, need at least 3 bytes");
+ isc_throw(InvalidRdataLength, "DHCID length " << rdata_len <<
+ " too short, need at least 3 bytes");
}
digest_.resize(rdata_len);
@@ -85,10 +85,16 @@ DHCID::compare(const Rdata& other) const {
size_t cmplen = min(this_len, other_len);
int cmp = memcmp(&digest_[0], &other_dhcid.digest_[0], cmplen);
if (cmp != 0) {
- return (cmp);
+ return (cmp);
} else {
- return ((this_len == other_len) ? 0 : (this_len < other_len) ? -1 : 1);
+ return ((this_len == other_len) ? 0 : (this_len < other_len) ? -1 : 1);
}
}
+
+const std::vector<uint8_t>&
+DHCID::getDigest() const {
+ return (digest_);
+}
+
// END_RDATA_NAMESPACE
// END_ISC_NAMESPACE
diff --git a/src/lib/dns/rdata/in_1/dhcid_49.h b/src/lib/dns/rdata/in_1/dhcid_49.h
index 9792bb6..666f283 100644
--- a/src/lib/dns/rdata/in_1/dhcid_49.h
+++ b/src/lib/dns/rdata/in_1/dhcid_49.h
@@ -31,10 +31,14 @@ public:
// BEGIN_COMMON_MEMBERS
// END_COMMON_MEMBERS
- //We can use the default destructor.
- //virtual ~DHCID() {}
+ // subject to change
+ // DHCID& operator=(const DHCID& source);
+ // ~DHCID();
+
+ const std::vector<uint8_t>& getDigest() const;
+
private:
- std::vector<uint8_t> digest_; // opaque data at least 3 octets long
+ std::vector<uint8_t> digest_; // opaque data at least 3 octets long
};
// END_RDATA_NAMESPACE
// END_ISC_NAMESPACE
More information about the bind10-changes
mailing list