xref: /illumos-gate/usr/src/cmd/cmd-inet/sbin/dhcpagent/defaults.h (revision b31320a79e2054c6739b5229259dbf98f3afc547)
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 /*
22a1196271SJames Carlson  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2369bb4bb4Scarlsonj  * Use is subject to license terms.
24*b31320a7SChris Fraire  * Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	DEFAULTS_H
287c478bd9Sstevel@tonic-gate #define	DEFAULTS_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #include <sys/types.h>
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate /*
337c478bd9Sstevel@tonic-gate  * defaults.[ch] encapsulate the agent's interface to the dhcpagent
347c478bd9Sstevel@tonic-gate  * defaults file.  see defaults.c for documentation on how to use the
357c478bd9Sstevel@tonic-gate  * exported functions.
367c478bd9Sstevel@tonic-gate  */
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
397c478bd9Sstevel@tonic-gate extern "C" {
407c478bd9Sstevel@tonic-gate #endif
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*
437c478bd9Sstevel@tonic-gate  * tunable parameters -- keep in the same order as defaults[] in defaults.c
447c478bd9Sstevel@tonic-gate  */
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate enum {
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate 	DF_RELEASE_ON_SIGTERM,	/* send RELEASE on each if upon SIGTERM */
4969bb4bb4Scarlsonj 	_UNUSED_DF_IGNORE_FAILED_ARP,
507c478bd9Sstevel@tonic-gate 	DF_OFFER_WAIT,		/* how long to wait to collect offers */
5169bb4bb4Scarlsonj 	_UNUSED_DF_ARP_WAIT,
527c478bd9Sstevel@tonic-gate 	DF_CLIENT_ID,		/* our client id */
537c478bd9Sstevel@tonic-gate 	DF_PARAM_REQUEST_LIST,	/* our parameter request list */
54d04ccbb3Scarlsonj 	DF_REQUEST_HOSTNAME,	/* request hostname associated with interface */
55d04ccbb3Scarlsonj 	DF_DEBUG_LEVEL,		/* set debug level (undocumented) */
56a1196271SJames Carlson 	DF_VERBOSE,		/* set verbose mode (undocumented) */
57a1196271SJames Carlson 	DF_VERIFIED_LEASE_ONLY,	/* send RELEASE on SIGTERM and need verify */
58*b31320a7SChris Fraire 	DF_PARAM_IGNORE_LIST,	/* our parameter ignore list */
59*b31320a7SChris Fraire 	DF_REQUEST_FQDN,	/* request FQDN associated with interface */
60*b31320a7SChris Fraire 	DF_V4_DEFAULT_IAID_DUID,	/* IAID/DUID if no DF_CLIENT_ID */
61*b31320a7SChris Fraire 	DF_DNS_DOMAINNAME,	/* static domain name if not in --reqhost */
62*b31320a7SChris Fraire 	DF_ADOPT_DOMAINNAME	/* adopt DHCP domain if not in --reqhost */
637c478bd9Sstevel@tonic-gate };
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate #define	DHCP_AGENT_DEFAULTS	"/etc/default/dhcpagent"
667c478bd9Sstevel@tonic-gate 
67d04ccbb3Scarlsonj boolean_t	df_get_bool(const char *, boolean_t, uint_t);
68d04ccbb3Scarlsonj int		df_get_int(const char *, boolean_t, uint_t);
69d04ccbb3Scarlsonj const char	*df_get_string(const char *, boolean_t, uint_t);
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
727c478bd9Sstevel@tonic-gate }
737c478bd9Sstevel@tonic-gate #endif
747c478bd9Sstevel@tonic-gate 
757c478bd9Sstevel@tonic-gate #endif	/* DEFAULTS_H */
76