2000-11-15 05:42:35 +00:00
|
|
|
/* packet-ieee80211.h
|
|
|
|
* Routines for Wireless LAN (IEEE 802.11) dissection
|
|
|
|
*
|
2002-08-28 21:04:11 +00:00
|
|
|
* Copyright 2000, Axis Communications AB
|
2000-11-15 05:42:35 +00:00
|
|
|
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2000-11-15 05:42:35 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* Copied from README.developer
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-11-15 05:42:35 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-11-15 05:42:35 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 23:18:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-11-15 05:42:35 +00:00
|
|
|
*/
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
|
|
|
|
|
|
|
WS_DLL_PUBLIC
|
2002-08-02 23:36:07 +00:00
|
|
|
void capture_ieee80211 (const guchar *, int, int, packet_counts *);
|
2006-01-23 16:56:34 +00:00
|
|
|
void capture_ieee80211_datapad (const guchar *, int, int, packet_counts *);
|
2002-08-02 23:36:07 +00:00
|
|
|
void capture_ieee80211_fixed (const guchar *, int, int, packet_counts *);
|
2007-05-18 21:06:20 +00:00
|
|
|
void capture_ieee80211_ht (const guchar *, int, int, packet_counts *);
|
2003-09-23 02:35:59 +00:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC
|
2007-12-18 08:01:11 +00:00
|
|
|
void capture_prism(const guchar *, int, int, packet_counts *);
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC
|
2007-12-18 08:01:11 +00:00
|
|
|
void capture_wlancap(const guchar *, int, int, packet_counts *);
|
|
|
|
|
2013-05-27 16:20:57 +00:00
|
|
|
void dissect_wifi_p2p_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
|
2014-12-05 08:02:37 +00:00
|
|
|
int offset, gint size);
|
2013-05-27 16:20:57 +00:00
|
|
|
int dissect_wifi_p2p_public_action(packet_info *pinfo, proto_tree *tree,
|
|
|
|
tvbuff_t *tvb, int offset);
|
|
|
|
int dissect_wifi_p2p_action(proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
|
2014-12-05 08:02:37 +00:00
|
|
|
int offset, gboolean request);
|
2013-05-27 16:20:57 +00:00
|
|
|
|
2013-05-27 16:20:29 +00:00
|
|
|
void dissect_wifi_display_ie(packet_info *pinfo, proto_tree *tree,
|
2014-12-05 08:02:37 +00:00
|
|
|
tvbuff_t *tvb, int offset, gint size);
|
2013-05-27 16:20:29 +00:00
|
|
|
|
2015-01-13 10:45:15 +00:00
|
|
|
int add_tagged_field(packet_info *pinfo, proto_tree *tree,
|
|
|
|
tvbuff_t *tvb, int offset, int ftype);
|
|
|
|
|
2008-02-12 14:17:18 +00:00
|
|
|
#define MAX_SSID_LEN 32
|
|
|
|
#define MAX_PROTECT_LEN 10
|
|
|
|
|
2014-10-30 19:13:21 +00:00
|
|
|
/*
|
|
|
|
* Table of data rates, indexed by MCS index, bandwidth (0 for 20, 1 for 40),
|
|
|
|
* amd guard interval (0 for long, 1 for short).
|
|
|
|
*/
|
2014-12-05 08:02:37 +00:00
|
|
|
#define MAX_MCS_INDEX 76
|
2014-10-30 19:13:21 +00:00
|
|
|
|
|
|
|
WS_DLL_PUBLIC const float ieee80211_float_htrates[MAX_MCS_INDEX+1][2][2];
|
|
|
|
|
2014-12-05 08:00:13 +00:00
|
|
|
WS_DLL_PUBLIC value_string_ext ieee80211_supported_rates_vals_ext;
|
|
|
|
|
2008-02-12 14:17:18 +00:00
|
|
|
struct _wlan_stats {
|
|
|
|
guint8 channel;
|
2008-05-05 19:35:16 +00:00
|
|
|
guint8 ssid_len;
|
2008-02-12 14:17:18 +00:00
|
|
|
guchar ssid[MAX_SSID_LEN];
|
2008-07-12 01:48:24 +00:00
|
|
|
gchar protection[MAX_PROTECT_LEN];
|
2008-02-12 14:17:18 +00:00
|
|
|
};
|
|
|
|
|
2004-12-21 12:30:24 +00:00
|
|
|
typedef struct _wlan_hdr {
|
2014-12-05 08:02:37 +00:00
|
|
|
address bssid;
|
|
|
|
address src;
|
|
|
|
address dst;
|
|
|
|
guint16 type;
|
|
|
|
struct _wlan_stats stats;
|
2004-12-21 12:30:24 +00:00
|
|
|
} wlan_hdr;
|
2011-10-12 05:08:51 +00:00
|
|
|
|
|
|
|
#define WLANCAP_MAGIC_COOKIE_BASE 0x80211000
|
|
|
|
#define WLANCAP_MAGIC_COOKIE_V1 0x80211001
|
|
|
|
#define WLANCAP_MAGIC_COOKIE_V2 0x80211002
|
2013-03-15 01:31:53 +00:00
|
|
|
|
|
|
|
/* UAT entry structure. */
|
|
|
|
typedef struct {
|
2014-12-05 08:02:37 +00:00
|
|
|
guint8 key;
|
|
|
|
gchar *string;
|
2013-03-15 01:31:53 +00:00
|
|
|
} uat_wep_key_record_t;
|
2014-12-05 08:02:37 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 2
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=2 tabstop=8 expandtab:
|
|
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
|
|
|
*/
|