dhcp_symbol.h (7c478bd9) dhcp_symbol.h (d04ccbb3)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
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, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
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/*
23 * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _DHCP_SYMBOL_H
28#define _DHCP_SYMBOL_H
29
30#pragma ident "%Z%%M% %I% %E% SMI"
31

--- 62 unchanged lines hidden (view full) ---

94 char **dc_names;
95 uint8_t dc_cnt;
96} dhcp_classes_t;
97
98/*
99 * This structure is used to define a DHCP symbol. The structure is
100 * used by both the inittab parsing routines and by the dhcptab parsing
101 * routines to define a symbol definition in either of those tables.
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

--- 62 unchanged lines hidden (view full) ---

93 char **dc_names;
94 uint8_t dc_cnt;
95} dhcp_classes_t;
96
97/*
98 * This structure is used to define a DHCP symbol. The structure is
99 * used by both the inittab parsing routines and by the dhcptab parsing
100 * routines to define a symbol definition in either of those tables.
101 * Note that ds_dhcpv6 is defined last so that it needn't be initialized
102 * as part of the inittab_table[] definition.
102 */
103typedef struct dhcp_symbol {
104 dsym_category_t ds_category; /* category */
105 ushort_t ds_code; /* option code */
106 char ds_name[DSYM_MAX_SYM_LEN + 1]; /* option name */
107 dsym_cdtype_t ds_type; /* type of parm */
108 uchar_t ds_gran; /* granularity */
109 uchar_t ds_max; /* maximum number */
110 dhcp_classes_t ds_classes; /* client classes */
103 */
104typedef struct dhcp_symbol {
105 dsym_category_t ds_category; /* category */
106 ushort_t ds_code; /* option code */
107 char ds_name[DSYM_MAX_SYM_LEN + 1]; /* option name */
108 dsym_cdtype_t ds_type; /* type of parm */
109 uchar_t ds_gran; /* granularity */
110 uchar_t ds_max; /* maximum number */
111 dhcp_classes_t ds_classes; /* client classes */
112 uchar_t ds_dhcpv6; /* dhcpv6 flag */
111} dhcp_symbol_t;
112
113extern void dsym_free_fields(char **);
114extern void dsym_free_classes(dhcp_classes_t *);
115extern void dsym_close_parser(char **, dhcp_symbol_t *);
116extern dsym_errcode_t dsym_init_parser(const char *, const char *, char ***,
117 dhcp_symbol_t *);
118extern dsym_errcode_t dsym_parse_field(int, char **, dhcp_symbol_t *);

--- 13 unchanged lines hidden ---
113} dhcp_symbol_t;
114
115extern void dsym_free_fields(char **);
116extern void dsym_free_classes(dhcp_classes_t *);
117extern void dsym_close_parser(char **, dhcp_symbol_t *);
118extern dsym_errcode_t dsym_init_parser(const char *, const char *, char ***,
119 dhcp_symbol_t *);
120extern dsym_errcode_t dsym_parse_field(int, char **, dhcp_symbol_t *);

--- 13 unchanged lines hidden ---