nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * Linux port of dhd command line utility, hacked from wl utility.
3 *
4 * Copyright (C) 1999-2013, Broadcom Corporation
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $Id: dhdu_common.h 379386 2013-01-17 07:20:55Z $
19 */
20  
21 /* Common header file for dhdu_linux.c and dhdu_ndis.c */
22  
23 #ifndef _dhdu_common_h
24 #define _dhdu_common_h
25  
26 #if !defined(RWL_WIFI) && !defined(RWL_SOCKET) && !defined(RWL_SERIAL)
27  
28 #define NO_REMOTE 0
29 #define REMOTE_SERIAL 1
30 #define REMOTE_SOCKET 2
31 #define REMOTE_WIFI 3
32 #define REMOTE_DONGLE 4
33  
34 /* For cross OS support */
35 #define LINUX_OS 1
36 #define WIN32_OS 2
37 #define MAC_OSX 3
38 #define BACKLOG 4
39 #define WINVISTA_OS 5
40 #define INDONGLE 6
41  
42 #define RWL_WIFI_ACTION_CMD "wifiaction"
43 #define RWL_WIFI_GET_ACTION_CMD "rwlwifivsaction"
44 #define RWL_DONGLE_SET_CMD "dongleset"
45  
46 #define SUCCESS 1
47 #define FAIL -1
48 #define NO_PACKET -2
49  
50 /* Added for debug utility support */
51 #define ERR stderr
52 #define OUTPUT stdout
53 #define DEBUG_ERR 0x0001
54 #define DEBUG_INFO 0x0002
55 #define DEBUG_DBG 0x0004
56  
57 #define DPRINT_ERR if (defined_debug & DEBUG_ERR) \
58 fprintf
59 #define DPRINT_INFO if (defined_debug & DEBUG_INFO) \
60 fprintf
61 #define DPRINT_DBG if (defined_debug & DEBUG_DBG) \
62 fprintf
63  
64 extern int wl_get(void *wl, int cmd, void *buf, int len);
65 extern int wl_set(void *wl, int cmd, void *buf, int len);
66 #endif
67  
68 /* DHD utility function declarations */
69 extern int dhd_check(void *dhd);
70 extern int dhd_atoip(const char *a, struct ipv4_addr *n);
71 extern int dhd_option(char ***pargv, char **pifname, int *phelp);
72 void dhd_usage(cmd_t *port_cmds);
73  
74 /* Remote DHD declarations */
75 int remote_type = NO_REMOTE;
76 extern char *g_rwl_buf_mac;
77 extern char* g_rwl_device_name_serial;
78 unsigned short g_rwl_servport;
79 char *g_rwl_servIP = NULL;
80 unsigned short defined_debug = DEBUG_ERR | DEBUG_INFO;
81  
82  
83 static int process_args(struct ifreq* ifr, char **argv);
84  
85 #define dtoh32(i) i
86 #define dtoh16(i) i
87  
88 #endif /* _dhdu_common_h_ */