/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _DHCP_SYMBOL_H
#define _DHCP_SYMBOL_H
/*
* This file, along with <dhcp_symbol_common.h>, contains the DHCP symbol
* constants and the definitions for the external interfaces to the parsing
* logic (contained in dhcp_symbol.c) for symbol definitions. These
* definitions can and should be used by all consumers of DHCP symbols.
*/
#include <dhcp_svc_private.h>
#include <dhcp_symbol_common.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Vendor class length (and implicitly, the number of classes)
*/
/*
* Maximum symbol length is defined by the libdhcpsvc.
*/
/*
* symbol parsing error codes
*/
typedef enum {
/*
* symbol fields
*/
#define DSYM_CAT_FIELD 0
/*
* This structure is used by the dhcp_symbol_t structure below
* when the option being defined is a vendor option. In which case,
* this structure contains the client classes for which the option
* applies.
*/
typedef struct dhcp_classes {
char **dc_names;
/*
* This structure is used to define a DHCP symbol. The structure is
* used by both the inittab parsing routines and by the dhcptab parsing
* routines to define a symbol definition in either of those tables.
* Note that ds_dhcpv6 is defined last so that it needn't be initialized
* as part of the inittab_table[] definition.
*/
typedef struct dhcp_symbol {
extern void dsym_free_fields(char **);
extern void dsym_free_classes(dhcp_classes_t *);
extern void dsym_close_parser(char **, dhcp_symbol_t *);
extern dsym_errcode_t dsym_init_parser(const char *, const char *, char ***,
dhcp_symbol_t *);
#ifdef __cplusplus
}
#endif
#endif /* _DHCP_SYMBOL_H */