summaryrefslogtreecommitdiff
path: root/cesar/cp2/sta/data/sta_data.h
blob: d7dba970214a4ef7578cdad0f176d3bff6ce7a7a (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#ifndef cp2_sta_data_sta_data_h
#define cp2_sta_data_sta_data_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    cp2/sta/data/sta_data.h
 * \brief   Sta data. 
 * \ingroup cp_sta_data
 *
 * Sta data.
 */

/* forward declaration. */
typedef struct cp_sta_data_private_t cp_sta_data_private_t;

struct cp_msg_reassembly_ctx_t
{

};
typedef struct cp_msg_reassembly_ctx_t cp_msg_reassembly_ctx_t;

struct cp_sta_data_t
{
    /** Private part. */
    cp_sta_data_private_t private;
    /** Visible true if the STA is visible by out STA. */
    bool visible;
    /** Last seen. */
    uint last_seen_ntb;
    /** Reassembly context. */
    cp_msg_reassembly_ctx_t rea; 
};
typedef struct cp_sta_data_t cp_sta_data_t;

/** Get the TEI of the station.
 * \param  sta  the station.
 * \return  the sta's tei.
 */
u8
cp_sta_get_tei(cp_sta_t *sta);

/** Get the mac address of the station.
 * \param  sta  the station.
 * \return  the sta's mac address.
 */
mac_t
cp_sta_get_mac_address(cp_sta_t *sta);

/** Set the associated status of the station.
 * \param  sta  the station.
 * \param  associated  the association status, true if associated, false
 * otherwise.
 */
void
cp_sta_set_associated (cp_sta_t *sta, bool associated);

/** Get the association status.
 * \param  sta  the station.
 * \return   the association status.
 *
 * This function will return true if the station is associated, false
 * otherwise.
 */
bool
cp_sta_is_associated (cp_sta_t *sta);

/** Set the CCo status of the station.
 * \param  sta  the station.
 * \param  cco  the cco status, true if the sta is cco, false otherwise.
 */
void
cp_sta_set_cco_status (cp_sta_t *sta, bool cco);

/** Get the station CCo's status.
 * \param  sta  the station.
 * \return  the cco status of the sta.
 *
 * This function will return true if the Station is CCo, false otherwise.
 */
bool
cp_sta_is_cco_status (cp_sta_t *sta);

/** Set the PCo status of the station.
 * \param  sta  the station.
 * \param  pco  the pco status, true if the sta is pco false otherwise.
 */
void
cp_sta_set_pco_status (cp_sta_t *sta, bool pco);

/** Get the PCo status of the station.
 * \param  sta  the station.
 * \return  the PCo's station status.
 *
 * This will return true if the STA is PCo, false otherwise.
 */
bool
cp_sta_is_pco_status (cp_sta_t *sta);

/** Set the backup CCo status of the station.
 * \param  sta  the station.
 * \param  backup_cco  the backup cco status.
 *
 * This shall set true if the station is backup CCo, false otherwise.
 */
void
cp_sta_set_backup_cco_status (cp_sta_t *sta, bool backup_cco);

/** Get the backup CCo of the station.
 * \param  sta  the sta.
 * \return  the sta's backup cco status.
 *
 * This will return true if the station is backup cco, false otherwise.
 */
bool
cp_sta_is_backup_cco_status (cp_sta_t *sta);

#endif /* cp2_sta_data_sta_data_h */