forked from br101/horst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ieee80211_util.h
49 lines (35 loc) · 1.08 KB
/
ieee80211_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* copied from linux wireless-2.6/net/mac80211/util.c */
/*
* Copyright 2002-2005, Instant802 Networks, Inc.
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <[email protected]>
* Copyright 2007 Johannes Berg <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* utilities for mac80211
*/
#ifndef _IEEE80211_UTIL_H_
#define _IEEE80211_UTIL_H_
#include "ieee80211.h"
struct packet_info;
int
ieee80211_get_hdrlen(u16 fc);
u8*
ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len);
void
ieee802_11_parse_elems(unsigned char *start, size_t len, struct packet_info *pkt);
int
ieee80211_frame_duration(int phymode, size_t len, int rate, int short_preamble,
int ackcts, int shortslot, char qos_class, int retries);
int
ieee80211_frequency_to_channel(int freq);
int
rate_to_index(int rate);
int
rate_index_to_rate(int idx);
int
mcs_index_to_rate(int mcs, int ht20, int lgi);
#endif