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