summaryrefslogtreecommitdiff
path: root/server/class.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-03-16 05:50:46 +0000
committerTed Lemon <source@isc.org>1999-03-16 05:50:46 +0000
commitf39b6e0089fb9a1bc0d06d12a9c5c3d995744bb5 (patch)
tree4c42e75d76b6d2f9cc7489f61333ea866e8ee5f7 /server/class.c
parent494a48266eec31601da5960462dcadffd13d4b9a (diff)
downloadisc-dhcp-f39b6e0089fb9a1bc0d06d12a9c5c3d995744bb5.tar.gz
Update license.
Diffstat (limited to 'server/class.c')
-rw-r--r--server/class.c136
1 files changed, 13 insertions, 123 deletions
diff --git a/server/class.c b/server/class.c
index bcd31c79..b88c368d 100644
--- a/server/class.c
+++ b/server/class.c
@@ -3,140 +3,30 @@
Handling for client classes. */
/*
- * Copyright (c) 1998 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 1996-1999 Internet Software Consortium.
+ * Use is subject to license terms which appear in the file named
+ * ISC-LICENSE that should have accompanied this file when you
+ * received it. If a file named ISC-LICENSE did not accompany this
+ * file, or you are not sure the one you have is correct, you may
+ * obtain an applicable copy of the license at:
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.isc.org/isc-license-1.0.html.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * This file is part of the ISC DHCP distribution. The documentation
+ * associated with this file is listed in the file DOCUMENTATION,
+ * included in the top-level directory of this release.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This software has been written for the Internet Software Consortium
- * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
- * Enterprises. To learn more about the Internet Software Consortium,
- * see ``http://www.vix.com/isc''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''.
+ * Support and other services are available for ISC products - see
+ * http://www.isc.org for more information.
*/
#ifndef lint
static char copyright[] =
-"$Id: class.c,v 1.9 1999/03/16 00:54:09 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: class.c,v 1.10 1999/03/16 05:50:42 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
-/*
- * Internally, there are three basic kinds of classes: classes that are
- * never matched, and must be assigned through classification rules (e.g.,
- * known-clients and unknown-clients, above), classes that are assigned
- * by doing a hash lookup, and classes that must be matched on an individual
- * basis. These classes are all declared the same way:
- *
- * class [<class-name>] {
- * match if <match-expr>;
- * ...
- * }
- *
- * It is possible to declare a class that spawns other classes - if a client
- * matches the class, a new class is created that matches the client's
- * parameters more specifically. Classes that are created in this way are
- * attached to the class that spawned them with a hash table, and if a client
- * matches the hash, the more general test is not done. Care should be taken
- * in constructing such classes: a poorly-chosen spawn test can cause such a
- * class to grow without bound.
- *
- * class [<class-name>] {
- * match if <match-expr>;
- * spawn <spawn-expr>;
- * }
- *
- * Testing a whole litany of classes can take quite a bit of time for each
- * incoming packet. In order to make this process more efficient, it may
- * be desirable to group classes into collections, and then write a more
- * complicated set of classification rules so as to perform fewer tests.
- * Classes can be grouped into collections by writing a collection statement
- * in the class declaration:
- *
- * collection <collection-name>;
- *
- * By default, all classes are members of the "default" collection.
- *
- * Beware: if you declare a class to be part of a collection other than
- * "default" but do not update the classification rules, that class will
- * never be considered during the client classification process.
- */
-
-/*
- * Expressions used to make matches:
- *
- * expression :== LPAREN expression RPAREN |
- * expression OR expression |
- * expression AND expression |
- * NOT expression |
- * test_expr
- *
- * test_expr :== extract_expr EQUALS extract_expr |
- * CHECK_COLLECTION STRING
- *
- * extract_expr :== SUBSTRING extract_expr NUMBER NUMBER |
- * SUFFIX extract_expr NUMBER |
- * OPTION IDENTIFIER DOT IDENTIFIER |
- * OPTION IDENTIFIER |
- * CHADDR
- * HTYPE
- * HARDWARE
- * data_expr
- *
- * data_expr :== STRING |
- * hex_data_expr
- *
- * hex_data_expr :== HEX_NUMBER |
- * hex_data_expr COLON HEX_NUMBER
- *
- * For example:
- *
- * chaddr = 08:00:2b:4c:2a:29 AND htype = 1;
- *
- * substring chaddr 0 3 = 08:00:2b;
- *
- * substring dhcp-client-identifier 1 3 = "RAS";
- *
- * substring relay.circuit-id = 04:2c:59:31;
- */
-
-/*
- * Clients are classified based on classification rules, which can be
- * specified on a per-group basis. By default, the following classification
- * rules apply:
- *
- * classification-rules {
- * check-collection "default";
- * }
- *
- */
-
struct collection default_collection = {
(struct collection *)0,
"default",