2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 05:47:45 +00:00

Add prototypical support for writing persistent billing classes.

This commit is contained in:
Ted Lemon 2000-07-05 07:33:25 +00:00
parent 8afe078753
commit 4346ff54e2

View File

@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: db.c,v 1.52 2000/06/06 23:51:16 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: db.c,v 1.53 2000/07/05 07:33:25 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -571,6 +571,29 @@ int db_printable_len (s, len)
return 1;
}
void write_named_billing_class (const char *name, unsigned len,
struct class *class)
{
/* XXX billing classes that are modified by OMAPI need
XXX to be detected and written out here. */
}
void write_billing_classes ()
{
struct collection *lp;
struct class *cp;
struct hash_bucket *bp;
int i;
for (lp = collections; lp; lp = lp -> next) {
for (cp = lp -> classes; cp; cp = cp -> nic) {
if (cp -> spawning && cp -> hash) {
class_hash_foreach (cp -> hash, write_named_billing_class);
}
}
}
}
/* Write a spawned class to the database file. */
int write_billing_class (class)