xref: /titanic_50/usr/src/common/net/dhcp/dhcp_symbol_common.h (revision d04ccbb3f3163ae5962a8b7465d9796bff6ca434)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*d04ccbb3Scarlsonj  * Common Development and Distribution License (the "License").
6*d04ccbb3Scarlsonj  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*d04ccbb3Scarlsonj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef _DHCP_SYMBOL_COMMON_H
277c478bd9Sstevel@tonic-gate #define	_DHCP_SYMBOL_COMMON_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate /*
327c478bd9Sstevel@tonic-gate  * This file contains DHCP symbol definitions that are shared between userland
337c478bd9Sstevel@tonic-gate  * (libdhcputil) and standalone.  The sharing is just for convenience; there's
347c478bd9Sstevel@tonic-gate  * no inherent relationship between the two implementations.
357c478bd9Sstevel@tonic-gate  *
367c478bd9Sstevel@tonic-gate  * NOTE: This file should never be included directly, but rather through
377c478bd9Sstevel@tonic-gate  *       either <dhcp_symbol.h> or <dhcp_impl.h>.
387c478bd9Sstevel@tonic-gate  */
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate #ifdef __cplusplus
417c478bd9Sstevel@tonic-gate extern "C" {
427c478bd9Sstevel@tonic-gate #endif
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate /*
457c478bd9Sstevel@tonic-gate  * Symbol category ids and strings
467c478bd9Sstevel@tonic-gate  */
477c478bd9Sstevel@tonic-gate typedef enum {
487c478bd9Sstevel@tonic-gate 	DSYM_BAD_CAT	= -1,	/* An invalid category */
497c478bd9Sstevel@tonic-gate 	DSYM_STANDARD	= 0,	/* Standard option */
507c478bd9Sstevel@tonic-gate 	DSYM_EXTEND	= 1,	/* Extended Standard option */
517c478bd9Sstevel@tonic-gate 	DSYM_VENDOR	= 2,	/* Vendor-specific option */
527c478bd9Sstevel@tonic-gate 	DSYM_SITE	= 3,	/* Site-specific option */
537c478bd9Sstevel@tonic-gate 	DSYM_FIELD	= 4,	/* DHCP packet fixed field option */
547c478bd9Sstevel@tonic-gate 	DSYM_INTERNAL	= 5	/* Solaris DHCP internal option */
557c478bd9Sstevel@tonic-gate } dsym_category_t;
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate /*
587c478bd9Sstevel@tonic-gate  * Symbol type ids and strings
597c478bd9Sstevel@tonic-gate  */
607c478bd9Sstevel@tonic-gate typedef enum {
617c478bd9Sstevel@tonic-gate 	DSYM_BAD_TYPE	= -1,	/* An invalid type */
627c478bd9Sstevel@tonic-gate 	DSYM_ASCII	= 0,	/* A printable character string */
637c478bd9Sstevel@tonic-gate 	DSYM_OCTET	= 1,	/* An array of bytes */
647c478bd9Sstevel@tonic-gate 	DSYM_IP		= 2,	/* An IP address */
657c478bd9Sstevel@tonic-gate 	DSYM_NUMBER	= 3,	/* A signed number */
667c478bd9Sstevel@tonic-gate 	DSYM_BOOL	= 4,	/* No associated value */
677c478bd9Sstevel@tonic-gate 	DSYM_INCLUDE	= 5,	/* Include macro (internal only) */
687c478bd9Sstevel@tonic-gate 	DSYM_UNUMBER8	= 6,	/* An 8-bit unsigned integer */
697c478bd9Sstevel@tonic-gate 	DSYM_UNUMBER16	= 7,	/* A 16-bit unsigned integer */
707c478bd9Sstevel@tonic-gate 	DSYM_UNUMBER32	= 8,	/* A 32-bit unsigned integer */
717c478bd9Sstevel@tonic-gate 	DSYM_UNUMBER64	= 9,	/* A 64-bit unsigned integer */
727c478bd9Sstevel@tonic-gate 	DSYM_SNUMBER8	= 10,	/* An 8-bit signed integer */
737c478bd9Sstevel@tonic-gate 	DSYM_SNUMBER16	= 11,	/* A 16-bit signed integer */
747c478bd9Sstevel@tonic-gate 	DSYM_SNUMBER32	= 12,	/* A 32-bit signed integer */
75*d04ccbb3Scarlsonj 	DSYM_SNUMBER64	= 13,	/* A 64-bit signed integer */
76*d04ccbb3Scarlsonj 	DSYM_UNUMBER24	= 14,	/* A 24-bit unsigned integer */
77*d04ccbb3Scarlsonj 	DSYM_IPV6	= 15,	/* An IPv6 address */
78*d04ccbb3Scarlsonj 	DSYM_DUID	= 16,	/* A DHCP Unique Identifier */
79*d04ccbb3Scarlsonj 	DSYM_DOMAIN	= 17	/* An RFC 1035-encoded domain name */
807c478bd9Sstevel@tonic-gate } dsym_cdtype_t;
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #ifdef __cplusplus
837c478bd9Sstevel@tonic-gate }
847c478bd9Sstevel@tonic-gate #endif
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate #endif /* _DHCP_SYMBOL_COMMON_H */
87