1*6ba597c5SAnurag S. Maskey /*
2*6ba597c5SAnurag S. Maskey  * CDDL HEADER START
3*6ba597c5SAnurag S. Maskey  *
4*6ba597c5SAnurag S. Maskey  * The contents of this file are subject to the terms of the
5*6ba597c5SAnurag S. Maskey  * Common Development and Distribution License (the "License").
6*6ba597c5SAnurag S. Maskey  * You may not use this file except in compliance with the License.
7*6ba597c5SAnurag S. Maskey  *
8*6ba597c5SAnurag S. Maskey  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*6ba597c5SAnurag S. Maskey  * or http://www.opensolaris.org/os/licensing.
10*6ba597c5SAnurag S. Maskey  * See the License for the specific language governing permissions
11*6ba597c5SAnurag S. Maskey  * and limitations under the License.
12*6ba597c5SAnurag S. Maskey  *
13*6ba597c5SAnurag S. Maskey  * When distributing Covered Code, include this CDDL HEADER in each
14*6ba597c5SAnurag S. Maskey  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*6ba597c5SAnurag S. Maskey  * If applicable, add the following below this CDDL HEADER, with the
16*6ba597c5SAnurag S. Maskey  * fields enclosed by brackets "[]" replaced with your own identifying
17*6ba597c5SAnurag S. Maskey  * information: Portions Copyright [yyyy] [name of copyright owner]
18*6ba597c5SAnurag S. Maskey  *
19*6ba597c5SAnurag S. Maskey  * CDDL HEADER END
20*6ba597c5SAnurag S. Maskey  */
21*6ba597c5SAnurag S. Maskey 
22*6ba597c5SAnurag S. Maskey /*
23*6ba597c5SAnurag S. Maskey  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24*6ba597c5SAnurag S. Maskey  * Use is subject to license terms.
25*6ba597c5SAnurag S. Maskey  */
26*6ba597c5SAnurag S. Maskey 
27*6ba597c5SAnurag S. Maskey #ifndef _CONDITIONS_H
28*6ba597c5SAnurag S. Maskey #define	_CONDITIONS_H
29*6ba597c5SAnurag S. Maskey 
30*6ba597c5SAnurag S. Maskey #include <libnwam.h>
31*6ba597c5SAnurag S. Maskey 
32*6ba597c5SAnurag S. Maskey #define	CONDITION_CHECK_INTERVAL_DEFAULT	120
33*6ba597c5SAnurag S. Maskey #define	CONDITION_CHECK_INTERVAL_MIN		30
34*6ba597c5SAnurag S. Maskey 
35*6ba597c5SAnurag S. Maskey extern uint64_t condition_check_interval;
36*6ba597c5SAnurag S. Maskey 
37*6ba597c5SAnurag S. Maskey /* Common condition check function */
38*6ba597c5SAnurag S. Maskey extern boolean_t nwamd_check_conditions(nwam_activation_mode_t, char **,
39*6ba597c5SAnurag S. Maskey     uint_t);
40*6ba597c5SAnurag S. Maskey /* Rate condition (used to pick best location condition) */
41*6ba597c5SAnurag S. Maskey extern uint64_t nwamd_rate_conditions(nwam_activation_mode_t, char **,
42*6ba597c5SAnurag S. Maskey     uint_t);
43*6ba597c5SAnurag S. Maskey 
44*6ba597c5SAnurag S. Maskey /* Check activation conditions */
45*6ba597c5SAnurag S. Maskey extern void nwamd_set_timed_check_all_conditions(void);
46*6ba597c5SAnurag S. Maskey extern void nwamd_check_all_conditions(void);
47*6ba597c5SAnurag S. Maskey 
48*6ba597c5SAnurag S. Maskey /* Create condition check events */
49*6ba597c5SAnurag S. Maskey extern void nwamd_create_timed_condition_check_event(void);
50*6ba597c5SAnurag S. Maskey extern void nwamd_create_triggered_condition_check_event(uint32_t);
51*6ba597c5SAnurag S. Maskey 
52*6ba597c5SAnurag S. Maskey #endif /* _CONDITIONS_H */
53