3 * Routines for the disassembly airopeek encapsulated wireless
4 * traces (tested with frames captured from a Cisco WCS).
8 * Copyright 2007 Joerg Mayer (see AUTHORS file)
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 * TODO: Decode meta information.
31 * Check on fillup bytes in capture (fcs sometimes wrong)
33 * http://www.cisco.com/univercd/cc/td/doc/product/wireless/pahcont/oweb.pdf
34 * "It will include information on timestamp, signal strength, packet size
44 #include <epan/packet.h>
46 static int proto_airopeek = -1;
47 static gint hf_airopeek_unknown1 = -1;
48 static gint hf_airopeek_unknown2 = -1;
49 static gint hf_airopeek_unknown3 = -1;
50 static gint hf_airopeek_unknown4 = -1;
51 static gint hf_airopeek_unknown5 = -1;
52 static gint hf_airopeek_unknown6 = -1;
53 static gint hf_airopeek_channel = -1;
54 static gint hf_airopeek_timestamp = -1;
55 static gint ett_airopeek = -1;
57 static dissector_handle_t ieee80211_handle;
60 dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
63 proto_tree *airopeek_tree = NULL;
64 proto_item *ti = NULL;
66 if (check_col(pinfo->cinfo, COL_PROTOCOL))
67 col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIROPEEK");
68 if (check_col(pinfo->cinfo, COL_INFO))
69 col_clear(pinfo->cinfo, COL_INFO);
72 ti = proto_tree_add_item(tree, proto_airopeek, tvb, 0, -1, FALSE);
73 airopeek_tree = proto_item_add_subtree(ti, ett_airopeek);
75 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown1, tvb, 0, 2, FALSE);
76 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown2, tvb, 2, 2, FALSE);
77 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown3, tvb, 4, 2, FALSE);
78 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown4, tvb, 6, 5, FALSE);
79 proto_tree_add_item(airopeek_tree, hf_airopeek_timestamp, tvb, 11, 4, FALSE);
80 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown5, tvb, 15, 2, FALSE);
81 proto_tree_add_item(airopeek_tree, hf_airopeek_channel, tvb, 17, 1, FALSE);
82 proto_tree_add_item(airopeek_tree, hf_airopeek_unknown6, tvb, 18, 2, FALSE);
84 next_tvb = tvb_new_subset(tvb, 20, -1, -1);
85 pinfo->pseudo_header->ieee_802_11.fcs_len = 4;
86 call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
90 proto_register_airopeek(void)
92 static hf_register_info hf[] = {
93 { &hf_airopeek_unknown1,
94 { "Unknown1", "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
97 { &hf_airopeek_unknown2,
98 { "caplength1", "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
101 { &hf_airopeek_unknown3,
102 { "caplength2", "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
105 { &hf_airopeek_unknown4,
106 { "Unknown4", "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
109 { &hf_airopeek_unknown5,
110 { "Unknown5", "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
113 { &hf_airopeek_unknown6,
114 { "Unknown6", "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
117 { &hf_airopeek_timestamp,
118 { "Timestamp?", "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
121 { &hf_airopeek_channel,
122 { "Channel", "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
126 static gint *ett[] = {
130 proto_airopeek = proto_register_protocol(
131 "Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
132 proto_register_field_array(proto_airopeek, hf, array_length(hf));
133 proto_register_subtree_array(ett, array_length(ett));
137 proto_reg_handoff_airopeek(void)
139 dissector_handle_t airopeek_handle;
141 ieee80211_handle = find_dissector("wlan_datapad");
143 airopeek_handle = create_dissector_handle(dissect_airopeek, proto_airopeek);
144 dissector_add("udp.port", 5000, airopeek_handle);