db.c revision d2615909402705135d0560ad9d11f4302053c17c
/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM 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.
*/
/***
*** Imports
***/
#include <config.h>
#include <stddef.h>
#include <string.h>
#include <isc/assertions.h>
#include <dns/rdataset.h>
/***
*** Private Types
***/
typedef struct {
char * name;
} impinfo_t;
/***
*** Supported DB Implementations Registry
***/
/*
* Supported database implementations must be registered here.
*
* It might be nice to generate this automatically some day.
*/
#include "rbtdb.h"
#include "rbtdb64.h"
impinfo_t implementations[] = {
{ "rbt", dns_rbtdb_create },
{ "rbt64", dns_rbtdb64_create },
};
/***
*** Basic DB Methods
***/
{
/*
* Create a new database using implementation 'db_type'.
*/
return (DNS_R_NOTFOUND);
}
void
/*
* Attach *targetp to source.
*/
}
void
/*
* Detach *dbp from its database.
*/
}
/*
* Does 'db' have cache semantics?
*/
return (ISC_TRUE);
return (ISC_FALSE);
}
/*
* Does 'db' have zone semantics?
*/
return (ISC_TRUE);
return (ISC_FALSE);
}
/*
* The origin of the database.
*/
}
/*
* The class of the database.
*/
}
/*
* Load master file 'filename' into 'db'.
*/
}
/*
* Dump 'db' into master file 'filename'.
*/
}
/***
*** Version Methods
***/
void
/*
* Open the current version for reading.
*/
}
/*
* Open a new version for reading and writing.
*/
}
void
{
/*
* Attach '*targetp' to 'source'.
*/
}
void
{
/*
* Close version '*versionp'.
*/
}
/***
*** Node Methods
***/
{
/*
* Find the node with name 'name'.
*/
}
{
/*
* Find the best match for 'name' and 'type' in version 'version'
* of 'db'.
*/
}
void
/*
* Attach *targetp to source.
*/
}
void
/*
* Detach *nodep from its node.
*/
}
/*
* Mark as stale all records at 'node' which expire at or before 'now'.
*/
}
void
/*
* Print a textual representation of the contents of the node to
* 'out'.
*/
}
/***
*** DB Iterator Creation
***/
{
/*
* Create an iterator for version 'version' of 'db'.
*/
}
/***
*** Rdataset Methods
***/
{
/*
* Search for an rdataset of type 'type' at 'node' that are in version
* 'version' of 'db'. If found, make 'rdataset' refer to it.
*/
rdataset));
}
{
/*
* Make '*iteratorp' an rdataset iteratator for all rdatasets at
* 'node' in version 'version' of 'db'.
*/
iteratorp));
}
{
/*
* Add 'rdataset' to 'node' in version 'version' of 'db'.
*/
merge, addedrdataset));
}
{
/*
* Remove any rdata in 'rdataset' from 'node' in version 'version' of
* 'db'.
*/
newrdataset));
}
{
/*
* Make it so that no rdataset of type 'type' exists at 'node' in
* version version 'version' of 'db'.
*/
}