aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radiotap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-25 08:16:08 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-25 08:16:08 +0000
commit21104f4d2484917bea52dfb3583c2385dcf52d16 (patch)
tree862a7cf251d95361080de5570332dd2c88c33bfc /epan/dissectors/packet-radiotap.c
parentf47d44042fb586f1c87cfaee2dd848d48b51dcdb (diff)
Show dBm and dB signal and noise values differently, so that the user
knows what they're getting. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15528 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-radiotap.c')
-rw-r--r--epan/dissectors/packet-radiotap.c48
1 files changed, 35 insertions, 13 deletions
diff --git a/epan/dissectors/packet-radiotap.c b/epan/dissectors/packet-radiotap.c
index 85dbd0e0d7..a6cbee9655 100644
--- a/epan/dissectors/packet-radiotap.c
+++ b/epan/dissectors/packet-radiotap.c
@@ -134,8 +134,10 @@ static int hf_radiotap_channel_frequency = -1;
static int hf_radiotap_channel_flags = -1;
static int hf_radiotap_datarate = -1;
static int hf_radiotap_antenna = -1;
-static int hf_radiotap_antsignal = -1;
-static int hf_radiotap_antnoise = -1;
+static int hf_radiotap_dbm_antsignal = -1;
+static int hf_radiotap_db_antsignal = -1;
+static int hf_radiotap_dbm_antnoise = -1;
+static int hf_radiotap_db_antnoise = -1;
static int hf_radiotap_txpower = -1;
static int hf_radiotap_preamble = -1;
@@ -221,12 +223,18 @@ proto_register_radiotap(void)
{ &hf_radiotap_antenna,
{ "Antenna", "radiotap.antenna",
FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
- { &hf_radiotap_antsignal,
- { "SSI Signal", "radiotap.antsignal",
+ { &hf_radiotap_dbm_antsignal,
+ { "SSI Signal (dBm)", "radiotap.dbm_antsignal",
FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL } },
- { &hf_radiotap_antnoise,
- { "SSI Noise", "radiotap.antnoise",
+ { &hf_radiotap_db_antsignal,
+ { "SSI Signal (dB)", "radiotap.db_antsignal",
+ FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
+ { &hf_radiotap_dbm_antnoise,
+ { "SSI Noise (dBm)", "radiotap.dbm_antnoise",
FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL } },
+ { &hf_radiotap_db_antnoise,
+ { "SSI Noise (dB)", "radiotap.db_antnoise",
+ FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_radiotap_txpower,
{ "Transmit power", "radiotap.txpower",
FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL } },
@@ -388,27 +396,41 @@ dissect_radiotap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset++;
break;
case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
- case IEEE80211_RADIOTAP_DB_ANTSIGNAL:
- /* XXX distinguish units */
if (check_col(pinfo->cinfo, COL_RSSI)) {
- col_add_fstr(pinfo->cinfo, COL_RSSI, "%d",
+ col_add_fstr(pinfo->cinfo, COL_RSSI, "%d (dBm)",
tvb_get_guint8(tvb, offset));
}
if (tree) {
- proto_tree_add_int(radiotap_tree, hf_radiotap_antsignal,
+ proto_tree_add_int(radiotap_tree, hf_radiotap_dbm_antsignal,
tvb, offset, 1, (gint8) tvb_get_guint8(tvb, offset));
}
offset++;
break;
+ case IEEE80211_RADIOTAP_DB_ANTSIGNAL:
+ if (check_col(pinfo->cinfo, COL_RSSI)) {
+ col_add_fstr(pinfo->cinfo, COL_RSSI, "%u (dB)",
+ tvb_get_guint8(tvb, offset));
+ }
+ if (tree) {
+ proto_tree_add_uint(radiotap_tree, hf_radiotap_db_antsignal,
+ tvb, offset, 1, tvb_get_guint8(tvb, offset));
+ }
+ offset++;
+ break;
case IEEE80211_RADIOTAP_DBM_ANTNOISE:
- case IEEE80211_RADIOTAP_DB_ANTNOISE:
- /* XXX distinguish units */
if (tree) {
- proto_tree_add_int(radiotap_tree, hf_radiotap_antnoise,
+ proto_tree_add_int(radiotap_tree, hf_radiotap_dbm_antnoise,
tvb, offset, 1, (gint8) tvb_get_guint8(tvb, offset));
}
offset++;
break;
+ case IEEE80211_RADIOTAP_DB_ANTNOISE:
+ if (tree) {
+ proto_tree_add_uint(radiotap_tree, hf_radiotap_db_antnoise,
+ tvb, offset, 1, tvb_get_guint8(tvb, offset));
+ }
+ offset++;
+ break;
case IEEE80211_RADIOTAP_ANTENNA:
if (tree) {
proto_tree_add_uint(radiotap_tree, hf_radiotap_antenna,