Home | History | Annotate | Download | only in nwamd
      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 (the "License").
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets "[]" replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 
     22 /*
     23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     24  * Use is subject to license terms.
     25  */
     26 
     27 #ifndef _DEFINES_H
     28 #define	_DEFINES_H
     29 
     30 #include <sys/time.h>
     31 
     32 #define	PKILL		"/usr/bin/pkill"
     33 #define	IFCONFIG	"/sbin/ifconfig"
     34 #define	NET_SVC_METHOD	"/lib/svc/method/net-svc"
     35 #define	DEV_LOCAL_SVC_FMRI "svc:/system/device/local:default"
     36 #define	PFEXEC		"/usr/bin/pfexec"
     37 
     38 #define	ULP_DIR		"/etc/nwam/ulp"
     39 #define	LLPDIRNAME	"/etc/nwam"
     40 #define	LLPDIRMODE	S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
     41 #define	LLPFILE		LLPDIRNAME "/llp"
     42 #define	LLPFILETMP	LLPDIRNAME "/llp.tmp"
     43 #define	KNOWN_WIFI_NETS	LLPDIRNAME "/known_wifi_nets"
     44 #define	KNOWN_WIFI_TMP	LLPDIRNAME "/known_wifi_nets.tmp"
     45 
     46 #define	DOOR_FILENAME	"/etc/svc/volatile/nwam_door"
     47 #define	DOOR_FILEMODE	S_IRUSR | S_IRGRP | S_IROTH
     48 
     49 #define	BOOLEAN_TO_STRING(x) ((x) ? "TRUE" : "FALSE")
     50 #define	STRING(s) (((s) == NULL) ? "NULL" : (s))
     51 
     52 #define	NWAM_DEFAULT_DHCP_WAIT_TIME	60	/* 1 minute */
     53 #define	NWAM_IF_WAIT_DELTA_MAX		300	/* 5 minutes poll rate max */
     54 
     55 #define	TIMER_INFINITY		0xffffffff	/* we use uint32s for timers */
     56 #define	NSEC_TO_SEC(nsec)	(nsec) / NANOSEC
     57 
     58 #endif /* _DEFINES_H */
     59