diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-07-24 22:38:13 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-07-24 22:38:13 +0000 |
commit | 08c1114822b9ff532dd6719dfe9339207b3b7ea2 (patch) | |
tree | c2b368e35715fb3e30885495b55e404bea4774e4 /epan/dissectors/packet-ixveriwave.c | |
parent | 2be8004129d7cc2b7e7e1483fa1214676096c076 (diff) |
Move proto_register..() and proto_reg_handoff...() to the end of the file;
Do other minor cleanup.
svn path=/trunk/; revision=43971
Diffstat (limited to 'epan/dissectors/packet-ixveriwave.c')
-rw-r--r-- | epan/dissectors/packet-ixveriwave.c | 890 |
1 files changed, 448 insertions, 442 deletions
diff --git a/epan/dissectors/packet-ixveriwave.c b/epan/dissectors/packet-ixveriwave.c index a4897ce9e1..ad2fa1b084 100644 --- a/epan/dissectors/packet-ixveriwave.c +++ b/epan/dissectors/packet-ixveriwave.c @@ -35,7 +35,7 @@ #include "packet-eth.h" static void dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static void ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree); +static void ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree); static void wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree); typedef struct { @@ -82,7 +82,7 @@ static frame_end_data previous_frame_data = {0,0}; * 802.11 header and payload * (to 32-bit boundary) */ -#define IEEE80211_RADIOTAP_F_HT 0x0040 /* HT mode */ +#define IEEE80211_RADIOTAP_F_HT 0x0040 /* HT mode */ #define IEEE80211_RADIOTAP_F_CFP 0x0001 /* sent/received * during CFP */ @@ -263,32 +263,32 @@ static float getHTrate( guint8 rate, guint8 rflags ); static void dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *common_tree = NULL; - proto_item *ti = NULL; - proto_item *vw_times_ti = NULL; - proto_tree *vw_times_tree = NULL; - int align_offset, offset, time_tree_offset=0; - guint16 version, length; - guint length_remaining; - guint64 vw_startt=0, vw_endt=0; - guint32 true_length; - guint32 vw_latency, vw_pktdur, vw_flowid; - guint16 vw_vcid, vw_msdu_length, vw_seqnum; - tvbuff_t *next_tvb; - ifg_info *p_ifg_info; + proto_tree *common_tree = NULL; + proto_item *ti = NULL; + proto_item *vw_times_ti = NULL; + proto_tree *vw_times_tree = NULL; + int align_offset, offset, time_tree_offset = 0; + guint16 version, length; + guint length_remaining; + guint64 vw_startt = 0, vw_endt=0; + guint32 true_length; + guint32 vw_latency, vw_pktdur, vw_flowid; + guint16 vw_vcid, vw_msdu_length, vw_seqnum; + tvbuff_t *next_tvb; + ifg_info *p_ifg_info; offset = 0; version = tvb_get_letohs(tvb, offset); - length = tvb_get_letohs(tvb, offset + COMMON_LENGTH_OFFSET); - - col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "%s", version ? "ETH" : "WLAN"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, version ? "ETH" : "WLAN"); col_clear(pinfo->cinfo, COL_INFO); + length = tvb_get_letohs(tvb, offset + COMMON_LENGTH_OFFSET); + true_length = pinfo->fd->pkt_len - length - tvb_get_letohs(tvb, offset + length) + 4; /* add FCS length into captured length */ col_add_fstr(pinfo->cinfo, COL_INFO, "%s Capture, Length %u", - version ? "IxVeriWave Ethernet Tap" : "IxVeriWave Radio Tap", length); + version ? "IxVeriWave Ethernet Tap" : "IxVeriWave Radio Tap", length); /* Dissect the packet */ if (tree) { @@ -298,61 +298,61 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) common_tree = proto_item_add_subtree(ti, ett_commontap); proto_tree_add_uint(common_tree, hf_ixveriwave_frame_length, - tvb, 4, 2, true_length); + tvb, 4, 2, true_length); } length_remaining = length; - offset+=4; - length_remaining-=4; + offset += 4; + length_remaining -= 4; - /*extract msdu/octets , 2bytes*/ - align_offset = ALIGN_OFFSET(offset, 2); - offset += align_offset; + /*extract msdu/octets , 2 bytes*/ + align_offset = ALIGN_OFFSET(offset, 2); + offset += align_offset; length_remaining -= align_offset; if (length_remaining >= 2) { vw_msdu_length = tvb_get_letohs(tvb, offset); if (tree) { - proto_tree_add_uint(common_tree, hf_ixveriwave_vw_msdu_length, - tvb, offset, 2, vw_msdu_length); + proto_tree_add_uint(common_tree, hf_ixveriwave_vw_msdu_length, + tvb, offset, 2, vw_msdu_length); } - offset+=2; - length_remaining-=2; + offset += 2; + length_remaining -= 2; } /*extract flow id , 4bytes*/ if (length_remaining >= 4) { - align_offset = ALIGN_OFFSET(offset, 4); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 4); + offset += align_offset; length_remaining -= align_offset; vw_flowid = tvb_get_letohl(tvb, offset); if (tree) { proto_tree_add_uint(common_tree, hf_ixveriwave_vw_flowid, - tvb, offset, 4, vw_flowid); + tvb, offset, 4, vw_flowid); } - offset+=4; - length_remaining-=4; + offset += 4; + length_remaining -= 4; } /*extract client id, 2bytes*/ if (length_remaining >= 2) { - align_offset = ALIGN_OFFSET(offset, 2); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 2); + offset += align_offset; length_remaining -= align_offset; vw_vcid = tvb_get_letohs(tvb, offset); if (tree) { proto_tree_add_uint(common_tree, hf_ixveriwave_vw_vcid, - tvb, offset, 2, vw_vcid); + tvb, offset, 2, vw_vcid); } - offset+=2; - length_remaining-=2; + offset += 2; + length_remaining -= 2; } /*extract sequence number , 2bytes*/ @@ -361,28 +361,29 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) vw_seqnum = tvb_get_letohs(tvb, offset); if (tree) { proto_tree_add_uint(common_tree, hf_ixveriwave_vw_seqnum, - tvb, offset, 2, vw_seqnum); + tvb, offset, 2, vw_seqnum); } - offset+=2; - length_remaining-=2; + offset += 2; + length_remaining -= 2; } /*extract latency, 4 bytes*/ if (length_remaining >= 4) { - align_offset = ALIGN_OFFSET(offset, 4); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 4); + offset += align_offset; length_remaining -= align_offset; + vw_latency = tvb_get_letohl(tvb, offset); if (tree) { /* start a tree going for the various packet times */ if (vw_latency != 0) { vw_times_ti = proto_tree_add_float_format(common_tree, - hf_ixveriwave_vw_mslatency, - tvb, offset, 4, (float)(vw_latency/1000000.0), - "Frame timestamp values: (latency %.3f msec)", - (float)(vw_latency/1000000.0)); + hf_ixveriwave_vw_mslatency, + tvb, offset, 4, (float)(vw_latency/1000000.0), + "Frame timestamp values: (latency %.3f msec)", + (float)(vw_latency/1000000.0)); vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times); proto_tree_add_uint_format(vw_times_tree, hf_ixveriwave_vw_latency, @@ -392,9 +393,9 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else { vw_times_ti = proto_tree_add_float_format(common_tree, - hf_ixveriwave_vw_mslatency, - tvb, offset, 4, (float)(vw_latency/1000000.0), - "Frame timestamp values:"); + hf_ixveriwave_vw_mslatency, + tvb, offset, 4, (float)(vw_latency/1000000.0), + "Frame timestamp values:"); vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times); proto_tree_add_uint_format(vw_times_tree, hf_ixveriwave_vw_latency, @@ -403,16 +404,16 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - offset+=4; - length_remaining-=4; + offset += 4; + length_remaining -= 4; } /*extract signature timestamp, 4 bytes (32 LSBs only, nsec)*/ if (length_remaining >= 4) { - align_offset = ALIGN_OFFSET(offset, 4); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 4); + offset += align_offset; length_remaining -= align_offset; if (tree) { @@ -422,16 +423,17 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, offset, 4, ENC_BIG_ENDIAN); } } - time_tree_offset = offset; - offset+=4; - length_remaining-=4; + time_tree_offset = offset; + offset += 4; + length_remaining -= 4; } /*extract frame start timestamp, 8 bytes (nsec)*/ if (length_remaining >= 8) { - align_offset = ALIGN_OFFSET(offset, 8); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 8); + offset += align_offset; length_remaining -= align_offset; + vw_startt = tvb_get_letoh64(tvb, offset); if (tree) { @@ -442,15 +444,16 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - offset+=8; - length_remaining-=8; + offset += 8; + length_remaining -= 8; } /*extract frame end timestamp, 8 bytes (nsec)*/ if (length_remaining >= 8) { - align_offset = ALIGN_OFFSET(offset, 8); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 8); + offset += align_offset; length_remaining -= align_offset; + vw_endt = tvb_get_letoh64(tvb, offset); if (tree) { @@ -461,14 +464,14 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - offset+=8; - length_remaining-=8; + offset += 8; + length_remaining -= 8; } /*extract frame duration , 4 bytes*/ if (length_remaining >= 4) { - align_offset = ALIGN_OFFSET(offset, 4); - offset += align_offset; - vw_pktdur = tvb_get_letohl(tvb, offset); + align_offset = ALIGN_OFFSET(offset, 4); + offset += align_offset; + vw_pktdur = tvb_get_letohl(tvb, offset); if (tree) { if (vw_times_tree != NULL) { @@ -494,7 +497,7 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - offset+=4; + offset += 4; } if (vw_times_ti) { @@ -518,7 +521,7 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - p_ifg_info->ifg = 0; + p_ifg_info->ifg = 0; p_ifg_info->previous_end_time = 0; } @@ -538,9 +541,9 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, offset, 0, p_ifg_info->ifg); PROTO_ITEM_SET_GENERATED(ti); } - + /* Grab the rest of the frame. */ - next_tvb = tvb_new_subset(tvb, length, -1, -1); + next_tvb = tvb_new_subset_remaining(tvb, length); /* dissect the ethernet or wlan header next */ if (version == ETHERNET_PORT) @@ -559,13 +562,13 @@ static void ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree) { proto_tree *vweft, *vw_errorFlags_tree = NULL, *vwift,*vw_infoFlags_tree = NULL; - int align_offset, offset; - tvbuff_t *next_tvb; - guint length, length_remaining; - guint16 vw_flags, vw_info; - guint16 vw_l4id; - guint32 vw_error; - gint32 vwf_txf, vwf_fcserr; + int align_offset, offset; + tvbuff_t *next_tvb; + guint length, length_remaining; + guint16 vw_flags, vw_info; + guint16 vw_l4id; + guint32 vw_error; + gint32 vwf_txf, vwf_fcserr; vwf_txf = 0; @@ -574,26 +577,26 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t length = tvb_get_letohs(tvb, offset); length_remaining = length; - offset += 2; + offset += 2; length_remaining -= 2; /* extract flags (currently use only TX/RX and FCS error flag) */ if (length >= 2) { - align_offset = ALIGN_OFFSET(offset, 2); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 2); + offset += align_offset; length_remaining -= align_offset; - vw_flags = tvb_get_letohs(tvb, offset); - vwf_txf = ((vw_flags & ETHERNETTAP_VWF_TXF) == 0) ? 0 : 1; - vwf_fcserr = ((vw_flags & ETHERNETTAP_VWF_FCSERR) == 0) ? 0 : 1; + vw_flags = tvb_get_letohs(tvb, offset); + vwf_txf = ((vw_flags & ETHERNETTAP_VWF_TXF) == 0) ? 0 : 1; + vwf_fcserr = ((vw_flags & ETHERNETTAP_VWF_FCSERR) == 0) ? 0 : 1; if (tap_tree) { proto_tree_add_uint(tap_tree, hf_ixveriwave_vwf_txf, - tvb, 0, 0, vwf_txf); + tvb, 0, 0, vwf_txf); proto_tree_add_uint(tap_tree, hf_ixveriwave_vwf_fcserr, - tvb, 0, 0, vwf_fcserr); + tvb, 0, 0, vwf_fcserr); } - offset += 2; + offset += 2; length_remaining -= 2; } @@ -610,19 +613,19 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t if (vwf_txf == 0) { /* then it's an rx case */ proto_tree_add_item(vw_infoFlags_tree, hf_ixveriwave_vw_info_rx_1_bit8, - tvb, offset, 2, ENC_LITTLE_ENDIAN); + tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, hf_ixveriwave_vw_info_rx_1_bit9, - tvb, offset, 2, ENC_LITTLE_ENDIAN); + tvb, offset, 2, ENC_LITTLE_ENDIAN); } else { /* it's a tx case */ proto_tree_add_uint_format(vw_infoFlags_tree, hf_ixveriwave_vw_info_retryCount, - tvb, offset, 2, vw_info, + tvb, offset, 2, vw_info, "Retry count: %u ", vw_info); } } /*end of if tree */ - offset+=2; - length_remaining-=2; + offset += 2; + length_remaining -= 2; } /*extract error , 4bytes*/ @@ -637,42 +640,42 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t if (vwf_txf == 0) { /* then it's an rx case */ proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit0, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit1, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit2, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit3, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit4, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit5, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit6, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit7, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit8, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_rx_1_bit9, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); } else { /* it's a tx case */ proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_tx_bit1, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_tx_bit5, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_tx_bit9, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_tx_bit10, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, hf_ixveriwave_vw_error_tx_bit11, - tvb, offset, 4, ENC_LITTLE_ENDIAN); + tvb, offset, 4, ENC_LITTLE_ENDIAN); } } /*end of if (tree) */ - offset+=4; - length_remaining-=4; + offset += 4; + length_remaining -= 4; } /*extract l4id , 4bytes*/ if (length_remaining >= 4) { @@ -681,8 +684,8 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_l4id, tvb, offset, 4, vw_l4id); } - offset+=4; - length_remaining-=4; + offset += 4; + length_remaining -= 4; } /*extract pad, 4bytes*/ @@ -697,24 +700,24 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t call_dissector(ethernet_handle, next_tvb, pinfo, tree); } -static void +static void wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree) { proto_tree *ft, *flags_tree = NULL; - proto_item *hdr_fcs_ti = NULL; - int align_offset, offset; - guint32 calc_fcs; - tvbuff_t *next_tvb; - guint length; - guint32 rate; - gint8 dbm; - guint8 rflags=0; + proto_item *hdr_fcs_ti = NULL; + int align_offset, offset; + guint32 calc_fcs; + tvbuff_t *next_tvb; + guint length; + guint32 rate; + gint8 dbm; + guint8 rflags = 0; proto_tree *vweft, *vw_errorFlags_tree = NULL, *vwift,*vw_infoFlags_tree = NULL; - guint16 vw_flags, vw_info, vw_ht_length, vw_rflags; - guint32 vw_errors; - gint8 tx_power; - float ht_rate; + guint16 vw_flags, vw_info, vw_ht_length, vw_rflags; + guint32 vw_errors; + gint8 tx_power; + float ht_rate; offset = 0; length = tvb_get_letohs(tvb, offset); @@ -738,7 +741,7 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree tvb, offset, 2, vw_rflags); proto_tree_add_boolean(flags_tree, hf_radiotap_flags_datapad, tvb, offset, 2, vw_rflags); - if ( vw_rflags & IEEE80211_RADIOTAP_F_HT ) { + if ( vw_rflags & IEEE80211_RADIOTAP_F_HT ) { proto_tree_add_boolean(flags_tree, hf_radiotap_flags_ht, tvb, offset, 2, vw_rflags); proto_tree_add_boolean(flags_tree, hf_radiotap_flags_40mhz, @@ -747,10 +750,10 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree tvb, offset, 2, vw_rflags); } } - offset+=2; + offset += 2; /* Need to add in 2 more bytes to the offset to account for the channel flags */ - offset+=2; + offset += 2; rate = tvb_get_guint8(tvb, offset); if (vw_rflags & IEEE80211_RADIOTAP_F_HT) { @@ -783,9 +786,9 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dBm", dbm); if (tree) { proto_tree_add_int_format(tap_tree, - hf_radiotap_dbm_antsignal, - tvb, offset, 1, dbm, - "RX SSI signal: %d dBm", dbm); + hf_radiotap_dbm_antsignal, + tvb, offset, 1, dbm, + "RX SSI signal: %d dBm", dbm); } } else if (tx_power != 100) @@ -793,12 +796,12 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dBm", tx_power); if (tree) { proto_tree_add_int_format(tap_tree, - hf_radiotap_txpower, - tvb, offset, 1, tx_power, - "Transmit power (TX): %d ", tx_power); + hf_radiotap_txpower, + tvb, offset, 1, tx_power, + "Transmit power (TX): %d ", tx_power); } } - offset+=2; + offset += 2; vw_flags = tvb_get_letohs(tvb, offset); @@ -812,44 +815,47 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree proto_tree_add_uint(tap_tree, hf_radiotap_vwf_retrerr, tvb, offset, 2, (vw_flags & VW_RADIOTAPF_RETRERR) != 0); proto_tree_add_uint(tap_tree, hf_radiotap_vwf_enctype, - tvb, offset, 2, (vw_flags & VW_RADIOTAPF_ENCMSK) >> + tvb, offset, 2, (vw_flags & VW_RADIOTAPF_ENCMSK) >> VW_RADIOTAPF_ENCSHIFT); } - offset+=2; + offset += 2; - align_offset = ALIGN_OFFSET(offset, 2); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 2); + offset += align_offset; vw_ht_length = tvb_get_letohs(tvb, offset); if ((tree) && (vw_ht_length != 0)) { proto_tree_add_uint_format(tap_tree, hf_radiotap_vw_ht_length, - tvb, offset, 2, vw_ht_length, "HT length: %u (includes the sum of the pieces of the aggregate and their respective Start_Spacing + Delimiter + MPDU + Padding)", + tvb, offset, 2, + vw_ht_length, + "HT length: %u (includes the sum of the pieces of the aggregate and their respective Start_Spacing" + " + Delimiter + MPDU + Padding)", vw_ht_length); } - offset+=2; + offset += 2; - align_offset = ALIGN_OFFSET(offset, 2); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 2); + offset += align_offset; vw_info = tvb_get_letohs(tvb, offset); if (tree) { vwift = proto_tree_add_uint(tap_tree, hf_radiotap_vw_info, - tvb, offset, 2, vw_info); + tvb, offset, 2, vw_info); vw_infoFlags_tree = proto_item_add_subtree(vwift, ett_radiotap_info); if (tx_power == 0) { /* then it's an rx case */ /*FPGA_VER_vVW510021 version decodes */ proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_rx_2_bit8, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_rx_2_bit8, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_rx_2_bit9, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_rx_2_bit9, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_rx_2_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_rx_2_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_rx_2_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_rx_2_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, hf_radiotap_vw_info_rx_2_bit12, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, @@ -857,28 +863,28 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree proto_tree_add_item(vw_infoFlags_tree, hf_radiotap_vw_info_rx_2_bit14, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_rx_2_bit15, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_rx_2_bit15, tvb, offset, 2, ENC_LITTLE_ENDIAN); } else { /* it's a tx case */ /* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx info decodes same*/ proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit12, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit12, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit13, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit13, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit14, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit14, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_infoFlags_tree, - hf_radiotap_vw_info_tx_bit15, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_info_tx_bit15, tvb, offset, 2, ENC_LITTLE_ENDIAN); } } - offset+=2; + offset += 2; - align_offset = ALIGN_OFFSET(offset, 4); - offset += align_offset; + align_offset = ALIGN_OFFSET(offset, 4); + offset += align_offset; vw_errors = tvb_get_letohl(tvb, offset); @@ -893,7 +899,7 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree /* the error flags field is only 16 bits (instead of 32) to save space */ if (tx_power == 0) { /* then it's an rx case */ - + /*FPGA_VER_vVW510021 version decodes */ proto_tree_add_item(vw_errorFlags_tree, hf_radiotap_vw_errors_rx_2_bit0, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -905,29 +911,29 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree /* veriwave removed 8-2007, don't display reserved bit*/ proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit4, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit4, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit5, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit6, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit6, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit7, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit7, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit8, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit8, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit10, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_rx_2_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_rx_2_bit11, tvb, offset, 2, ENC_LITTLE_ENDIAN); } else { /* it's a tx case */ /* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx error decodes same*/ proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_tx_bit1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_tx_bit1, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(vw_errorFlags_tree, - hf_radiotap_vw_errors_tx_bit5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hf_radiotap_vw_errors_tx_bit5, tvb, offset, 2, ENC_LITTLE_ENDIAN); } } @@ -949,20 +955,20 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree /* Watch out for [erroneously] short frames */ if (tvb_length(next_tvb) > (unsigned int) pinfo->pseudo_header->ieee_802_11.fcs_len) { - guint32 sent_fcs = 0; - calc_fcs = crc32_802_tvb(next_tvb, - tvb_length(next_tvb) - pinfo->pseudo_header->ieee_802_11.fcs_len); - - /* By virtue of hdr_fcs_ti being set, we know that 'tree' is set, - * so there's no need to check it here. */ - if (calc_fcs == sent_fcs) { - proto_item_append_text(hdr_fcs_ti, " [correct]"); - } - else { - proto_item_append_text(hdr_fcs_ti, " [incorrect, should be 0x%08x]", calc_fcs); - proto_tree_add_boolean(tap_tree, hf_radiotap_fcs_bad, - tvb, 0, 4, TRUE); - } + guint32 sent_fcs = 0; + calc_fcs = crc32_802_tvb(next_tvb, + tvb_length(next_tvb) - pinfo->pseudo_header->ieee_802_11.fcs_len); + + /* By virtue of hdr_fcs_ti being set, we know that 'tree' is set, + * so there's no need to check it here. */ + if (calc_fcs == sent_fcs) { + proto_item_append_text(hdr_fcs_ti, " [correct]"); + } + else { + proto_item_append_text(hdr_fcs_ti, " [incorrect, should be 0x%08x]", calc_fcs); + proto_tree_add_boolean(tap_tree, hf_radiotap_fcs_bad, + tvb, 0, 4, TRUE); + } } else { proto_item_append_text(hdr_fcs_ti, @@ -976,6 +982,29 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree next_tvb, pinfo, tree); } +static float getHTrate( guint8 rate, guint8 rflags ) +{ + int mcs_index, ndbps; + float symbol_tx_time, bitrate; + + /* Guard interval is the most significant bit. Short GI if the bit is set */ + if ( rate & 0x80) + symbol_tx_time = (float)3.6; + else + symbol_tx_time = (float)4.0; + + mcs_index = rate & IEEE80211_PLCP_RATE_MASK; + + if ( rflags & IEEE80211_RADIOTAP_F_40MHZ ) + ndbps = canonical_ndbps_40[ mcs_index - 8*(int)(mcs_index/8) ]; + else + ndbps = canonical_ndbps_20[ mcs_index - 8*(int)(mcs_index/8) ]; + + bitrate = ( ndbps * (((int)(mcs_index/8) + 1) )) / symbol_tx_time; + + return bitrate; +} + void proto_register_ixveriwave(void) { /* value_strings for TX/RX and FCS error flags */ @@ -1021,436 +1050,436 @@ void proto_register_ixveriwave(void) static hf_register_info hf[] = { { &hf_ixveriwave_frame_length, - { "Actual frame length", "ixveriwave.frame_length", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Actual frame length", "ixveriwave.frame_length", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_msdu_length, - { "MSDU length", "ixveriwave.msdu_length", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "MSDU length", "ixveriwave.msdu_length", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_vcid, - { "Client ID", "ixveriwave.clientid", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Client ID", "ixveriwave.clientid", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_flowid, - { "Flow ID", "ixveriwave.flowid", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Flow ID", "ixveriwave.flowid", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_seqnum, - { "Sequence number", "ixveriwave.seqnum", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Sequence number", "ixveriwave.seqnum", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_mslatency, - { "Msec latency", "ixveriwave.mslatency", - FT_FLOAT, 0, NULL, 0x0, NULL, HFILL } }, + { "Msec latency", "ixveriwave.mslatency", + FT_FLOAT, 0, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_latency, - { "Latency", "ixveriwave.latency", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Latency", "ixveriwave.latency", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave, - { "Signature (32 LSBs)", "ixveriwave.sig_ts", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Signature (32 LSBs)", "ixveriwave.sig_ts", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_startt, - { "Starting frame timestamp", "ixveriwave.startt", - FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Starting frame timestamp", "ixveriwave.startt", + FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_endt, - { "Ending frame timestamp", "ixveriwave.endt", - FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - + { "Ending frame timestamp", "ixveriwave.endt", + FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_ixveriwave_vw_pktdur, - { "Packet duration", "ixveriwave.pktdur", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - + { "Packet duration", "ixveriwave.pktdur", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_ixveriwave_vw_ifg, - { "Inter-frame gap (usecs)", "ixveriwave.ifg", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Inter-frame gap (usecs)", "ixveriwave.ifg", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vwf_txf, - { "Frame direction", "ixveriwave.vwflags.txframe", - FT_UINT32, BASE_DEC, VALS(tx_rx_type), 0x0, NULL, HFILL } }, + { "Frame direction", "ixveriwave.vwflags.txframe", + FT_UINT32, BASE_DEC, VALS(tx_rx_type), 0x0, NULL, HFILL } }, { &hf_ixveriwave_vwf_fcserr, - { "MAC FCS check", "ixveriwave.vwflags.fcserr", - FT_UINT32, BASE_DEC, VALS(fcserr_type), 0x0, NULL, HFILL } }, + { "MAC FCS check", "ixveriwave.vwflags.fcserr", + FT_UINT32, BASE_DEC, VALS(fcserr_type), 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_info, - { "Info field", "ixveriwave.info", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Info field", "ixveriwave.info", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ixveriwave_vw_info_retryCount, - { "Info field retry count", "ixveriwave.info", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Info field retry count", "ixveriwave.info", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, /* tx info decodes for VW510024 and 510012 */ -/* we don't need to enumerate through these, basically for both, -info is the retry count. for 510024, the 15th bit indicates if -the frame was impressed on the enet tx media with one or more octets having tx_en -framing signal deasserted. this is caused by software setting the drain all register bit. +/* we don't need to enumerate through these, basically for both, + info is the retry count. for 510024, the 15th bit indicates if + the frame was impressed on the enet tx media with one or more octets having tx_en + framing signal deasserted. this is caused by software setting the drain all register bit. */ { &hf_ixveriwave_vw_info_tx_bit15, - { "Info bit 15-frame was impressed on the ent tx media with one or more octets having tx_en framing signal deasserted.", "ixveriwave.info.bit15", - FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, + { "Info bit 15-frame was impressed on the ent tx media with one or more octets having tx_en framing signal deasserted.", "ixveriwave.info.bit15", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, /* rx info decodes for fpga ver VW510024 */ /*all are reserved*/ - + /* rx info decodes for fpga ver VW510012 */ { &hf_ixveriwave_vw_info_rx_1_bit8, - { "Go no flow", "ixveriwave.info.bit8", - FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, + { "Go no flow", "ixveriwave.info.bit8", + FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, { &hf_ixveriwave_vw_info_rx_1_bit9, - { "Go with flow", "ixveriwave.info.bit9", - FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, + { "Go with flow", "ixveriwave.info.bit9", + FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, { &hf_ixveriwave_vw_error, - { "Errors", "ixveriwave.error", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Errors", "ixveriwave.error", + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, /* tx error decodes for VW510024 and previous versions */ { &hf_ixveriwave_vw_error_tx_bit1, - { "Packet FCS error", "ixveriwave.error.bit1", - FT_BOOLEAN, 12, NULL, 0x0002, NULL, HFILL } }, + { "Packet FCS error", "ixveriwave.error.bit1", + FT_BOOLEAN, 12, NULL, 0x0002, NULL, HFILL } }, { &hf_ixveriwave_vw_error_tx_bit5, - { "IP checksum error", "ixveriwave.error.bit5", - FT_BOOLEAN, 12, NULL, 0x0020, NULL, HFILL } }, + { "IP checksum error", "ixveriwave.error.bit5", + FT_BOOLEAN, 12, NULL, 0x0020, NULL, HFILL } }, /*bit 6 is actually reserved in 500012, but i thought it would be okay to leave it here*/ { &hf_ixveriwave_vw_error_tx_bit9, - { "Underflow error", "ixveriwave.error.bit9", - FT_BOOLEAN, 12, NULL, 0x0200, NULL, HFILL } }, + { "Underflow error", "ixveriwave.error.bit9", + FT_BOOLEAN, 12, NULL, 0x0200, NULL, HFILL } }, { &hf_ixveriwave_vw_error_tx_bit10, - { "Late collision error", "ixveriwave.error.bit10", - FT_BOOLEAN, 12, NULL, 0x0400, NULL, HFILL } }, + { "Late collision error", "ixveriwave.error.bit10", + FT_BOOLEAN, 12, NULL, 0x0400, NULL, HFILL } }, { &hf_ixveriwave_vw_error_tx_bit11, - { "Excessive collisions error", "ixveriwave.error.bit11", - FT_BOOLEAN, 12, NULL, 0x0800, NULL, HFILL } }, + { "Excessive collisions error", "ixveriwave.error.bit11", + FT_BOOLEAN, 12, NULL, 0x0800, NULL, HFILL } }, /*all other bits are reserved */ /* rx error decodes for fpga ver VW510012 and VW510024 */ { &hf_ixveriwave_vw_error_rx_1_bit0, - { "Alignment error", "ixveriwave.error.bit0", - FT_BOOLEAN, 12, NULL, 0x0001, "error bit 0", HFILL } }, + { "Alignment error", "ixveriwave.error.bit0", + FT_BOOLEAN, 12, NULL, 0x0001, "error bit 0", HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit1, - { "Packet FCS error", "ixveriwave.error.bit1", - FT_BOOLEAN, 12, NULL, 0x0002, NULL, HFILL } }, + { "Packet FCS error", "ixveriwave.error.bit1", + FT_BOOLEAN, 12, NULL, 0x0002, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit2, - { "Bad magic byte signature.", "ixveriwave.error.bit2", - FT_BOOLEAN, 12, NULL, 0x0004, NULL, HFILL } }, + { "Bad magic byte signature.", "ixveriwave.error.bit2", + FT_BOOLEAN, 12, NULL, 0x0004, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit3, - { "Bad payload checksum.", "ixveriwave.error.bit3", - FT_BOOLEAN, 12, NULL, 0x0008, NULL, HFILL } }, + { "Bad payload checksum.", "ixveriwave.error.bit3", + FT_BOOLEAN, 12, NULL, 0x0008, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit4, - { "Frame too long error", "ixveriwave.error.bit4", - FT_BOOLEAN, 12, NULL, 0x0010, NULL, HFILL } }, + { "Frame too long error", "ixveriwave.error.bit4", + FT_BOOLEAN, 12, NULL, 0x0010, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit5, - { "IP checksum error", "ixveriwave.error.bit5", - FT_BOOLEAN, 12, NULL, 0x0020, NULL, HFILL } }, + { "IP checksum error", "ixveriwave.error.bit5", + FT_BOOLEAN, 12, NULL, 0x0020, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit6, - { "TCP/ICMP/IGMP/UDP checksum error", "ixveriwave.error.bit6", - FT_BOOLEAN, 12, NULL, 0x0040, NULL, HFILL } }, + { "TCP/ICMP/IGMP/UDP checksum error", "ixveriwave.error.bit6", + FT_BOOLEAN, 12, NULL, 0x0040, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit7, - { "ID mismatch(for fpga510012)", "ixveriwave.error.bit7", - FT_BOOLEAN, 12, NULL, 0x0080, NULL, HFILL } }, + { "ID mismatch(for fpga510012)", "ixveriwave.error.bit7", + FT_BOOLEAN, 12, NULL, 0x0080, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit8, - { "Length error", "ixveriwave.error.bit8", - FT_BOOLEAN, 12, NULL, 0x0100, NULL, HFILL } }, + { "Length error", "ixveriwave.error.bit8", + FT_BOOLEAN, 12, NULL, 0x0100, NULL, HFILL } }, { &hf_ixveriwave_vw_error_rx_1_bit9, - { "Underflow", "ixveriwave.error.bit9", - FT_BOOLEAN, 12, NULL, 0x0200, NULL, HFILL } }, + { "Underflow", "ixveriwave.error.bit9", + FT_BOOLEAN, 12, NULL, 0x0200, NULL, HFILL } }, { &hf_radiotap_vw_errors_tx_bit1, - { "Packet FCS error", "ixveriwave.errors.bit1", - FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, + { "Packet FCS error", "ixveriwave.errors.bit1", + FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, { &hf_radiotap_vw_errors_tx_bit5, - { "IP checksum error", "ixveriwave.errors.bit5", - FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, + { "IP checksum error", "ixveriwave.errors.bit5", + FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, /* All other enumerations are reserved.*/ { &hf_ixveriwave_vw_l4id, - { "Layer 4 ID", "ixveriwave.layer4id", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Layer 4 ID", "ixveriwave.layer4id", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, /* Presense flags */ - #define RADIOTAP_MASK_VW_FPGA_VERSION (1 << VW_RADIOTAP_FPGA_VERSION) - #define RADIOTAP_MASK_VW_MCID (1 << VW_RADIOTAP_MCID) - #define RADIOTAP_MASK_VW_ERRORS (1 << VW_RADIOTAP_ERRORS) - #define RADIOTAP_MASK_VW_INFO (1 << VW_RADIOTAP_INFO) - #define RADIOTAP_MASK_VW_MSDU_LENGTH (1 << VW_RADIOTAP_MSDU_LENGTH) - #define RADIOTAP_MASK_VW_HT_LENGTH (1 << VW_RADIOTAP_HT_LENGTH) - #define RADIOTAP_MASK_VW_FLOWID (1 << VW_RADIOTAP_FLOWID) - #define RADIOTAP_MASK_VW_SEQNUM (1 << VW_RADIOTAP_SEQNUM) - #define RADIOTAP_MASK_VW_LATENCY (1 << VW_RADIOTAP_LATENCY) - #define RADIOTAP_MASK_VW_SIG_TS (1 << VW_RADIOTAP_SIG_TS) - #define RADIOTAP_MASK_VW_STARTT (1 << VW_RADIOTAP_STARTT) - #define RADIOTAP_MASK_VW_ENDT (1 << VW_RADIOTAP_ENDT) - #define RADIOTAP_MASK_VW_PKTDUR (1 << VW_RADIOTAP_PKTDUR) - #define RADIOTAP_MASK_VW_IFG (1 << VW_RADIOTAP_IFG) +#define RADIOTAP_MASK_VW_FPGA_VERSION (1 << VW_RADIOTAP_FPGA_VERSION) +#define RADIOTAP_MASK_VW_MCID (1 << VW_RADIOTAP_MCID) +#define RADIOTAP_MASK_VW_ERRORS (1 << VW_RADIOTAP_ERRORS) +#define RADIOTAP_MASK_VW_INFO (1 << VW_RADIOTAP_INFO) +#define RADIOTAP_MASK_VW_MSDU_LENGTH (1 << VW_RADIOTAP_MSDU_LENGTH) +#define RADIOTAP_MASK_VW_HT_LENGTH (1 << VW_RADIOTAP_HT_LENGTH) +#define RADIOTAP_MASK_VW_FLOWID (1 << VW_RADIOTAP_FLOWID) +#define RADIOTAP_MASK_VW_SEQNUM (1 << VW_RADIOTAP_SEQNUM) +#define RADIOTAP_MASK_VW_LATENCY (1 << VW_RADIOTAP_LATENCY) +#define RADIOTAP_MASK_VW_SIG_TS (1 << VW_RADIOTAP_SIG_TS) +#define RADIOTAP_MASK_VW_STARTT (1 << VW_RADIOTAP_STARTT) +#define RADIOTAP_MASK_VW_ENDT (1 << VW_RADIOTAP_ENDT) +#define RADIOTAP_MASK_VW_PKTDUR (1 << VW_RADIOTAP_PKTDUR) +#define RADIOTAP_MASK_VW_IFG (1 << VW_RADIOTAP_IFG) /* end veriwave addition*/ { &hf_radiotap_datarate, - { "Data rate", "ixveriwave.datarate", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Speed this frame was sent/received at", HFILL } }, - + { "Data rate", "ixveriwave.datarate", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Speed this frame was sent/received at", HFILL } }, + /* Boolean 'present.flags' flags */ { &hf_radiotap_flags, - { "Flags", "ixveriwave.flags", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Flags", "ixveriwave.flags", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_radiotap_flags_cfp, - { "CFP", "ixveriwave.flags.cfp", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_CFP, - "Sent/Received during CFP", HFILL } }, + { "CFP", "ixveriwave.flags.cfp", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_CFP, + "Sent/Received during CFP", HFILL } }, { &hf_radiotap_flags_preamble, - { "Preamble", "ixveriwave.flags.preamble", - FT_BOOLEAN, 12, TFS(&preamble_type), IEEE80211_RADIOTAP_F_SHORTPRE, - "Sent/Received with short preamble", HFILL } }, + { "Preamble", "ixveriwave.flags.preamble", + FT_BOOLEAN, 12, TFS(&preamble_type), IEEE80211_RADIOTAP_F_SHORTPRE, + "Sent/Received with short preamble", HFILL } }, { &hf_radiotap_flags_wep, - { "WEP", "ixveriwave.flags.wep", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_WEP, - "Sent/Received with WEP encryption", HFILL } }, + { "WEP", "ixveriwave.flags.wep", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_WEP, + "Sent/Received with WEP encryption", HFILL } }, { &hf_radiotap_flags_frag, - { "Fragmentation", "ixveriwave.flags.frag", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_FRAG, - "Sent/Received with fragmentation", HFILL } }, + { "Fragmentation", "ixveriwave.flags.frag", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_FRAG, + "Sent/Received with fragmentation", HFILL } }, { &hf_radiotap_flags_fcs, - { "FCS at end", "ixveriwave.flags.fcs", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_FCS, - "Frame includes FCS at end", HFILL } }, + { "FCS at end", "ixveriwave.flags.fcs", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_FCS, + "Frame includes FCS at end", HFILL } }, { &hf_radiotap_flags_datapad, - { "Data Pad", "ixveriwave.flags.datapad", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_DATAPAD, - "Frame has padding between 802.11 header and payload", HFILL } }, + { "Data Pad", "ixveriwave.flags.datapad", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_DATAPAD, + "Frame has padding between 802.11 header and payload", HFILL } }, { &hf_radiotap_flags_ht, - { "HT frame", "ixveriwave.flags.ht", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_HT, NULL, HFILL } }, + { "HT frame", "ixveriwave.flags.ht", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_HT, NULL, HFILL } }, { &hf_radiotap_flags_40mhz, - { "40 MHz channel bandwidth", "ixveriwave.flags.40mhz", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_40MHZ, NULL, HFILL } }, + { "40 MHz channel bandwidth", "ixveriwave.flags.40mhz", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_40MHZ, NULL, HFILL } }, { &hf_radiotap_flags_shortgi, - { "Short guard interval", "ixveriwave.flags.shortgi", - FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_SHORTGI, NULL, HFILL } }, + { "Short guard interval", "ixveriwave.flags.shortgi", + FT_BOOLEAN, 12, NULL, IEEE80211_RADIOTAP_F_SHORTGI, NULL, HFILL } }, { &hf_radiotap_dbm_antsignal, - { "SSI Signal (dBm)", "ixveriwave.dbm_antsignal", - FT_INT32, BASE_DEC, NULL, 0x0, - "RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } }, + { "SSI Signal (dBm)", "ixveriwave.dbm_antsignal", + FT_INT32, BASE_DEC, NULL, 0x0, + "RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } }, { &hf_radiotap_txpower, - { "Transmit power", "ixveriwave.txpower", - FT_INT32, BASE_DEC, NULL, 0x0, - "Transmit power in decibels per one milliwatt (dBm)", HFILL } }, + { "Transmit power", "ixveriwave.txpower", + FT_INT32, BASE_DEC, NULL, 0x0, + "Transmit power in decibels per one milliwatt (dBm)", HFILL } }, - /* Boolean 'present' flags */ + /* Boolean 'present' flags */ /* VeriWave-specific flags */ { &hf_radiotap_vwf_txf, - { "Frame direction", "ixveriwave.vwflags.txframe", - FT_UINT32, BASE_DEC, VALS(tx_rx_type), 0x0, NULL, HFILL } }, - + { "Frame direction", "ixveriwave.vwflags.txframe", + FT_UINT32, BASE_DEC, VALS(tx_rx_type), 0x0, NULL, HFILL } }, + { &hf_radiotap_vwf_fcserr, - { "MAC FCS check", "ixveriwave.vwflags.fcserr", - FT_UINT32, BASE_DEC, VALS(fcserr_type), 0x0, NULL, HFILL } }, - + { "MAC FCS check", "ixveriwave.vwflags.fcserr", + FT_UINT32, BASE_DEC, VALS(fcserr_type), 0x0, NULL, HFILL } }, + { &hf_radiotap_vwf_dcrerr, - { "Decryption error", "ixveriwave.vwflags.decrypterr", - FT_UINT32, BASE_DEC, VALS(decrypterr_type), 0x0, NULL, HFILL } }, + { "Decryption error", "ixveriwave.vwflags.decrypterr", + FT_UINT32, BASE_DEC, VALS(decrypterr_type), 0x0, NULL, HFILL } }, { &hf_radiotap_vwf_retrerr, - { "TX retry limit", "ixveriwave.vwflags.retryerr", - FT_UINT32, BASE_DEC, VALS(retryerr_type), 0x0, NULL, HFILL } }, - + { "TX retry limit", "ixveriwave.vwflags.retryerr", + FT_UINT32, BASE_DEC, VALS(retryerr_type), 0x0, NULL, HFILL } }, + { &hf_radiotap_vwf_enctype, - { "Encryption type", "ixveriwave.vwflags.encrypt", - FT_UINT32, BASE_DEC, VALS(encrypt_type), 0x0, NULL, HFILL } }, - + { "Encryption type", "ixveriwave.vwflags.encrypt", + FT_UINT32, BASE_DEC, VALS(encrypt_type), 0x0, NULL, HFILL } }, + /* start VeriWave-specific radiotap header elements 6-2007 */ { &hf_radiotap_vw_ht_length, - { "Total IP length (incl all pieces of an aggregate)", "ixveriwave.ht_length", - FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { "Total IP length (incl all pieces of an aggregate)", "ixveriwave.ht_length", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_radiotap_vw_errors, - { "Errors", "ixveriwave.errors", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Errors", "ixveriwave.errors", + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, /* rx error decodes for fpga ver VW510006 */ { &hf_radiotap_vw_errors_rx_1_bit0, - { "L1 error", "ixveriwave.errors.bit0", - FT_BOOLEAN, 16, NULL, 0x0001, "error bit 0", HFILL } }, + { "L1 error", "ixveriwave.errors.bit0", + FT_BOOLEAN, 16, NULL, 0x0001, "error bit 0", HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit1, - { "Packet FCS error", "ixveriwave.errors.bit1", - FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, + { "Packet FCS error", "ixveriwave.errors.bit1", + FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit2, - { "Bad magic byte signature.", "ixveriwave.errors.bit2", - FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } }, + { "Bad magic byte signature.", "ixveriwave.errors.bit2", + FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit3, - { "Bad payload checksum.", "ixveriwave.errors.bit3", - FT_BOOLEAN, 16, NULL, 0x0008, NULL, HFILL } }, + { "Bad payload checksum.", "ixveriwave.errors.bit3", + FT_BOOLEAN, 16, NULL, 0x0008, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit4, - { "Duplicate MPDU", "ixveriwave.errors.bit4", - FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } }, + { "Duplicate MPDU", "ixveriwave.errors.bit4", + FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit5, - { "IP checksum error", "ixveriwave.errors.bit5", - FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, + { "IP checksum error", "ixveriwave.errors.bit5", + FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit6, - { "TCP/ICMP/IGMP/UDP checksum error", "ixveriwave.errors.bit6", - FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } }, + { "TCP/ICMP/IGMP/UDP checksum error", "ixveriwave.errors.bit6", + FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit7, - { "Reserved", "ixveriwave.errors.bit7", - FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } }, + { "Reserved", "ixveriwave.errors.bit7", + FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit8, - { "RX WEP IVC / TKIP/CCMP MIC miscompare", "ixveriwave.errors.bit8", - FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, + { "RX WEP IVC / TKIP/CCMP MIC miscompare", "ixveriwave.errors.bit8", + FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit9, - { "RX TKIP / CCMP TSC SEQERR", "ixveriwave.errors.bit9", - FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, + { "RX TKIP / CCMP TSC SEQERR", "ixveriwave.errors.bit9", + FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit10, - { "RX crypto short", "ixveriwave.errors.bit10", - FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, + { "RX crypto short", "ixveriwave.errors.bit10", + FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit11, - { "RX EXTIV fault A", "ixveriwave.errors.bit11", - FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, + { "RX EXTIV fault A", "ixveriwave.errors.bit11", + FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit12, - { "RX EXTIV fault B", "ixveriwave.errors.bit12", - FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, + { "RX EXTIV fault B", "ixveriwave.errors.bit12", + FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit13, - { "RX protected fault A", "ixveriwave.errors.bit13", - FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, + { "RX protected fault A", "ixveriwave.errors.bit13", + FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit14, - { "RX protected fault B", "ixveriwave.errors.bit14", - FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, + { "RX protected fault B", "ixveriwave.errors.bit14", + FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_1_bit15, - { "Reserved", "ixveriwave.errors.bit15", - FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, + { "Reserved", "ixveriwave.errors.bit15", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, /* All other enumerations are reserved.*/ /* rx error decodes for fpga ver VW510021 */ { &hf_radiotap_vw_errors_rx_2_bit0, - { "CRC16 or parity error", "ixveriwave.errors.bit0", - FT_BOOLEAN, 16, NULL, 0x0001, "error bit 0", HFILL } }, + { "CRC16 or parity error", "ixveriwave.errors.bit0", + FT_BOOLEAN, 16, NULL, 0x0001, "error bit 0", HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit1, - { "Non-supported rate or service field", "ixveriwave.errors.bit1", - FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, + { "Non-supported rate or service field", "ixveriwave.errors.bit1", + FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit2, - { "Short frame error. Frame is shorter than length.", "ixveriwave.errors.bit2", - FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } }, + { "Short frame error. Frame is shorter than length.", "ixveriwave.errors.bit2", + FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit4, - { "FCS_Error", "ixveriwave.errors.bit4", - FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } }, + { "FCS_Error", "ixveriwave.errors.bit4", + FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit5, - { "L2 de-aggregation error", "ixveriwave.errors.bit5", - FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, + { "L2 de-aggregation error", "ixveriwave.errors.bit5", + FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit6, - { "Duplicate MPDU", "ixveriwave.errors.bit6", - FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } }, + { "Duplicate MPDU", "ixveriwave.errors.bit6", + FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit7, - { "Bad_Sig: Bad flow magic number (includes bad flow crc16)", "ixveriwave.errors.bit7", - FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } }, + { "Bad_Sig: Bad flow magic number (includes bad flow crc16)", "ixveriwave.errors.bit7", + FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit8, - { "Bad flow payload checksum", "ixveriwave.errors.bit8", - FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, + { "Bad flow payload checksum", "ixveriwave.errors.bit8", + FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit10, - { "Bad IP checksum error", "ixveriwave.errors.bit10", - FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, + { "Bad IP checksum error", "ixveriwave.errors.bit10", + FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, { &hf_radiotap_vw_errors_rx_2_bit11, - { "L4(TCP/ICMP/IGMP/UDP) checksum error", "ixveriwave.errors.bit11", - FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, + { "L4(TCP/ICMP/IGMP/UDP) checksum error", "ixveriwave.errors.bit11", + FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, { &hf_radiotap_vw_info, - { "Info field", "ixveriwave.info", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { "Info field", "ixveriwave.info", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, /* tx info decodes for VW510021 and previous versions */ { &hf_radiotap_vw_info_tx_bit10, - { "MPDU of A-MPDU", "ixveriwave.info.bit10", - FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, + { "MPDU of A-MPDU", "ixveriwave.info.bit10", + FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, { &hf_radiotap_vw_info_tx_bit11, - { "First MPDU of A-MPDU", "ixveriwave.info.bit11", - FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, + { "First MPDU of A-MPDU", "ixveriwave.info.bit11", + FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, { &hf_radiotap_vw_info_tx_bit12, - { "Last MPDU of A-MPDU", "ixveriwave.info.bit12", - FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, + { "Last MPDU of A-MPDU", "ixveriwave.info.bit12", + FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, { &hf_radiotap_vw_info_tx_bit13, - { "MSDU of A-MSDU", "ixveriwave.info.bit13", - FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, + { "MSDU of A-MSDU", "ixveriwave.info.bit13", + FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, { &hf_radiotap_vw_info_tx_bit14, - { "First MSDU of A-MSDU", "ixveriwave.info.bit14", - FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, + { "First MSDU of A-MSDU", "ixveriwave.info.bit14", + FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, { &hf_radiotap_vw_info_tx_bit15, - { "Last MSDU of A-MSDU", "ixveriwave.info.bit15", - FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, + { "Last MSDU of A-MSDU", "ixveriwave.info.bit15", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, /*v510006 uses bits */ /* rx info decodes for fpga ver VW510021 */ { &hf_radiotap_vw_info_rx_2_bit8, - { "ACK withheld from frame", "ixveriwave.info.bit8", - FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, + { "ACK withheld from frame", "ixveriwave.info.bit8", + FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit9, - { "Sent CTS to self before data", "ixveriwave.info.bit9", - FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, + { "Sent CTS to self before data", "ixveriwave.info.bit9", + FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit10, - { "MPDU of an A-MPDU", "ixveriwave.info.bit10", - FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, + { "MPDU of an A-MPDU", "ixveriwave.info.bit10", + FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit11, - { "First MPDU of A-MPDU", "ixveriwave.info.bit11", - FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, + { "First MPDU of A-MPDU", "ixveriwave.info.bit11", + FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit12, - { "Last MPDU of A-MPDU", "ixveriwave.info.bit12", - FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, + { "Last MPDU of A-MPDU", "ixveriwave.info.bit12", + FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit13, - { "MSDU of A-MSDU", "ixveriwave.info.bit13", - FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, + { "MSDU of A-MSDU", "ixveriwave.info.bit13", + FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit14, - { "First MSDU of A-MSDU", "ixveriwave.info.bit14", - FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, + { "First MSDU of A-MSDU", "ixveriwave.info.bit14", + FT_BOOLEAN, 16, NULL, 0x4000, NULL, HFILL } }, { &hf_radiotap_vw_info_rx_2_bit15, - { "Last MSDU of A-MSDU", "ixveriwave.info.bit15", - FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, + { "Last MSDU of A-MSDU", "ixveriwave.info.bit15", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, }; static gint *ett[] = { @@ -1476,35 +1505,12 @@ void proto_reg_handoff_ixveriwave(void) dissector_handle_t ixveriwave_handle; /* handle for ethertype dissector */ - ethernet_handle = find_dissector("eth_withoutfcs"); + ethernet_handle = find_dissector("eth_withoutfcs"); /* handle for 802.11 dissector */ - ieee80211_handle = find_dissector("wlan"); + ieee80211_handle = find_dissector("wlan"); ieee80211_datapad_handle = find_dissector("wlan_datapad"); ixveriwave_handle = create_dissector_handle(dissect_ixveriwave, proto_ixveriwave); dissector_add_uint("wtap_encap", WTAP_ENCAP_IXVERIWAVE, ixveriwave_handle); } -static float getHTrate( guint8 rate, guint8 rflags ) -{ - int mcs_index, ndbps; - float symbol_tx_time, bitrate; - - /* Guard interval is the most significant bit. Short GI if the bit is set */ - if ( rate & 0x80) - symbol_tx_time = (float)3.6; - else - symbol_tx_time = (float)4.0; - - mcs_index = rate & IEEE80211_PLCP_RATE_MASK; - - if ( rflags & IEEE80211_RADIOTAP_F_40MHZ ) - ndbps = canonical_ndbps_40[ mcs_index - 8*(int)(mcs_index/8) ]; - else - ndbps = canonical_ndbps_20[ mcs_index - 8*(int)(mcs_index/8) ]; - - bitrate = ( ndbps * (((int)(mcs_index/8) + 1) )) / symbol_tx_time; - - return bitrate; -} - |