xref: /illumos-gate/usr/src/cmd/cmd-inet/lib/nwamd/ncp.h (revision f6da83d4)
16ba597c5SAnurag S. Maskey /*
26ba597c5SAnurag S. Maskey  * CDDL HEADER START
36ba597c5SAnurag S. Maskey  *
46ba597c5SAnurag S. Maskey  * The contents of this file are subject to the terms of the
56ba597c5SAnurag S. Maskey  * Common Development and Distribution License (the "License").
66ba597c5SAnurag S. Maskey  * You may not use this file except in compliance with the License.
76ba597c5SAnurag S. Maskey  *
86ba597c5SAnurag S. Maskey  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96ba597c5SAnurag S. Maskey  * or http://www.opensolaris.org/os/licensing.
106ba597c5SAnurag S. Maskey  * See the License for the specific language governing permissions
116ba597c5SAnurag S. Maskey  * and limitations under the License.
126ba597c5SAnurag S. Maskey  *
136ba597c5SAnurag S. Maskey  * When distributing Covered Code, include this CDDL HEADER in each
146ba597c5SAnurag S. Maskey  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156ba597c5SAnurag S. Maskey  * If applicable, add the following below this CDDL HEADER, with the
166ba597c5SAnurag S. Maskey  * fields enclosed by brackets "[]" replaced with your own identifying
176ba597c5SAnurag S. Maskey  * information: Portions Copyright [yyyy] [name of copyright owner]
186ba597c5SAnurag S. Maskey  *
196ba597c5SAnurag S. Maskey  * CDDL HEADER END
206ba597c5SAnurag S. Maskey  */
216ba597c5SAnurag S. Maskey 
226ba597c5SAnurag S. Maskey /*
23*f6da83d4SAnurag S. Maskey  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
246ba597c5SAnurag S. Maskey  */
256ba597c5SAnurag S. Maskey 
266ba597c5SAnurag S. Maskey #ifndef _NCP_H
276ba597c5SAnurag S. Maskey #define	_NCP_H
286ba597c5SAnurag S. Maskey 
296ba597c5SAnurag S. Maskey #include <libdladm.h>
306ba597c5SAnurag S. Maskey #include <libdlpi.h>
316ba597c5SAnurag S. Maskey #include <libdlwlan.h>
326ba597c5SAnurag S. Maskey #include <libnwam.h>
336ba597c5SAnurag S. Maskey #include <libuutil.h>
346ba597c5SAnurag S. Maskey #include <pthread.h>
356ba597c5SAnurag S. Maskey 
366ba597c5SAnurag S. Maskey /* Time between NCU checks */
376ba597c5SAnurag S. Maskey #define	NCU_WAIT_TIME_DEFAULT		120
386ba597c5SAnurag S. Maskey 
396ba597c5SAnurag S. Maskey /* Value of priority-group at start and reset */
406ba597c5SAnurag S. Maskey #define	INVALID_PRIORITY_GROUP		-1LL
416ba597c5SAnurag S. Maskey 
426ba597c5SAnurag S. Maskey extern char active_ncp[];
436ba597c5SAnurag S. Maskey extern nwam_ncp_handle_t active_ncph;
446ba597c5SAnurag S. Maskey extern int64_t current_ncu_priority_group;
456ba597c5SAnurag S. Maskey extern uint64_t ncu_wait_time;
466ba597c5SAnurag S. Maskey 
476ba597c5SAnurag S. Maskey boolean_t nwamd_ncp_find_next_priority_group(int64_t, int64_t *);
486ba597c5SAnurag S. Maskey void nwamd_ncp_activate_priority_group(int64_t);
496ba597c5SAnurag S. Maskey void nwamd_ncp_deactivate_priority_group(int64_t);
506ba597c5SAnurag S. Maskey void nwamd_ncp_deactivate_priority_group_all(int64_t);
516ba597c5SAnurag S. Maskey boolean_t nwamd_ncp_check_priority_group(int64_t *);
526ba597c5SAnurag S. Maskey void nwamd_ncp_activate_manual_ncus(void);
536ba597c5SAnurag S. Maskey 
546ba597c5SAnurag S. Maskey /* Create ncu check event */
556ba597c5SAnurag S. Maskey void nwamd_create_ncu_check_event(uint64_t);
566ba597c5SAnurag S. Maskey 
576ba597c5SAnurag S. Maskey #endif /* _NCP_H */
58