2 * Copyright (c) 2006, Andrea Bittau <a.bittau@cs.ucl.ac.uk>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 #include <net80211/ieee80211.h>
32 #include <net80211/ieee80211_freebsd.h>
34 int str2mac(char *mac, char *str);
35 void mac2str(char *str, char *mac);
36 int open_tx(char *iface);
37 int open_rx(char *iface);
38 int open_rxtx(char *iface, int *rx, int *tx);
39 int inject(int fd, void *buf, int len);
40 int inject_params(int fd, void *buf, int len,
41 struct ieee80211_bpf_params *params);
42 int sniff(int fd, void *buf, int len);
43 void *get_wifi(void *buf, int *len);
44 short seqfn(unsigned short seq, unsigned short fn);
45 int send_ack(int fd, char *mac);
46 unsigned short seqno(struct ieee80211_frame *wh);
47 int open_tap(char *iface);
48 int set_iface_mac(char *iface, char *mac);
49 int str2wep(char *wep, int *len, char *str);
50 int wep_decrypt(struct ieee80211_frame *wh, int len, char *key, int klen);
51 void wep_encrypt(struct ieee80211_frame *wh, int len, char *key, int klen);
52 int frame_type(struct ieee80211_frame *wh, int type, int stype);
53 void hexdump(void *b, int len);
54 int elapsed(struct timeval *past, struct timeval *now);
55 char *known_pt(struct ieee80211_frame *wh, int *len);
57 #endif /* __W00T_H__ */