2007-12-12 23:03:44 +00:00
|
|
|
/* packet-airopeek.c
|
|
|
|
*
|
|
|
|
* Routines for the disassembly airopeek encapsulated wireless
|
|
|
|
* traces (tested with frames captured from a Cisco WCS).
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright 2007 Joerg Mayer (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2008-02-19 22:08:11 +00:00
|
|
|
* TODO: Decode meta information.
|
|
|
|
* Check on fillup bytes in capture (fcs sometimes wrong)
|
2007-12-12 23:03:44 +00:00
|
|
|
* From:
|
|
|
|
* http://www.cisco.com/univercd/cc/td/doc/product/wireless/pahcont/oweb.pdf
|
|
|
|
* "It will include information on timestamp, signal strength, packet size
|
|
|
|
* and so on"
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <epan/packet.h>
|
|
|
|
|
|
|
|
static int proto_airopeek = -1;
|
|
|
|
static gint hf_airopeek_unknown1 = -1;
|
|
|
|
static gint hf_airopeek_unknown2 = -1;
|
|
|
|
static gint hf_airopeek_unknown3 = -1;
|
|
|
|
static gint hf_airopeek_unknown4 = -1;
|
2009-05-15 06:48:25 +00:00
|
|
|
static gint hf_airopeek_unknown5 = -1;
|
|
|
|
static gint hf_airopeek_unknown6 = -1;
|
|
|
|
static gint hf_airopeek_channel = -1;
|
|
|
|
static gint hf_airopeek_timestamp = -1;
|
2007-12-12 23:03:44 +00:00
|
|
|
static gint ett_airopeek = -1;
|
|
|
|
|
|
|
|
static dissector_handle_t ieee80211_handle;
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
proto_tree *airopeek_tree = NULL;
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIROPEEK");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2007-12-12 23:03:44 +00:00
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
ti = proto_tree_add_item(tree, proto_airopeek, tvb, 0, -1, FALSE);
|
|
|
|
airopeek_tree = proto_item_add_subtree(ti, ett_airopeek);
|
|
|
|
|
2008-11-10 17:59:13 +00:00
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown1, tvb, 0, 2, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown2, tvb, 2, 2, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown3, tvb, 4, 2, FALSE);
|
2009-05-15 06:48:25 +00:00
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown4, tvb, 6, 5, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_timestamp, tvb, 11, 4, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown5, tvb, 15, 2, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_channel, tvb, 17, 1, FALSE);
|
|
|
|
proto_tree_add_item(airopeek_tree, hf_airopeek_unknown6, tvb, 18, 2, FALSE);
|
2007-12-12 23:03:44 +00:00
|
|
|
}
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, 20);
|
2009-05-15 06:48:25 +00:00
|
|
|
pinfo->pseudo_header->ieee_802_11.fcs_len = 4;
|
2007-12-12 23:03:44 +00:00
|
|
|
call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_airopeek(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_airopeek_unknown1,
|
|
|
|
{ "Unknown1", "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2007-12-12 23:03:44 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_unknown2,
|
|
|
|
{ "caplength1", "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2007-12-12 23:03:44 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_unknown3,
|
|
|
|
{ "caplength2", "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2007-12-12 23:03:44 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_unknown4,
|
|
|
|
{ "Unknown4", "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2007-12-12 23:03:44 +00:00
|
|
|
|
2009-05-15 06:48:25 +00:00
|
|
|
{ &hf_airopeek_unknown5,
|
|
|
|
{ "Unknown5", "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2009-05-15 06:48:25 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_unknown6,
|
|
|
|
{ "Unknown6", "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2009-05-15 06:48:25 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_timestamp,
|
|
|
|
{ "Timestamp?", "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2009-05-15 06:48:25 +00:00
|
|
|
|
|
|
|
{ &hf_airopeek_channel,
|
|
|
|
{ "Channel", "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
0x0, NULL, HFILL }},
|
2009-05-15 06:48:25 +00:00
|
|
|
|
2007-12-12 23:03:44 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_airopeek,
|
|
|
|
};
|
|
|
|
|
|
|
|
proto_airopeek = proto_register_protocol(
|
|
|
|
"Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
|
|
|
|
proto_register_field_array(proto_airopeek, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_airopeek(void)
|
|
|
|
{
|
|
|
|
dissector_handle_t airopeek_handle;
|
|
|
|
|
2007-12-12 23:26:39 +00:00
|
|
|
ieee80211_handle = find_dissector("wlan_datapad");
|
2007-12-12 23:03:44 +00:00
|
|
|
|
|
|
|
airopeek_handle = create_dissector_handle(dissect_airopeek, proto_airopeek);
|
|
|
|
dissector_add("udp.port", 5000, airopeek_handle);
|
|
|
|
}
|