summaryrefslogtreecommitdiff
path: root/server/class.c
diff options
context:
space:
mode:
authorJames Brister <source@isc.org>2001-06-22 16:47:20 +0000
committerJames Brister <source@isc.org>2001-06-22 16:47:20 +0000
commit899d754f274d2946af76590e43925325b7eb3ce3 (patch)
tree357b845c5a2632e3f4e51c191fdb328f2638b96d /server/class.c
parent31bbee784cecf4cd3f985cb6fd880148fcac3733 (diff)
downloadisc-dhcp-899d754f274d2946af76590e43925325b7eb3ce3.tar.gz
OMAPI class and subclass support.
Diffstat (limited to 'server/class.c')
-rw-r--r--server/class.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/server/class.c b/server/class.c
index 5b89bcca..25160483 100644
--- a/server/class.c
+++ b/server/class.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: class.c,v 1.29 2001/04/20 20:39:26 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: class.c,v 1.30 2001/06/22 16:47:13 brister Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
@@ -227,6 +227,29 @@ void classify (packet, class)
packet -> raw -> chaddr));
}
+
+isc_result_t unlink_class(struct class **class) {
+ struct collection *lp;
+ struct class *cp, *pp;
+
+ for (lp = collections; lp; lp = lp -> next) {
+ for (pp = 0, cp = lp -> classes; cp; pp = cp, cp = cp -> nic)
+ if (cp == *class) {
+ if (pp == 0) {
+ lp->classes = cp->nic;
+ } else {
+ pp->nic = cp->nic;
+ }
+ cp->nic = 0;
+ class_dereference(class, MDL);
+
+ return ISC_R_SUCCESS;
+ }
+ }
+ return ISC_R_NOTFOUND;
+}
+
+
isc_result_t find_class (struct class **class, const char *name,
const char *file, int line)
{