summaryrefslogtreecommitdiff
path: root/usr.sbin/hostapd/print-802_11.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-06-23 21:53:02 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-06-23 21:53:02 +0000
commit9dca7703cc8f5d769e9db3a3d67d32f60b5a1d6f (patch)
tree0e0872bffe2c579a80357d8c655452336ac8c6c4 /usr.sbin/hostapd/print-802_11.c
parent21922ab8d0860ad9ed70dc951d3ad2b304597347 (diff)
set the RSSI Max value in ath(4) and use the new RSSI radiotap header
instead of the old db signal header. also allow tcpdump and hostapd to print the new RSSI radiotap header values current/max rssi. ok damien@ jsg@
Diffstat (limited to 'usr.sbin/hostapd/print-802_11.c')
-rw-r--r--usr.sbin/hostapd/print-802_11.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/print-802_11.c b/usr.sbin/hostapd/print-802_11.c
index 0c35d4171d2..b97992c2efb 100644
--- a/usr.sbin/hostapd/print-802_11.c
+++ b/usr.sbin/hostapd/print-802_11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-802_11.c,v 1.4 2006/06/01 22:09:09 reyk Exp $ */
+/* $OpenBSD: print-802_11.c,v 1.5 2006/06/23 21:53:01 reyk Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
@@ -618,6 +618,18 @@ ieee802_11_radio_if_print(u_int8_t *buf, u_int len)
t += 4;
}
+ if (RADIOTAP(RSSI)) {
+ u_int8_t rssi, max_rssi;
+ TCHECK(*t);
+ rssi = *(u_int8_t*)t;
+ t += 1;
+ TCHECK(*t);
+ max_rssi = *(u_int8_t*)t;
+ t += 1;
+
+ printf(", rssi %u/%u", rssi, max_rssi);
+ }
+
#undef RADIOTAP
PRINTF(">");