xref: /titanic_51/usr/src/cmd/cmd-inet/sbin/dhcpagent/defaults.h (revision a1196271e1d6e6ce9cc40c8b94f5b659935e82bc)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
569bb4bb4Scarlsonj  * Common Development and Distribution License (the "License").
669bb4bb4Scarlsonj  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*a1196271SJames Carlson  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2369bb4bb4Scarlsonj  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	DEFAULTS_H
277c478bd9Sstevel@tonic-gate #define	DEFAULTS_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #include <sys/types.h>
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate /*
327c478bd9Sstevel@tonic-gate  * defaults.[ch] encapsulate the agent's interface to the dhcpagent
337c478bd9Sstevel@tonic-gate  * defaults file.  see defaults.c for documentation on how to use the
347c478bd9Sstevel@tonic-gate  * exported functions.
357c478bd9Sstevel@tonic-gate  */
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
387c478bd9Sstevel@tonic-gate extern "C" {
397c478bd9Sstevel@tonic-gate #endif
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate /*
427c478bd9Sstevel@tonic-gate  * tunable parameters -- keep in the same order as defaults[] in defaults.c
437c478bd9Sstevel@tonic-gate  */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate enum {
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate 	DF_RELEASE_ON_SIGTERM,	/* send RELEASE on each if upon SIGTERM */
4869bb4bb4Scarlsonj 	_UNUSED_DF_IGNORE_FAILED_ARP,
497c478bd9Sstevel@tonic-gate 	DF_OFFER_WAIT,		/* how long to wait to collect offers */
5069bb4bb4Scarlsonj 	_UNUSED_DF_ARP_WAIT,
517c478bd9Sstevel@tonic-gate 	DF_CLIENT_ID,		/* our client id */
527c478bd9Sstevel@tonic-gate 	DF_PARAM_REQUEST_LIST,	/* our parameter request list */
53d04ccbb3Scarlsonj 	DF_REQUEST_HOSTNAME,	/* request hostname associated with interface */
54d04ccbb3Scarlsonj 	DF_DEBUG_LEVEL,		/* set debug level (undocumented) */
55*a1196271SJames Carlson 	DF_VERBOSE,		/* set verbose mode (undocumented) */
56*a1196271SJames Carlson 	DF_VERIFIED_LEASE_ONLY,	/* send RELEASE on SIGTERM and need verify */
57*a1196271SJames Carlson 	DF_PARAM_IGNORE_LIST	/* our parameter ignore list */
587c478bd9Sstevel@tonic-gate };
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate #define	DHCP_AGENT_DEFAULTS	"/etc/default/dhcpagent"
617c478bd9Sstevel@tonic-gate 
62d04ccbb3Scarlsonj boolean_t	df_get_bool(const char *, boolean_t, uint_t);
63d04ccbb3Scarlsonj int		df_get_int(const char *, boolean_t, uint_t);
64d04ccbb3Scarlsonj const char	*df_get_string(const char *, boolean_t, uint_t);
657c478bd9Sstevel@tonic-gate 
667c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
677c478bd9Sstevel@tonic-gate }
687c478bd9Sstevel@tonic-gate #endif
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate #endif	/* DEFAULTS_H */
71