xref: /onnv-gate/usr/src/common/net/dhcp/dhcp_symbol_common.h (revision 3431:9f2d277dcffa)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*3431Scarlsonj  * Common Development and Distribution License (the "License").
6*3431Scarlsonj  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*3431Scarlsonj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef _DHCP_SYMBOL_COMMON_H
270Sstevel@tonic-gate #define	_DHCP_SYMBOL_COMMON_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate 
310Sstevel@tonic-gate /*
320Sstevel@tonic-gate  * This file contains DHCP symbol definitions that are shared between userland
330Sstevel@tonic-gate  * (libdhcputil) and standalone.  The sharing is just for convenience; there's
340Sstevel@tonic-gate  * no inherent relationship between the two implementations.
350Sstevel@tonic-gate  *
360Sstevel@tonic-gate  * NOTE: This file should never be included directly, but rather through
370Sstevel@tonic-gate  *       either <dhcp_symbol.h> or <dhcp_impl.h>.
380Sstevel@tonic-gate  */
390Sstevel@tonic-gate 
400Sstevel@tonic-gate #ifdef __cplusplus
410Sstevel@tonic-gate extern "C" {
420Sstevel@tonic-gate #endif
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * Symbol category ids and strings
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate typedef enum {
480Sstevel@tonic-gate 	DSYM_BAD_CAT	= -1,	/* An invalid category */
490Sstevel@tonic-gate 	DSYM_STANDARD	= 0,	/* Standard option */
500Sstevel@tonic-gate 	DSYM_EXTEND	= 1,	/* Extended Standard option */
510Sstevel@tonic-gate 	DSYM_VENDOR	= 2,	/* Vendor-specific option */
520Sstevel@tonic-gate 	DSYM_SITE	= 3,	/* Site-specific option */
530Sstevel@tonic-gate 	DSYM_FIELD	= 4,	/* DHCP packet fixed field option */
540Sstevel@tonic-gate 	DSYM_INTERNAL	= 5	/* Solaris DHCP internal option */
550Sstevel@tonic-gate } dsym_category_t;
560Sstevel@tonic-gate 
570Sstevel@tonic-gate /*
580Sstevel@tonic-gate  * Symbol type ids and strings
590Sstevel@tonic-gate  */
600Sstevel@tonic-gate typedef enum {
610Sstevel@tonic-gate 	DSYM_BAD_TYPE	= -1,	/* An invalid type */
620Sstevel@tonic-gate 	DSYM_ASCII	= 0,	/* A printable character string */
630Sstevel@tonic-gate 	DSYM_OCTET	= 1,	/* An array of bytes */
640Sstevel@tonic-gate 	DSYM_IP		= 2,	/* An IP address */
650Sstevel@tonic-gate 	DSYM_NUMBER	= 3,	/* A signed number */
660Sstevel@tonic-gate 	DSYM_BOOL	= 4,	/* No associated value */
670Sstevel@tonic-gate 	DSYM_INCLUDE	= 5,	/* Include macro (internal only) */
680Sstevel@tonic-gate 	DSYM_UNUMBER8	= 6,	/* An 8-bit unsigned integer */
690Sstevel@tonic-gate 	DSYM_UNUMBER16	= 7,	/* A 16-bit unsigned integer */
700Sstevel@tonic-gate 	DSYM_UNUMBER32	= 8,	/* A 32-bit unsigned integer */
710Sstevel@tonic-gate 	DSYM_UNUMBER64	= 9,	/* A 64-bit unsigned integer */
720Sstevel@tonic-gate 	DSYM_SNUMBER8	= 10,	/* An 8-bit signed integer */
730Sstevel@tonic-gate 	DSYM_SNUMBER16	= 11,	/* A 16-bit signed integer */
740Sstevel@tonic-gate 	DSYM_SNUMBER32	= 12,	/* A 32-bit signed integer */
75*3431Scarlsonj 	DSYM_SNUMBER64	= 13,	/* A 64-bit signed integer */
76*3431Scarlsonj 	DSYM_UNUMBER24	= 14,	/* A 24-bit unsigned integer */
77*3431Scarlsonj 	DSYM_IPV6	= 15,	/* An IPv6 address */
78*3431Scarlsonj 	DSYM_DUID	= 16,	/* A DHCP Unique Identifier */
79*3431Scarlsonj 	DSYM_DOMAIN	= 17	/* An RFC 1035-encoded domain name */
800Sstevel@tonic-gate } dsym_cdtype_t;
810Sstevel@tonic-gate 
820Sstevel@tonic-gate #ifdef __cplusplus
830Sstevel@tonic-gate }
840Sstevel@tonic-gate #endif
850Sstevel@tonic-gate 
860Sstevel@tonic-gate #endif /* _DHCP_SYMBOL_COMMON_H */
87