1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _DHCP_SYMBOL_COMMON_H 27 #define _DHCP_SYMBOL_COMMON_H 28 29 /* 30 * This file contains DHCP symbol definitions that are shared between userland 31 * (libdhcputil) and standalone. The sharing is just for convenience; there's 32 * no inherent relationship between the two implementations. 33 * 34 * NOTE: This file should never be included directly, but rather through 35 * either <dhcp_symbol.h> or <dhcp_impl.h>. 36 */ 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /* 43 * Symbol category ids and strings 44 */ 45 typedef enum { 46 DSYM_BAD_CAT = -1, /* An invalid category */ 47 DSYM_STANDARD = 0, /* Standard option */ 48 DSYM_EXTEND = 1, /* Extended Standard option */ 49 DSYM_VENDOR = 2, /* Vendor-specific option */ 50 DSYM_SITE = 3, /* Site-specific option */ 51 DSYM_FIELD = 4, /* DHCP packet fixed field option */ 52 DSYM_INTERNAL = 5 /* Solaris DHCP internal option */ 53 } dsym_category_t; 54 55 /* 56 * Symbol type ids and strings 57 */ 58 typedef enum { 59 DSYM_BAD_TYPE = -1, /* An invalid type */ 60 DSYM_ASCII = 0, /* A printable character string */ 61 DSYM_OCTET = 1, /* An array of bytes */ 62 DSYM_IP = 2, /* An IP address */ 63 DSYM_NUMBER = 3, /* A signed number */ 64 DSYM_BOOL = 4, /* No associated value */ 65 DSYM_INCLUDE = 5, /* Include macro (internal only) */ 66 DSYM_UNUMBER8 = 6, /* An 8-bit unsigned integer */ 67 DSYM_UNUMBER16 = 7, /* A 16-bit unsigned integer */ 68 DSYM_UNUMBER32 = 8, /* A 32-bit unsigned integer */ 69 DSYM_UNUMBER64 = 9, /* A 64-bit unsigned integer */ 70 DSYM_SNUMBER8 = 10, /* An 8-bit signed integer */ 71 DSYM_SNUMBER16 = 11, /* A 16-bit signed integer */ 72 DSYM_SNUMBER32 = 12, /* A 32-bit signed integer */ 73 DSYM_SNUMBER64 = 13, /* A 64-bit signed integer */ 74 DSYM_UNUMBER24 = 14, /* A 24-bit unsigned integer */ 75 DSYM_IPV6 = 15, /* An IPv6 address */ 76 DSYM_DUID = 16, /* A DHCP Unique Identifier */ 77 DSYM_DOMAIN = 17 /* An RFC 1035-encoded domain name */ 78 } dsym_cdtype_t; 79 80 #ifdef __cplusplus 81 } 82 #endif 83 84 #endif /* _DHCP_SYMBOL_COMMON_H */ 85