nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * Copyright (c) 2007, 2008, Andrea Bittau <a.bittau@cs.ucl.ac.uk>
3 *
4 * OS dependent API for cygwin. It relies on an external
5 * DLL to do the actual wifi stuff
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21  
22 // DLL function that have to be exported
23 #define CYGWIN_DLL_INIT cygwin_init
24 #define CYGWIN_DLL_SET_CHAN cygwin_set_chan
25 #define CYGWIN_DLL_SET_FREQ cygwin_set_freq
26 #define CYGWIN_DLL_INJECT cygwin_inject
27 #define CYGWIN_DLL_SNIFF cygwin_sniff
28 #define CYGWIN_DLL_GET_MAC cygwin_get_mac
29 #define CYGWIN_DLL_SET_MAC cygwin_set_mac
30 #define CYGWIN_DLL_CLOSE cygwin_close
31  
32 /*
33 * Prototypes:
34 * int CYGWIN_DLL_INIT (char *param);
35 * int CYGWIN_DLL_SET_CHAN (int chan);
36 * int CYGWIN_DLL_INJECT (void *buf, int len, struct tx_info *ti);
37 * int CYGWIN_DLL_SNIFF (void *buf, int len, struct rx_info *ri);
38 * int CYGWIN_DLL_GET_MAC (unsigned char *mac);
39 * int CYGWIN_DLL_SET_MAC (unsigned char *mac);
40 * void CYGWIN_DLL_CLOSE (void);
41 *
42 * Notes:
43 * - sniff can block and inject can be called by another thread.
44 * - return -1 for error.
45 *
46 */
47  
48 /* XXX the interface is broken. init() should return a void* that is passed to
49 * each call. This way multiple instances can be open by a single process.
50 * -sorbo
51 *
52 */