timedb.c revision 32f2764f4c62c0d2d838625ba326e5576989c932
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * A simple database driver that enables the server to return the
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * current time in a DNS record.
380c874925f684847d9278b909cf511cb5b0289aShawn Routhierstatic dns_sdbimplementation_t *timedb = NULL;
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * This database operates on relative names.
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * "time" and "@" return the time in a TXT record.
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * "clock" is a CNAME to "time"
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier * "current" is a DNAME to "@" (try time.current.time)
380c874925f684847d9278b909cf511cb5b0289aShawn Routhiertimedb_lookup(const char *zone, const char *name, void *dbdata,
380c874925f684847d9278b909cf511cb5b0289aShawn Routhier if (strcmp(name, "@") == 0 || strcmp(name, "time") == 0) {
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
timedb_init(void) {
unsigned int flags;
timedb_clear(void) {