# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/lmac/src/td/td.c File Reference

Traffic Detection (TD) Module. More...

`#include "td.h"`
`#include "ke_timer.h"`
`#include "ps.h"`
`#include "chan.h"`
`#include "vif_mgmt.h"`
`#include "p2p.h"`
`#include "sta_mgmt.h"`

Go to the source code of this file.

## Defines
#define | TD_DEBUG_TRACES_EN (0)
| Debug Configuration for TD Module 0 - Traces are disabled 1.
#define | TD_DEBUG_PRINT(lvl, format,...)
#define | TD_GET_VIF_INDEX(td_env) ((td_env - &td_env_tab[0]) / sizeof(struct td_env_tag))
| Return the VIF index of a Traffic Detection environment.
## Functions
static void | td_update_sta_status (uint8_t sta_idx)
static void | td_timer_end (void *env)
void | td_init (void)
| Initialize the traffic detection module.
void | td_reset (uint8_t vif_index)
| Reset Traffic Detection status for a given VIF.
void | td_sta_reset (uint8_t sta_index)
| Reset Traffic Detection status for a given STA.
void | td_start (uint8_t vif_index)
| Start Traffic Detection on a given VIF.
void | td_pck_ind (uint8_t vif_index, uint8_t sta_index, bool rx)
| Handle reception or transmission of a packet on a given interface.
void | td_pck_ps_ind (uint8_t vif_index, bool rx)
| Handle reception or transmission of a packet on a given interface in a PS context.
## Variables
struct td_env_tag | td_env_tab [NX_VIRT_DEV_MAX]
| List of TD Environment Entries, one for each VIF that can be created.
struct td_sta_env_tag | td_sta_env [NX_REMOTE_STA_MAX]
| List of TD Environment Entries used for per-STA traffic detection.

## Detailed Description

Traffic Detection (TD) Module.

Copyright (C) RivieraWaves 2015-2019

Definition in file td.c.