From patchwork Wed Jan 2 13:57:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vales X-Patchwork-Id: 209051 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 08F922C0087 for ; Thu, 3 Jan 2013 00:57:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E8AE59C1BC; Wed, 2 Jan 2013 08:57:36 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dyiDTPc2ntvD; Wed, 2 Jan 2013 08:57:36 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1C6D29C1BD; Wed, 2 Jan 2013 08:57:20 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id C0ECA9C1BC for ; Wed, 2 Jan 2013 08:57:18 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ap5gloxaLN94 for ; Wed, 2 Jan 2013 08:57:14 -0500 (EST) Received: from mail.somenet.org (mail.somenet.org [213.143.98.34]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 78DEE9C182 for ; Wed, 2 Jan 2013 08:57:09 -0500 (EST) From: Jan Vales To: hostap@lists.shmoo.com Subject: [PATCH v2 2/2] Included session transfer stats (rx/tx packets/bytes) into each station's SIGUSR1-dump. Date: Wed, 2 Jan 2013 14:57:06 +0100 Message-Id: <1357135026-8147-3-git-send-email-jan@jvales.net> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1357135026-8147-1-git-send-email-jan@jvales.net> References: <1357135026-8147-1-git-send-email-jan@jvales.net> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Signed-off-by: Jan Vales --- hostapd/dump_state.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hostapd/dump_state.c b/hostapd/dump_state.c index d33e05f..f221a32 100644 --- a/hostapd/dump_state.c +++ b/hostapd/dump_state.c @@ -19,6 +19,7 @@ #include "ap/ap_config.h" #include "ap/sta_info.h" #include "dump_state.h" +#include "ap/ap_drv_ops.h" static void fprint_char(FILE *f, char c) @@ -72,6 +73,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd) #ifndef CONFIG_NO_RADIUS char *buf; #endif /* CONFIG_NO_RADIUS */ + struct hostap_sta_driver_data data; if (!hapd->conf->dump_log_name) { wpa_printf(MSG_DEBUG, "Dump file not defined - ignoring dump " @@ -139,6 +141,11 @@ static void hostapd_dump_state(struct hostapd_data *hapd) "DEAUTH"))); ieee802_1x_dump_state(f, " ", sta); + + if (hostapd_drv_read_sta_data(hapd, &data, sta->addr) == 0) { + fprintf(f," rx_pkt=%lu tx_pkt=%lu\n rx_byte=%lu tx_byte=%lu", + data.rx_packets, data.tx_packets, data.rx_bytes, data.tx_bytes); + } } #ifndef CONFIG_NO_RADIUS