2008-04-10 23:56:10 +00:00
|
|
|
/* packet-turbocell.c
|
|
|
|
* Routines for Turbocell Header dissection
|
|
|
|
* Copyright 2004, Colin Slater <kiltedtaco@xxxxxxxxx>
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This dissector was written entirely from reverse engineering captured
|
|
|
|
* packets. No documentation was used or supplied by Karlnet. Hence, this
|
|
|
|
* dissector is very incomplete. If you have any insight into decoding
|
2011-10-20 14:07:54 +00:00
|
|
|
* these packets, or if you can supply packet captures from turbocell
|
2008-04-10 23:56:10 +00:00
|
|
|
* networks, contact kiltedtaco@xxxxxxxxx */
|
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
/* 2008-08-05 : Added support for aggregate frames.
|
|
|
|
* AP mode, NWID and sat mode fiels identification were
|
|
|
|
* taken from http://aphopper.sourceforge.net/turbocell.html
|
|
|
|
* everything else is based on (educated) guesses.
|
|
|
|
*/
|
|
|
|
|
2008-04-10 23:56:10 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2008-08-06 07:00:46 +00:00
|
|
|
#include <epan/strutil.h>
|
2008-04-10 23:56:10 +00:00
|
|
|
|
2009-08-21 20:25:24 +00:00
|
|
|
#include <epan/oui.h>
|
2008-04-10 23:56:10 +00:00
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
#define TURBOCELL_TYPE_BEACON_NON_POLLING 0x00
|
|
|
|
#define TURBOCELL_TYPE_BEACON_NORMAL 0x40
|
|
|
|
#define TURBOCELL_TYPE_BEACON_POLLING 0x80
|
|
|
|
#define TURBOCELL_TYPE_BEACON_ISP 0xA0
|
|
|
|
|
|
|
|
#define TURBOCELL_TYPE_DATA 0x01
|
|
|
|
#define TURBOCELL_TYPE_MANAGEMENT 0x11
|
|
|
|
|
|
|
|
#define TURBOCELL_SATTELITE_MODE_DENY 0x1
|
|
|
|
#define TURBOCELL_SATTELITE_MODE_ALLOW 0x2
|
|
|
|
|
|
|
|
#define STATION(i) \
|
|
|
|
{ &hf_turbocell_station[i], \
|
|
|
|
{ "Station " #i , "turbocell.station", \
|
|
|
|
FT_ETHER, BASE_NONE, NULL, 0, \
|
|
|
|
"connected stations / satellites ?", HFILL } \
|
|
|
|
}
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
2008-08-06 07:00:46 +00:00
|
|
|
|
2008-04-10 23:56:10 +00:00
|
|
|
static int proto_turbocell = -1;
|
2008-08-06 07:00:46 +00:00
|
|
|
static int proto_aggregate = -1;
|
|
|
|
|
2008-04-10 23:56:10 +00:00
|
|
|
static int hf_turbocell_type = -1;
|
2008-08-06 07:00:46 +00:00
|
|
|
static int hf_turbocell_dst = -1;
|
2008-04-10 23:56:10 +00:00
|
|
|
static int hf_turbocell_counter = -1;
|
|
|
|
static int hf_turbocell_name = -1;
|
2008-08-06 07:00:46 +00:00
|
|
|
static int hf_turbocell_nwid = -1;
|
|
|
|
static int hf_turbocell_satmode = -1;
|
|
|
|
static int hf_turbocell_unknown = -1;
|
|
|
|
static int hf_turbocell_timestamp = -1;
|
|
|
|
static int hf_turbocell_station[32]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
|
|
|
|
static int hf_turbocell_ip = -1;
|
|
|
|
|
|
|
|
static int hf_turbocell_aggregate_msdu_header_text = -1;
|
|
|
|
static int hf_turbocell_aggregate_msdu_len = -1;
|
|
|
|
static int hf_turbocell_aggregate_unknown1 = -1;
|
|
|
|
static int hf_turbocell_aggregate_unknown2 = -1;
|
|
|
|
static int hf_turbocell_aggregate_len = -1;
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_turbocell = -1;
|
|
|
|
static gint ett_network = -1;
|
2008-08-06 07:00:46 +00:00
|
|
|
static gint ett_msdu_aggregation_parent_tree = -1;
|
|
|
|
static gint ett_msdu_aggregation_subframe_tree = -1;
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
/* The ethernet dissector we hand off to */
|
2008-09-26 17:04:01 +00:00
|
|
|
static dissector_handle_t eth_handle;
|
2008-08-06 07:00:46 +00:00
|
|
|
|
2008-09-26 17:04:01 +00:00
|
|
|
static dissector_handle_t data_handle;
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
static const value_string turbocell_type_values[] = {
|
2008-08-06 07:00:46 +00:00
|
|
|
{ TURBOCELL_TYPE_BEACON_NON_POLLING, "Beacon (Non-Polling Base Station)" },
|
|
|
|
{ TURBOCELL_TYPE_BEACON_NORMAL, "Beacon (Normal Base Station)" },
|
|
|
|
{ TURBOCELL_TYPE_BEACON_POLLING, "Beacon (Polling Base Station)" },
|
|
|
|
{ TURBOCELL_TYPE_BEACON_ISP, "Beacon (ISP Base Station)" },
|
|
|
|
{ TURBOCELL_TYPE_DATA, "Data Packet" },
|
|
|
|
{ TURBOCELL_TYPE_MANAGEMENT, "Management Packet" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string turbocell_satmode_values[] = {
|
|
|
|
{ TURBOCELL_SATTELITE_MODE_DENY, "Allowed to connect" },
|
|
|
|
{ TURBOCELL_SATTELITE_MODE_ALLOW, "NOT allowed to connect" },
|
2008-04-10 23:56:10 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2008-04-10 23:56:10 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
proto_item *ti, *name_item;
|
2009-10-09 07:24:33 +00:00
|
|
|
proto_tree *turbocell_tree = NULL, *network_tree;
|
2008-04-10 23:56:10 +00:00
|
|
|
tvbuff_t *next_tvb;
|
2008-08-06 07:00:46 +00:00
|
|
|
int i=0;
|
|
|
|
guint8 packet_type;
|
|
|
|
guint8 * str_name;
|
|
|
|
guint str_len;
|
2009-10-09 07:24:33 +00:00
|
|
|
gint remaining_length;
|
2008-04-10 23:56:10 +00:00
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
packet_type = tvb_get_guint8(tvb, 0);
|
2008-04-10 23:56:10 +00:00
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
if (!(packet_type & 0x0F)){
|
2009-08-09 07:01:26 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Turbocell Packet (Beacon)");
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Turbocell");
|
2008-08-06 07:00:46 +00:00
|
|
|
} else if ( packet_type == TURBOCELL_TYPE_MANAGEMENT ) {
|
2009-08-09 07:01:26 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Turbocell Packet (Management)");
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Turbocell");
|
2008-08-06 07:00:46 +00:00
|
|
|
} else if ( packet_type == TURBOCELL_TYPE_DATA ) {
|
2009-08-09 07:01:26 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Turbocell Packet (Data)");
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Turbocell");
|
2008-04-10 23:56:10 +00:00
|
|
|
} else {
|
2009-08-09 07:01:26 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Turbocell Packet (Unknown)");
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Turbocell");
|
2008-04-10 23:56:10 +00:00
|
|
|
}
|
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
if (tree) {
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_turbocell, tvb, 0, 20, ENC_NA);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
turbocell_tree = proto_item_add_subtree(ti, ett_turbocell);
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_type, tvb, 0, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_satmode, tvb, 1, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_nwid, tvb, 1, 1, ENC_BIG_ENDIAN);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
/* it seem when we have this magic number,that means an alternate header version */
|
|
|
|
|
2011-10-24 19:57:53 +00:00
|
|
|
if (tvb_get_bits64(tvb, 64,48,ENC_BIG_ENDIAN) != G_GINT64_CONSTANT(0x000001fe23dc45ba)){
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_counter, tvb, 0x02, 2, ENC_BIG_ENDIAN);
|
2011-10-20 14:07:54 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_dst, tvb, 0x04, 6, ENC_NA);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_timestamp, tvb, 0x0A, 3, ENC_BIG_ENDIAN);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
} else {
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_timestamp, tvb, 0x02, 3, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_counter, tvb, 0x05, 3, ENC_BIG_ENDIAN);
|
2011-10-20 14:07:54 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_dst, tvb, 0x08, 6, ENC_NA);
|
2008-08-06 07:00:46 +00:00
|
|
|
}
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_unknown, tvb, 0x0E, 2, ENC_BIG_ENDIAN);
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(turbocell_tree, hf_turbocell_ip, tvb, 0x10, 4, ENC_BIG_ENDIAN);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
2009-10-09 07:24:33 +00:00
|
|
|
}
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
remaining_length=tvb_length_remaining(tvb, 0x14);
|
|
|
|
|
|
|
|
if (remaining_length > 6) {
|
|
|
|
|
|
|
|
/* If the first character is a printable character that means we have a payload with network info */
|
|
|
|
/* I couldn't find anything in the header that would definitvely indicate if payload is either data or network info */
|
|
|
|
/* Since the frame size is limited this should work ok */
|
|
|
|
|
|
|
|
if (tvb_get_guint8(tvb, 0x14)>=0x20){
|
2011-10-15 18:46:26 +00:00
|
|
|
name_item = proto_tree_add_item(turbocell_tree, hf_turbocell_name, tvb, 0x14, 30, ENC_ASCII|ENC_NA);
|
2008-08-06 07:00:46 +00:00
|
|
|
network_tree = proto_item_add_subtree(name_item, ett_network);
|
|
|
|
|
|
|
|
str_name=tvb_get_ephemeral_stringz(tvb, 0x14, &str_len);
|
2011-10-20 14:07:54 +00:00
|
|
|
if (check_col (pinfo->cinfo, COL_INFO) && str_len > 0)
|
2008-08-06 07:00:46 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1));
|
|
|
|
|
|
|
|
while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) {
|
2011-11-09 17:33:18 +00:00
|
|
|
proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA);
|
2008-08-06 07:00:46 +00:00
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*Couldn't make sense of the apparently random data in the end*/
|
|
|
|
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, 0x34 + 8*i);
|
2008-08-06 07:00:46 +00:00
|
|
|
call_dissector(data_handle, next_tvb, pinfo, tree);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
2010-01-22 17:41:47 +00:00
|
|
|
tvbuff_t *volatile msdu_tvb = NULL;
|
2008-08-06 07:00:46 +00:00
|
|
|
guint32 msdu_offset = 0x04;
|
|
|
|
guint16 j = 1;
|
|
|
|
guint16 msdu_length;
|
|
|
|
|
|
|
|
proto_item *parent_item;
|
|
|
|
proto_tree *mpdu_tree;
|
|
|
|
proto_tree *subframe_tree;
|
|
|
|
|
|
|
|
next_tvb = tvb_new_subset(tvb, 0x14, -1, tvb_get_ntohs(tvb, 0x14));
|
|
|
|
parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0,
|
|
|
|
tvb_reported_length_remaining(next_tvb, 0), "Turbocell Aggregate Frames");
|
|
|
|
mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree);
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_len, next_tvb, 0x00, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_unknown1, next_tvb, 0x02, 2, ENC_BIG_ENDIAN);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
remaining_length=tvb_length_remaining(next_tvb, msdu_offset);
|
|
|
|
|
|
|
|
do {
|
|
|
|
msdu_length = (tvb_get_letohs(next_tvb, msdu_offset) & 0x0FFF);
|
|
|
|
if (msdu_length==0) break;
|
|
|
|
parent_item = proto_tree_add_uint_format(mpdu_tree, hf_turbocell_aggregate_msdu_header_text,
|
|
|
|
next_tvb,msdu_offset, msdu_length + 0x02,j, "A-MSDU Subframe #%u", j);
|
|
|
|
|
|
|
|
subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree);
|
|
|
|
j++;
|
|
|
|
|
|
|
|
proto_tree_add_uint_format(subframe_tree, hf_turbocell_aggregate_msdu_len, next_tvb, msdu_offset, 2,
|
|
|
|
msdu_length, "MSDU length: %u (0x%04X)", msdu_length,msdu_length);
|
2011-10-16 23:38:49 +00:00
|
|
|
proto_tree_add_item(subframe_tree, hf_turbocell_aggregate_unknown2, next_tvb, msdu_offset+1, 1, ENC_BIG_ENDIAN);
|
2008-08-06 07:00:46 +00:00
|
|
|
|
|
|
|
msdu_offset += 0x02;
|
|
|
|
remaining_length -= 0x02;
|
|
|
|
msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, (msdu_length>remaining_length)?remaining_length:msdu_length, msdu_length);
|
|
|
|
call_dissector(eth_handle, msdu_tvb, pinfo, subframe_tree);
|
|
|
|
msdu_offset += msdu_length;
|
|
|
|
remaining_length -= msdu_length;
|
|
|
|
} while (remaining_length > 6);
|
|
|
|
|
|
|
|
if (remaining_length > 2) {
|
2009-08-16 12:36:22 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(next_tvb, msdu_offset);
|
2008-08-06 07:00:46 +00:00
|
|
|
call_dissector(data_handle, next_tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
/* Register the protocol with Wireshark */
|
|
|
|
|
|
|
|
void proto_register_turbocell(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_turbocell_type,
|
|
|
|
{ "Packet Type", "turbocell.type",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(turbocell_type_values), 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_satmode,
|
|
|
|
{ "Satellite Mode", "turbocell.satmode",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(turbocell_satmode_values), 0xF0,
|
|
|
|
NULL, HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_nwid,
|
|
|
|
{ "Network ID", "turbocell.nwid",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0F,
|
|
|
|
NULL, HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
|
|
|
{ &hf_turbocell_counter,
|
|
|
|
{ "Counter", "turbocell.counter",
|
2008-08-06 07:00:46 +00:00
|
|
|
FT_UINT24, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"Increments every frame (per station)", HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_turbocell_dst,
|
|
|
|
{ "Destination", "turbocell.dst",
|
|
|
|
FT_ETHER, BASE_NONE, NULL, 0,
|
|
|
|
"Seems to be the destination", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_turbocell_ip,
|
|
|
|
{ "IP", "turbocell.ip",
|
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
|
|
|
FT_IPv4, BASE_NONE, NULL, 0,
|
2011-01-21 00:19:03 +00:00
|
|
|
"IP address of base station ?", HFILL }
|
2008-08-06 07:00:46 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_turbocell_unknown,
|
|
|
|
{ "Unknown", "turbocell.unknown",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, 0,
|
|
|
|
"Always 0000", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_turbocell_timestamp,
|
|
|
|
{ "Timestamp (in 10 ms)", "turbocell.timestamp",
|
|
|
|
FT_UINT24, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"Timestamp per station (since connection?)", HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
|
|
|
{ &hf_turbocell_name,
|
|
|
|
{ "Network Name", "turbocell.name",
|
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
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
|
|
|
NULL, HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
STATION(0),STATION(1),STATION(2),STATION(3),STATION(4),STATION(5),STATION(6),STATION(7),STATION(8),STATION(9),
|
|
|
|
STATION(10),STATION(11),STATION(12),STATION(13),STATION(14),STATION(15),STATION(16),STATION(17),STATION(18),STATION(19),
|
|
|
|
STATION(20),STATION(21),STATION(22),STATION(23),STATION(24),STATION(25),STATION(26),STATION(27),STATION(28),STATION(29),
|
|
|
|
STATION(30),STATION(31)
|
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info aggregate_fields[] = {
|
|
|
|
{ &hf_turbocell_aggregate_msdu_header_text,
|
|
|
|
{"MAC Service Data Unit (MSDU)", "turbocell_aggregate.msduheader",
|
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
|
|
|
FT_UINT16, BASE_DEC, 0, 0x0000, NULL, HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_aggregate_msdu_len,
|
|
|
|
{"MSDU length", "turbocell_aggregate.msdulen",
|
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
|
|
|
FT_UINT16, BASE_DEC_HEX, 0, 0x0FFF, NULL, HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_aggregate_len,
|
|
|
|
{ "Total Length", "turbocell_aggregate.len",
|
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"Total reported length", HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_aggregate_unknown1,
|
|
|
|
{ "Unknown", "turbocell_aggregate.unknown1",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, 0,
|
|
|
|
"Always 0x7856", HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
{ &hf_turbocell_aggregate_unknown2,
|
|
|
|
{ "Unknown", "turbocell_aggregate.unknown2",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xF0,
|
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
|
|
|
"have the values 0x4,0xC or 0x8", HFILL }
|
2008-04-10 23:56:10 +00:00
|
|
|
},
|
2008-08-06 07:00:46 +00:00
|
|
|
};
|
2008-04-10 23:56:10 +00:00
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_turbocell,
|
2008-08-06 07:00:46 +00:00
|
|
|
&ett_network,
|
|
|
|
&ett_msdu_aggregation_parent_tree,
|
|
|
|
&ett_msdu_aggregation_subframe_tree
|
2008-04-10 23:56:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
proto_turbocell = proto_register_protocol("Turbocell Header", "Turbocell", "turbocell");
|
2011-10-20 14:07:54 +00:00
|
|
|
|
2008-08-06 07:00:46 +00:00
|
|
|
proto_aggregate = proto_register_protocol("Turbocell Aggregate Data",
|
|
|
|
"Turbocell Aggregate Data", "turbocell_aggregate");
|
|
|
|
proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields));
|
2011-10-20 14:07:54 +00:00
|
|
|
|
2008-04-10 23:56:10 +00:00
|
|
|
register_dissector("turbocell", dissect_turbocell, proto_turbocell);
|
|
|
|
|
|
|
|
proto_register_field_array(proto_turbocell, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2008-08-06 07:00:46 +00:00
|
|
|
|
2008-04-10 23:56:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void proto_reg_handoff_turbocell(void)
|
|
|
|
{
|
|
|
|
eth_handle = find_dissector("eth_withoutfcs");
|
2008-08-06 07:00:46 +00:00
|
|
|
data_handle = find_dissector("data");
|
2008-04-10 23:56:10 +00:00
|
|
|
}
|
|
|
|
|