2012-06-19 17:15:42 -06:00
|
|
|
/*****************************************************************************
|
|
|
|
|
|
|
|
(c) Cambridge Silicon Radio Limited 2011
|
|
|
|
All rights reserved and confidential information of CSR
|
|
|
|
|
|
|
|
Refer to LICENSE.txt included with this source for details
|
|
|
|
on the license terms.
|
|
|
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ---------------------------------------------------------------------------
|
|
|
|
* FILE: csr_wifi_hip_ta_sampling.h
|
|
|
|
*
|
|
|
|
* PURPOSE:
|
|
|
|
* This file contains Traffic Analysis definitions common to the
|
|
|
|
* sampling and analysis modules.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef __TA_SAMPLING_H__
|
|
|
|
#define __TA_SAMPLING_H__
|
|
|
|
|
|
|
|
#include "csr_wifi_hip_unifi.h"
|
|
|
|
|
|
|
|
typedef struct ta_l4stats
|
|
|
|
{
|
2012-07-20 13:05:42 -06:00
|
|
|
u32 rxTcpBytesCount;
|
|
|
|
u32 txTcpBytesCount;
|
|
|
|
u32 rxUdpBytesCount;
|
|
|
|
u32 txUdpBytesCount;
|
2012-06-19 17:15:42 -06:00
|
|
|
} ta_l4stats_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Context structure to preserve state between calls.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct ta_data
|
|
|
|
{
|
|
|
|
/* Current packet filter configuration */
|
2012-07-20 13:00:10 -06:00
|
|
|
u16 packet_filter;
|
2012-06-19 17:15:42 -06:00
|
|
|
|
|
|
|
/* Current packet custom filter configuration */
|
|
|
|
CsrWifiRouterCtrlTrafficFilter custom_filter;
|
|
|
|
|
|
|
|
/* The timestamp of the last tx packet processed. */
|
2012-07-20 13:05:42 -06:00
|
|
|
u32 tx_last_ts;
|
2012-06-19 17:15:42 -06:00
|
|
|
|
|
|
|
/* The timestamp of the last packet processed. */
|
2012-07-20 13:05:42 -06:00
|
|
|
u32 last_indication_time;
|
2012-06-19 17:15:42 -06:00
|
|
|
|
|
|
|
/* Statistics */
|
|
|
|
CsrWifiRouterCtrlTrafficStats stats;
|
|
|
|
|
|
|
|
/* Current traffic classification */
|
|
|
|
CsrWifiRouterCtrlTrafficType traffic_type;
|
|
|
|
|
|
|
|
/* Sum of packet rx rates for this interval used to calculate mean */
|
2012-07-20 13:05:42 -06:00
|
|
|
u32 rx_sum_rate;
|
2012-06-19 17:15:42 -06:00
|
|
|
ta_l4stats_t ta_l4stats;
|
|
|
|
} ta_data_t;
|
|
|
|
|
|
|
|
|
|
|
|
void unifi_ta_sampling_init(card_t *card);
|
|
|
|
|
|
|
|
#endif /* __TA_SAMPLING_H__ */
|