sniffer.h File Reference


Detailed Description

Interface of the Simple Sniffer and Scanner Application.

Definition in file sniffer.h.

Go to the source code of this file.

Data Structures

struct  dbg_t
struct  scan_result_tag
 Data structure for scan results. More...
struct  sniffer_context_tag
 Data structure for internal state variables of the application. More...
struct  sniffer_packet_tag

Defines

#define CHANNEL_MAX_OFFSET   (TRX_NB_CHANNELS-1)
#define CHANNEL_NEXT_CIRCULAR(x)
#define CHANNEL_OFFSET(x)   (x > TRX_MAX_CHANNEL ? TRX_MIN_CHANNEL : (x - TRX_MIN_CHANNEL))
#define NL   "\n\r"
#define SCAN_PERIOD_MS   (2000)
#define VERSION   "0.1"

Typedefs

typedef struct scan_result_tag scan_result_t
typedef struct sniffer_context_tag sniffer_context_t
typedef struct sniffer_packet_tag sniffer_packet_t

Enumerations

enum  sniffer_state_t {
  IDLE, EDSCAN, SCAN, SCAN_DONE,
  SNIFF
}
 Appication States. More...

Functions

void ctrl_process_input (void)
void scan_continue (void)
void scan_init (void)
 Initialize the scan mode.
static void scan_update_frame (uint8_t flen, bool crc_ok, uint8_t lqi, uint8_t ed, uint8_t *rxbuf)
 update the scan table for a channel.
void sniffer_start (sniffer_state_t state)
 Process data received from HIF.
void sniffer_stop (void)
 Halt current operation and enter state IDLE.

Variables

sniffer_context_t ctx


Define Documentation

#define CHANNEL_NEXT_CIRCULAR (  ) 

Value:

do \
    { \
        (x)++; \
        if ((x) > TRX_MAX_CHANNEL) \
        { \
            (x) = TRX_MIN_CHANNEL; \
        } \
    } \
    while(0)
Increment channel number and wraps back to lowest channel, if upper channel + 1 is reached.

Definition at line 64 of file sniffer.h.


Enumeration Type Documentation

Appication States.

Enumerator:
IDLE  Application is in idle mode, receiving commands from HIF.
EDSCAN  Application is in scanning mode.
SCAN  Application is in scanning mode.
SCAN_DONE  Application is in scanning mode.
SNIFF  Application is in sniffing mode.

Definition at line 79 of file sniffer.h.


Function Documentation

void scan_init ( void   ) 

Initialize the scan mode.

Definition at line 56 of file sniffer_scan.c.

static void scan_update_frame ( uint8_t  flen,
bool  crc_ok,
uint8_t  lqi,
uint8_t  ed,
uint8_t *  rxbuf 
) [static]

update the scan table for a channel.

Definition at line 164 of file sniffer.h.

void sniffer_start ( sniffer_state_t  state  ) 

Process data received from HIF.

The function checks for available input data and performs depending on the current state the processing.

Definition at line 134 of file sniffer.c.

void sniffer_stop ( void   ) 

Halt current operation and enter state IDLE.

Definition at line 160 of file sniffer.c.


Variable Documentation

Note:
In order to get higher performance in frame receiving, this application uses a own implementation of the transceiver interrrupt routine (TRX_IRQ_vect), instead of the callback function from librf23x.a.

Definition at line 52 of file sniffer.c.


This documentation for µracoli was generated on 21 Jan 2010 by  doxygen 1.5.5