xref: /titanic_41/usr/src/common/net/dhcp/dhcp_symbol_common.h (revision f48205be61a214698b763ff550ab9e657525104c)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * This file contains DHCP symbol definitions that are shared between userland
33  * (libdhcputil) and standalone.  The sharing is just for convenience; there's
34  * no inherent relationship between the two implementations.
35  *
36  * NOTE: This file should never be included directly, but rather through
37  *       either <dhcp_symbol.h> or <dhcp_impl.h>.
38  */
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * Symbol category ids and strings
46  */
47 typedef enum {
48 	DSYM_BAD_CAT	= -1,	/* An invalid category */
49 	DSYM_STANDARD	= 0,	/* Standard option */
50 	DSYM_EXTEND	= 1,	/* Extended Standard option */
51 	DSYM_VENDOR	= 2,	/* Vendor-specific option */
52 	DSYM_SITE	= 3,	/* Site-specific option */
53 	DSYM_FIELD	= 4,	/* DHCP packet fixed field option */
54 	DSYM_INTERNAL	= 5	/* Solaris DHCP internal option */
55 } dsym_category_t;
56 
57 /*
58  * Symbol type ids and strings
59  */
60 typedef enum {
61 	DSYM_BAD_TYPE	= -1,	/* An invalid type */
62 	DSYM_ASCII	= 0,	/* A printable character string */
63 	DSYM_OCTET	= 1,	/* An array of bytes */
64 	DSYM_IP		= 2,	/* An IP address */
65 	DSYM_NUMBER	= 3,	/* A signed number */
66 	DSYM_BOOL	= 4,	/* No associated value */
67 	DSYM_INCLUDE	= 5,	/* Include macro (internal only) */
68 	DSYM_UNUMBER8	= 6,	/* An 8-bit unsigned integer */
69 	DSYM_UNUMBER16	= 7,	/* A 16-bit unsigned integer */
70 	DSYM_UNUMBER32	= 8,	/* A 32-bit unsigned integer */
71 	DSYM_UNUMBER64	= 9,	/* A 64-bit unsigned integer */
72 	DSYM_SNUMBER8	= 10,	/* An 8-bit signed integer */
73 	DSYM_SNUMBER16	= 11,	/* A 16-bit signed integer */
74 	DSYM_SNUMBER32	= 12,	/* A 32-bit signed integer */
75 	DSYM_SNUMBER64	= 13,	/* A 64-bit signed integer */
76 	DSYM_UNUMBER24	= 14,	/* A 24-bit unsigned integer */
77 	DSYM_IPV6	= 15,	/* An IPv6 address */
78 	DSYM_DUID	= 16,	/* A DHCP Unique Identifier */
79 	DSYM_DOMAIN	= 17	/* An RFC 1035-encoded domain name */
80 } dsym_cdtype_t;
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* _DHCP_SYMBOL_COMMON_H */
87