Home | History | Annotate | Download | only in exe
      1 /*
      2  * Common code for dhd utility, hacked from wl utility
      3  *
      4  * Copyright (C) 1999-2010, Broadcom Corporation
      5  *
      6  *      Unless you and Broadcom execute a separate written software license
      7  * agreement governing use of this software, this software is licensed to you
      8  * under the terms of the GNU General Public License version 2 (the "GPL"),
      9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
     10  * following added to such license:
     11  *
     12  *      As a special exception, the copyright holders of this software give you
     13  * permission to link this software with independent modules, and to copy and
     14  * distribute the resulting executable under terms of your choice, provided that
     15  * you also meet, for each linked independent module, the terms and conditions of
     16  * the license of that module.  An independent module is a module which is not
     17  * derived from this software.  The special exception does not apply to any
     18  * modifications of the software.
     19  *
     20  *      Notwithstanding the above, under no circumstances may you combine this
     21  * software in any way with any other Broadcom software provided under a license
     22  * other than the GPL, without Broadcom's express prior written consent.
     23  *
     24  * $Id: dhdu.h,v 1.3.10.2.14.1 2008/11/20 00:20:34 Exp $
     25  */
     26 
     27 #ifndef _dhdu_h_
     28 #define _dhdu_h_
     29 
     30 #include "dhdu_cmd.h"
     31 
     32 extern char *dhdu_av0;
     33 
     34 /* parse common option */
     35 extern int dhd_option(char ***pargv, char **pifname, int *phelp);
     36 extern void dhd_cmd_init(void);
     37 
     38 /* print usage */
     39 extern void dhd_cmd_usage(cmd_t *cmd);
     40 extern void dhd_usage(cmd_t *port_cmds);
     41 extern void dhd_cmds_usage(cmd_t *port_cmds);
     42 
     43 /* print helpers */
     44 extern void dhd_printlasterror(void *dhd);
     45 extern void dhd_printint(int val);
     46 
     47 /* check driver version */
     48 extern int dhd_check(void *dhd);
     49 
     50 /* useful macros */
     51 #define ARRAYSIZE(a)  (sizeof(a)/sizeof(a[0]))
     52 
     53 #define USAGE_ERROR    -1	/* Error code for Usage */
     54 #define IOCTL_ERROR    -2	/* Error code for ioctl failure */
     55 #define COMMAND_ERROR  -3	/* Error code for general command failure */
     56 
     57 /* integer output format */
     58 #define INT_FMT_DEC	0	/* signed integer */
     59 #define INT_FMT_UINT	1	/* unsigned integer */
     60 #define INT_FMT_HEX	2	/* hexdecimal */
     61 
     62 /* command line argument usage */
     63 #define CMD_ERR		-1	/* Error for command */
     64 #define CMD_OPT		0	/* a command line option */
     65 #define CMD_DHD		1	/* the start of a dhd command */
     66 
     67 #endif /* _dhdu_h_ */
     68