1 /* $OpenBSD: dhctoken.h,v 1.2 2004/02/04 12:16:56 henning Exp $ */ 2 3 /* Tokens for config file lexer and parser. */ 4 5 /* 6 * Copyright (c) 1995, 1996, 1997, 1998, 1999 7 * The Internet Software Consortium. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. Neither the name of The Internet Software Consortium nor the names 19 * of its contributors may be used to endorse or promote products derived 20 * from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND 23 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR 27 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * This software has been written for the Internet Software Consortium 37 * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie 38 * Enterprises. To learn more about the Internet Software Consortium, 39 * see ``http://www.vix.com/isc''. To learn more about Vixie 40 * Enterprises, see ``http://www.vix.com''. 41 */ 42 43 #define SEMI ';' 44 #define DOT '.' 45 #define COLON ':' 46 #define COMMA ',' 47 #define SLASH '/' 48 #define LBRACE '{' 49 #define RBRACE '}' 50 51 #define FIRST_TOKEN HOST 52 #define HOST 256 53 #define HARDWARE 257 54 #define FILENAME 258 55 #define FIXED_ADDR 259 56 #define OPTION 260 57 #define ETHERNET 261 58 #define STRING 262 59 #define NUMBER 263 60 #define NUMBER_OR_NAME 264 61 #define NAME 265 62 #define TIMESTAMP 266 63 #define STARTS 267 64 #define ENDS 268 65 #define UID 269 66 #define CLASS 270 67 #define LEASE 271 68 #define RANGE 272 69 #define PACKET 273 70 #define CIADDR 274 71 #define YIADDR 275 72 #define SIADDR 276 73 #define GIADDR 277 74 #define SUBNET 278 75 #define NETMASK 279 76 #define DEFAULT_LEASE_TIME 280 77 #define MAX_LEASE_TIME 281 78 #define VENDOR_CLASS 282 79 #define USER_CLASS 283 80 #define SHARED_NETWORK 284 81 #define SERVER_NAME 285 82 #define DYNAMIC_BOOTP 286 83 #define SERVER_IDENTIFIER 287 84 #define DYNAMIC_BOOTP_LEASE_CUTOFF 288 85 #define DYNAMIC_BOOTP_LEASE_LENGTH 289 86 #define BOOT_UNKNOWN_CLIENTS 290 87 #define NEXT_SERVER 291 88 #define TOKEN_RING 292 89 #define GROUP 293 90 #define ONE_LEASE_PER_CLIENT 294 91 #define GET_LEASE_HOSTNAMES 295 92 #define USE_HOST_DECL_NAMES 296 93 #define SEND 297 94 #define CLIENT_IDENTIFIER 298 95 #define REQUEST 299 96 #define REQUIRE 300 97 #define TIMEOUT 301 98 #define RETRY 302 99 #define SELECT_TIMEOUT 303 100 #define SCRIPT 304 101 #define INTERFACE 305 102 #define RENEW 306 103 #define REBIND 307 104 #define EXPIRE 308 105 #define UNKNOWN_CLIENTS 309 106 #define ALLOW 310 107 #define BOOTP 311 108 #define DENY 312 109 #define BOOTING 313 110 #define DEFAULT 314 111 #define MEDIA 315 112 #define MEDIUM 316 113 #define ALIAS 317 114 #define REBOOT 318 115 #define ABANDONED 319 116 #define BACKOFF_CUTOFF 320 117 #define INITIAL_INTERVAL 321 118 #define NAMESERVER 322 119 #define DOMAIN 323 120 #define SEARCH 324 121 #define SUPERSEDE 325 122 #define APPEND 326 123 #define PREPEND 327 124 #define HOSTNAME 328 125 #define CLIENT_HOSTNAME 329 126 #define REJECT 330 127 #define FDDI 331 128 #define USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 332 129 #define AUTHORITATIVE 333 130 #define TOKEN_NOT 334 131 #define ALWAYS_REPLY_RFC1048 335 132 133 #define is_identifier(x) ((x) >= FIRST_TOKEN && \ 134 (x) != STRING && \ 135 (x) != NUMBER && \ 136 (x) != EOF) 137