aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ieee80211.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-07-06 19:22:45 +0000
committerGuy Harris <guy@alum.mit.edu>2004-07-06 19:22:45 +0000
commite378012ed4ee2fb652cd3831c0ef492754ebef77 (patch)
tree70601a403e553f5c3395840d9315e4e2f3f96d8c /packet-ieee80211.c
parent1020c9bd4063bc800e04a80142c49269dd70e809 (diff)
In "packet-ieee80211.c", use the same scheme for displaying the data
rate used elsewhere, rather than using floating point. In "packet-prism.c", show the data rate correctly in the column display, and show it as Mb/s in the protocol tree, and show it as "Data Rate", as it is in "packet-ieee80211.c". In "packet-radiotap.c" and "packet-wlancap.c", show it as "Data Rate" rather than as "Datarate". Show the units uniformly as "Mb/s", rather than "mb/s" (it's mega, not milli) or "Mbps", except for the AVS header, where it's Kb/s. svn path=/trunk/; revision=11323
Diffstat (limited to 'packet-ieee80211.c')
-rw-r--r--packet-ieee80211.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/packet-ieee80211.c b/packet-ieee80211.c
index a5f159cd86..aa452ce6ae 100644
--- a/packet-ieee80211.c
+++ b/packet-ieee80211.c
@@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
- * $Id: packet-ieee80211.c,v 1.113 2004/07/05 09:29:04 guy Exp $
+ * $Id: packet-ieee80211.c,v 1.114 2004/07/06 19:22:43 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1453,8 +1453,9 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
/* Add the radio information, if present, to the column information */
if (has_radio_information) {
if (check_col(pinfo->cinfo, COL_TX_RATE)) {
- col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%g",
- .5*pinfo->pseudo_header->ieee_802_11.data_rate);
+ col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%u.%u",
+ pinfo->pseudo_header->ieee_802_11.data_rate / 2,
+ pinfo->pseudo_header->ieee_802_11.data_rate & 1 ? 5 : 0);
}
if (check_col(pinfo->cinfo, COL_RSSI)) {
/* XX - this is a percentage, not a dBm or normalized or raw RSSI */
@@ -1493,8 +1494,9 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
proto_tree_add_uint_format(hdr_tree, hf_data_rate,
tvb, 0, 0,
pinfo->pseudo_header->ieee_802_11.data_rate,
- "Data Rate: %g mb/s",
- .5*pinfo->pseudo_header->ieee_802_11.data_rate);
+ "Data Rate: %u.%u Mb/s",
+ pinfo->pseudo_header->ieee_802_11.data_rate / 2,
+ pinfo->pseudo_header->ieee_802_11.data_rate & 1 ? 5 : 0);
proto_tree_add_uint(hdr_tree, hf_channel,
tvb, 0, 0,