xref: /titanic_41/usr/src/cmd/cmd-inet/sbin/dhcpagent/defaults.h (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
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.
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 /*
23  * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	DEFAULTS_H
28 #define	DEFAULTS_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/types.h>
33 
34 /*
35  * defaults.[ch] encapsulate the agent's interface to the dhcpagent
36  * defaults file.  see defaults.c for documentation on how to use the
37  * exported functions.
38  */
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * tunable parameters -- keep in the same order as defaults[] in defaults.c
46  */
47 
48 enum {
49 
50 	DF_RELEASE_ON_SIGTERM,	/* send RELEASE on each if upon SIGTERM */
51 	DF_IGNORE_FAILED_ARP,	/* what to do if agent can't ARP */
52 	DF_OFFER_WAIT,		/* how long to wait to collect offers */
53 	DF_ARP_WAIT,		/* how long to wait for an ARP reply */
54 	DF_CLIENT_ID,		/* our client id */
55 	DF_PARAM_REQUEST_LIST,	/* our parameter request list */
56 	DF_REQUEST_HOSTNAME	/* request hostname associated with interface */
57 };
58 
59 #define	DHCP_AGENT_DEFAULTS	"/etc/default/dhcpagent"
60 
61 boolean_t	df_get_bool(const char *, unsigned int);
62 int		df_get_int(const char *, unsigned int);
63 const char	*df_get_string(const char *, unsigned int);
64 uchar_t		*df_get_octet(const char *, unsigned int, unsigned int *);
65 
66 #ifdef	__cplusplus
67 }
68 #endif
69 
70 #endif	/* DEFAULTS_H */
71