Print this page
4174 Torch the old and unmaintained Sun-dhcp
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>


   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_H
  27 #define _DHCP_SYMBOL_H
  28 
  29 #pragma ident   "%Z%%M% %I%     %E% SMI"
  30 
  31 /*
  32  * This file, along with <dhcp_symbol_common.h>, contains the DHCP symbol
  33  * constants and the definitions for the external interfaces to the parsing
  34  * logic (contained in dhcp_symbol.c) for symbol definitions. These
  35  * definitions can and should be used by all consumers of DHCP symbols.
  36  */
  37 
  38 #include <sys/types.h>
  39 #include <dhcp_svc_private.h>
  40 #include <dhcp_symbol_common.h>
  41 
  42 #ifdef  __cplusplus
  43 extern "C" {
  44 #endif
  45 
  46 /*
  47  * Vendor class length (and implicitly, the number of classes)
  48  */
  49 #define DSYM_CLASS_SIZE         DSVC_MAX_MACSYM_LEN     /* Single class max */
  50 #define DSYM_MAX_CLASS_SIZE     (DSYM_CLASS_SIZE * 10)  /* At least 10 */
  51 
  52 /*
  53  * Maximum symbol length is defined by the libdhcpsvc.
  54  */
  55 #define DSYM_MAX_SYM_LEN        DSVC_MAX_MACSYM_LEN
  56 
  57 /*
  58  * symbol parsing error codes
  59  */
  60 typedef enum {
  61         DSYM_SUCCESS,
  62         DSYM_SYNTAX_ERROR,
  63         DSYM_NULL_FIELD,
  64         DSYM_TOO_MANY_FIELDS,
  65         DSYM_CODE_OUT_OF_RANGE,
  66         DSYM_VALUE_OUT_OF_RANGE,
  67         DSYM_INVALID_CAT,
  68         DSYM_INVALID_TYPE,
  69         DSYM_EXCEEDS_CLASS_SIZE,
  70         DSYM_EXCEEDS_MAX_CLASS_SIZE,
  71         DSYM_NO_MEMORY,
  72         DSYM_INVALID_FIELD_NUM
  73 } dsym_errcode_t;
  74 
  75 /*




   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 2014 Garrett D'Amore <garrett@damore.org>
  23  *
  24  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 #ifndef _DHCP_SYMBOL_H
  29 #define _DHCP_SYMBOL_H
  30 


  31 /*
  32  * This file, along with <dhcp_symbol_common.h>, contains the DHCP symbol
  33  * constants and the definitions for the external interfaces to the parsing
  34  * logic (contained in dhcp_symbol.c) for symbol definitions. These
  35  * definitions can and should be used by all consumers of DHCP symbols.
  36  */
  37 
  38 #include <sys/types.h>

  39 #include <dhcp_symbol_common.h>
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 /*
  46  * Vendor class length (and implicitly, the number of classes)
  47  */
  48 #define DSYM_CLASS_SIZE         128                     /* Single class max */
  49 #define DSYM_MAX_CLASS_SIZE     (DSYM_CLASS_SIZE * 10)  /* At least 10 */
  50 
  51 /*
  52  * Maximum symbol length
  53  */
  54 #define DSYM_MAX_SYM_LEN        128
  55 
  56 /*
  57  * symbol parsing error codes
  58  */
  59 typedef enum {
  60         DSYM_SUCCESS,
  61         DSYM_SYNTAX_ERROR,
  62         DSYM_NULL_FIELD,
  63         DSYM_TOO_MANY_FIELDS,
  64         DSYM_CODE_OUT_OF_RANGE,
  65         DSYM_VALUE_OUT_OF_RANGE,
  66         DSYM_INVALID_CAT,
  67         DSYM_INVALID_TYPE,
  68         DSYM_EXCEEDS_CLASS_SIZE,
  69         DSYM_EXCEEDS_MAX_CLASS_SIZE,
  70         DSYM_NO_MEMORY,
  71         DSYM_INVALID_FIELD_NUM
  72 } dsym_errcode_t;
  73 
  74 /*