summaryrefslogtreecommitdiff
path: root/cesar/tools/sniffer_phy/inc/mme.h
blob: 613e8bd734d4b740b488e67eea91a4ee2eeeb572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef inc_mme_h
#define inc_mme_h
/* Cesar project {{{
 *
 * Copyright (C) 2010 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    inc/mme.h
 * \brief   MME encoding/decoding.
 * \ingroup sniffer_phy
 */
#include "inc/forward.h"
#include "inc/lowlevel.h"

/** MME context. */
struct mme_t
{
    /** My MAC address. */
    mac_t mac;
    /** MAC address to send sniffed data to. */
    mac_t mac_sniffer;
    /** Take PB content. */
    bool pb;
};
typedef struct mme_t mme_t;

BEGIN_DECLS

/**
 * Initialise MME layer.
 * \param  ctx  sniffer context
 */
void
mme_init (sniffer_phy_t *ctx);

/**
 * Handle an incoming MME.
 * \param  ctx  sniffer context
 * \param  buffer  buffer containing the frame
 * \param  length  buffer length
 */
void
mme_handle (sniffer_phy_t *ctx, const u8 *buffer, uint length);

/**
 * Send a received MPDU as MME.
 * \param  ctx  sniffer context
 * \param  rx  received MPDU description
 *
 * The received MPDU is encapsulated in a sniffer MME.
 */
void
mme_report_mpdu (sniffer_phy_t *ctx, lowlevel_rx_t *rx);

END_DECLS

#endif /* inc_mme_h */