}
ConstHostCollection
-MemHostDataSource::getAll4(const asiolink::IOAddress& /*address*/) const {
- return (ConstHostCollection());
+MemHostDataSource::getAll4(const asiolink::IOAddress& address) const {
+ ConstHostCollection hosts;
+ for (const auto & h : store_) {
+ if (h->getIPv4Reservation() == address) {
+ hosts.push_back(h);
+ }
+ }
+
+ return (hosts);
}
ConstHostPtr
MemHostDataSource::getAll4(const SubnetID& subnet_id,
const asiolink::IOAddress& address) const {
ConstHostCollection hosts;
- auto host = get4(subnet_id, address);
- if (host) {
- hosts.push_back(host);
+ for (const auto & h : store_) {
+ if (h->getIPv4SubnetID() == subnet_id &&
+ h->getIPv4Reservation() == address) {
+ hosts.push_back(h);
+ }
}
+
return (hosts);
}