2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-06 17:05:14 +00:00
Files
kea/src/lib/auth/cpp/data_source_static.h
Evan Hunt 8399a64371 Merged experiments/each-query branch into parkinglot.
(This now builds the b10-auth binary.  The b10-parkinglot binary is
still being built for reference purposes, but is expected to be removed.
Both programs use port 5300, so they cannot be run simultaneously.)


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@690 e5f2f494-b856-4b98-b285-d166d9295462
2010-01-30 07:39:38 +00:00

70 lines
1.9 KiB
C++

// Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// $Id$
//
// Sample Datasource implementation; this datasource only returns
// static content for the queries
// CH TXT version.bind
// and
// CH TXT authors.bind
//
#ifndef __STATIC_DATA_SOURCE_H
#define __STATIC_DATA_SOURCE_H
#include "data_source.h"
namespace isc {
namespace dns {
class StaticDataSrc : public DataSrc {
public:
StaticDataSrc();
~StaticDataSrc() {};
const DataSrc* findClosestEnclosure(const Name& qname,
Name& container,
bool& found) const;
DSResult findRRset(const Name& qname,
const RRClass& qclass,
const RRType& qtype,
RRsetList& target, RRsetList& sigs) const;
DSResult findRRset(const Name& qname,
const RRClass& qclass,
const RRType& qtype,
RRsetList& target) const;
DSResult init() { return SUCCESS; };
DSResult close() { return SUCCESS; } ;
private:
const Name authors_name;
const Name version_name;
RRsetPtr authors;
RRsetPtr version;
};
}
}
#endif
// Local Variables:
// mode: c++
// End: