summaryrefslogtreecommitdiff
path: root/cesar/test_general/station/overide
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/test_general/station/overide')
-rw-r--r--cesar/test_general/station/overide/cp/cco/Module1
-rw-r--r--cesar/test_general/station/overide/cp/cco/cco.h123
-rw-r--r--cesar/test_general/station/overide/cp/cco/inc/context.h46
-rw-r--r--cesar/test_general/station/overide/cp/cco/src/cco.c281
-rw-r--r--cesar/test_general/station/overide/cp/secu/Module1
-rw-r--r--cesar/test_general/station/overide/cp/secu/inc/context.h24
-rw-r--r--cesar/test_general/station/overide/cp/secu/secu.h58
-rw-r--r--cesar/test_general/station/overide/cp/secu/src/secu.c74
-rw-r--r--cesar/test_general/station/overide/cp/station/Module1
-rw-r--r--cesar/test_general/station/overide/cp/station/inc/context.h39
-rw-r--r--cesar/test_general/station/overide/cp/station/src/station.c243
-rw-r--r--cesar/test_general/station/overide/cp/station/station.h183
12 files changed, 1074 insertions, 0 deletions
diff --git a/cesar/test_general/station/overide/cp/cco/Module b/cesar/test_general/station/overide/cp/cco/Module
new file mode 100644
index 0000000000..89eab437be
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/cco/Module
@@ -0,0 +1 @@
+SOURCES:=cco.c
diff --git a/cesar/test_general/station/overide/cp/cco/cco.h b/cesar/test_general/station/overide/cp/cco/cco.h
new file mode 100644
index 0000000000..0dcda62b01
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/cco/cco.h
@@ -0,0 +1,123 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/cco.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/** Foward declaration */
+typedef struct cp_cco_t cp_cco_t;
+
+cp_cco_t *
+cp_cco_init (void);
+
+void
+cp_cco_uninit (cp_cco_t *ctx);
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx);
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av);
+
+bool
+cp_cco_get_access(cp_cco_t *ctx);
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access);
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx);
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr);
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx);
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm);
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx);
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots);
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx);
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage);
+
+u8
+cp_cco_get_slot_id (cp_cco_t *ctx);
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id);
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx);
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss);
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx);
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm);
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap);
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap);
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap);
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status);
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status);
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status);
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_cco_h */
diff --git a/cesar/test_general/station/overide/cp/cco/inc/context.h b/cesar/test_general/station/overide/cp/cco/inc/context.h
new file mode 100644
index 0000000000..a503f02382
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/cco/inc/context.h
@@ -0,0 +1,46 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_cco_t
+{
+ BITFIELDS_WORD
+ (
+ uint dt_av:3;,
+ uint access:1;,
+ uint ncnr:1;,
+ uint npsm:1;,
+ uint num_slots:3;,
+ uint slot_usage:8;,
+ uint slotid:3;,
+ uint aclss:3;,
+ uint nm:2;,
+ uint cco_cap:2;,
+ uint proxy_cap:1;,
+ uint backup_cap:1;,
+ uint cco_status:1;,
+ uint pco_status:1;,
+ uint backup_cco:1;
+ );
+ BITFIELDS_WORD
+ (
+ uint nr:6;,
+ uint user_appointed_cco_status:1;,
+ uint rsvd:25;
+ );
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h */
diff --git a/cesar/test_general/station/overide/cp/cco/src/cco.c b/cesar/test_general/station/overide/cp/cco/src/cco.c
new file mode 100644
index 0000000000..c793828138
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/cco/src/cco.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/src/cco.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/cco/cco.h"
+#include "cp/cco/inc/context.h"
+
+static cp_cco_t cco;
+
+cp_cco_t *
+cp_cco_init (void)
+{
+ cco.dt_av = 0x0;
+ cco.access = 0x0;
+ cco.ncnr = 0x0;
+ cco.npsm = 0x0;
+ cco.num_slots = 0x1;
+ cco.slot_usage = 0x1;
+ cco.slotid = 0x0;
+ cco.aclss = 0x1;
+ cco.nm = 0x2;
+ cco.cco_cap = 0x0;
+ cco.proxy_cap = 0;
+ cco.backup_cap = 0;
+ cco.cco_status = 0;
+ cco.pco_status = 0;
+ cco.backup_cco = 0;
+ cco.nr = 0;
+ cco.user_appointed_cco_status = 0;
+ cco.rsvd = 0;
+
+ return &cco;
+}
+
+void
+cp_cco_uninit (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->dt_av;
+}
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av)
+{
+ dbg_assert (ctx);
+ ctx->dt_av = dt_av;
+}
+
+bool
+cp_cco_get_access(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->access;
+}
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access)
+{
+ dbg_assert (ctx);
+
+ ctx->access = access;
+}
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->ncnr;
+}
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr)
+{
+ dbg_assert (ctx);
+ ctx->ncnr = ncnr;
+}
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->npsm;
+}
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm)
+{
+ dbg_assert (ctx);
+ ctx->npsm = npsm;
+}
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->num_slots;
+}
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots)
+{
+ dbg_assert (ctx);
+ ctx->num_slots = num_slots;
+}
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->slot_usage;
+}
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage)
+{
+ dbg_assert (ctx);
+ ctx->slot_usage = slotusage;
+}
+
+u8
+cp_cco_get_slot_id (cp_cco_t *cco)
+{
+ dbg_assert (cco);
+ return cco->slotid;
+}
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id)
+{
+ dbg_assert (ctx);
+ ctx->slotid = slot_id;
+}
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->aclss;
+}
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss)
+{
+ dbg_assert (ctx);
+ ctx->aclss = aclss;
+}
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nm;
+}
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm)
+{
+ dbg_assert (ctx);
+ ctx->nm = nm;
+}
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_cap;
+}
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap)
+{
+ dbg_assert (ctx);
+ ctx->cco_cap = cco_cap;
+}
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->proxy_cap;
+}
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap)
+{
+ dbg_assert (ctx);
+ ctx->proxy_cap = proxy_cap;
+}
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cap;
+}
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap)
+{
+ dbg_assert (ctx);
+ ctx->backup_cap = backup_cap;
+}
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_status;
+}
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status)
+{
+ dbg_assert (ctx);
+ ctx->cco_status = cco_status;
+}
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->pco_status;
+}
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status)
+{
+ dbg_assert(ctx);
+ ctx->pco_status = pco_status;
+}
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cco;
+}
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->backup_cco = backup_cco_status;
+}
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->user_appointed_cco_status;
+}
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->user_appointed_cco_status = ua_cco_status;
+}
+
diff --git a/cesar/test_general/station/overide/cp/secu/Module b/cesar/test_general/station/overide/cp/secu/Module
new file mode 100644
index 0000000000..9087aae87c
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/secu/Module
@@ -0,0 +1 @@
+SOURCES:=secu.c
diff --git a/cesar/test_general/station/overide/cp/secu/inc/context.h b/cesar/test_general/station/overide/cp/secu/inc/context.h
new file mode 100644
index 0000000000..f7772ad9bc
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/secu/inc/context.h
@@ -0,0 +1,24 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_secu_t
+{
+ bool kbc;
+ u8 eks;
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h */
diff --git a/cesar/test_general/station/overide/cp/secu/secu.h b/cesar/test_general/station/overide/cp/secu/secu.h
new file mode 100644
index 0000000000..c571679059
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/secu/secu.h
@@ -0,0 +1,58 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_secu_secu_h
+#define cp_beacon_test_central_beacon_overide_cp_secu_secu_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/secu.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "cp/secu/secu.h"
+
+typedef struct cp_secu_t cp_secu_t;
+
+/**
+ * Initialize the security layer
+ *
+ * \return the security context.
+ */
+cp_secu_t *
+cp_secu_init (void);
+
+/**
+ * Uninitialize the seucurity layer
+ *
+ * \param ctx the security context.
+ */
+void
+cp_secu_uninit (cp_secu_t *ctx);
+
+/**
+ * Get Key being change
+ * 0 for a frame level encyption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+cp_secu_get_kbc (cp_secu_t *ctx);
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+cp_secu_get_eks (cp_secu_t *ctx);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_secu_secu_h */
diff --git a/cesar/test_general/station/overide/cp/secu/src/secu.c b/cesar/test_general/station/overide/cp/secu/src/secu.c
new file mode 100644
index 0000000000..b2fa99d671
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/secu/src/secu.c
@@ -0,0 +1,74 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/src/secu.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/secu/secu.h"
+#include "cp/secu/inc/context.h"
+
+// static declaration
+static cp_secu_t secu_global;
+
+/**
+ * Initialize the security layer
+ *
+ * \return the security context.
+ */
+cp_secu_t *
+cp_secu_init (void)
+{
+ return &secu_global;
+}
+
+/**
+ * Uninitialize the seucurity layer
+ *
+ * \param ctx the security context.
+ */
+void
+cp_secu_uninit (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+/**
+ * Get Key being change
+ * 0 for a frame level encyption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+cp_secu_get_kbc (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->kbc;
+}
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+cp_secu_get_eks (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->eks;
+}
+
diff --git a/cesar/test_general/station/overide/cp/station/Module b/cesar/test_general/station/overide/cp/station/Module
new file mode 100644
index 0000000000..360ddd8c71
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/station/Module
@@ -0,0 +1 @@
+SOURCES=station.c
diff --git a/cesar/test_general/station/overide/cp/station/inc/context.h b/cesar/test_general/station/overide/cp/station/inc/context.h
new file mode 100644
index 0000000000..98516ef28e
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/station/inc/context.h
@@ -0,0 +1,39 @@
+#ifndef overide_cp_station_inc_context_h
+#define overide_cp_station_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+#include "cp/beacon/inc/bentry.h"
+
+struct cp_sta_t
+{
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ pbproc_t *pbproc;
+ cl_t *cl;
+
+ u64 nid;
+ bool hoip;
+ u8 numDisSta;
+ u8 numDisNet;
+ bool authentication;
+};
+
+#endif /* overide_cp_station_inc_context_h */
diff --git a/cesar/test_general/station/overide/cp/station/src/station.c b/cesar/test_general/station/overide/cp/station/src/station.c
new file mode 100644
index 0000000000..ef8e17ea23
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/station/src/station.c
@@ -0,0 +1,243 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/src/station.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include <string.h>
+
+#include "cp/station/station.h"
+
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+#include "cp/station/inc/context.h"
+
+static cp_sta_t sta_global;
+
+/**
+ * Station init.
+ *
+ * \param mac_store_ctx mac_store context
+ * \param interf_cl_ctx cl context
+ * \param pbproc_ctx pbproc context.
+ * \param mac_config the mac_config context.
+ * \return sta context.
+ */
+cp_sta_t *
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx,
+ pbproc_t *pbproc_ctx, mac_config_t *mac_config)
+{
+ dbg_assert (pbproc_ctx);
+ dbg_assert (mac_config);
+ dbg_assert (interf_cl_ctx);
+ dbg_assert (mac_store_ctx);
+
+ sta_global.pbproc = pbproc_ctx;
+ sta_global.mac_store = mac_store_ctx;
+ sta_global.mac_config = mac_config;
+ sta_global.cl = interf_cl_ctx;
+
+ return &sta_global;
+}
+
+/**
+ * Station init.
+ *
+ * \param ctx sta context.
+ */
+void
+cp_station_uninit (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+/**
+ *
+ * Station get NID
+ *
+ * \param ctx the station context.
+ * \return the nid of the AVLN
+ */
+u64
+cp_station_get_nid (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nid;
+}
+
+/**
+ * Station set nid
+ *
+ * \param ctx the station context
+ * \param nid the nid
+ */
+void
+cp_station_set_nid (cp_sta_t *ctx, u64 nid)
+{
+ dbg_assert (ctx);
+ ctx->nid = nid;
+}
+
+/**
+ * Station get mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac_address_addr the buffer address to store the mac address.
+ */
+void
+cp_station_get_mac_address (cp_sta_t *sta, u8 *addr)
+{
+ dbg_assert (sta);
+ dbg_assert (addr);
+
+ memcpy (addr, &sta->mac_config->sta_mac_address, 6 * sizeof(u8));
+}
+
+/**
+ * Station get TEI
+ *
+ * \param ctx the station context.
+ */
+u8
+cp_station_get_tei (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->mac_config->tei;
+}
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \retun the number of distante stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisSta;
+}
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisNet;
+}
+
+/**
+ * Return the authentication status of the station
+ *
+ * \param sta the station context.
+ * \return the status.
+ */
+bool
+cp_station_is_authenticated(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->authentication;
+}
+
+/**
+ * Set the authenticated flag to one
+ *
+ * \param sta the station context
+ * \param auth boolean informing if the sta is authenticated or not
+ */
+void
+cp_station_set_authenticated (cp_sta_t *sta, bool auth)
+{
+ dbg_assert (sta);
+
+ sta->authentication = true;
+}
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta)
+{
+ dbg_assert (sta);
+ return sta->hoip;
+}
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip)
+{
+ dbg_assert (sta);
+
+ sta->hoip = hoip;
+}
+
+/**
+ * Station set mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac the mac address.
+ */
+void
+cp_station_set_mac_address (cp_sta_t *sta, mac_t mac)
+{
+ dbg_assert (sta);
+ sta->mac_config->sta_mac_address = mac;
+}
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->mac_config->rts_broadcast;
+}
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf)
+{
+ dbg_assert (sta);
+ sta->mac_config->rts_broadcast = true;
+}
+
diff --git a/cesar/test_general/station/overide/cp/station/station.h b/cesar/test_general/station/overide/cp/station/station.h
new file mode 100644
index 0000000000..b5700b165b
--- /dev/null
+++ b/cesar/test_general/station/overide/cp/station/station.h
@@ -0,0 +1,183 @@
+#ifndef overide_cp_station_station_h
+#define overide_cp_station_station_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/station.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "hal/phy/phy.h"
+#include "cp/station/station.h"
+
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+
+/** forward declaration. */
+typedef struct cp_sta_t cp_sta_t;
+
+/**
+ * Station init.
+ *
+ * \param mac_store_ctx mac_store context
+ * \param interf_cl_ctx cl context
+ * \param pbproc_ctx pbproc context.
+ * \param mac_config the mac_config context.
+ * \return sta context.
+ */
+cp_sta_t *
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx, mac_config_t *mac_config);
+
+/**
+ * Station init.
+ *
+ * \param ctx sta context.
+ */
+void
+cp_station_uninit (cp_sta_t *ctx);
+
+/**
+ * Station get NID
+ *
+ * \param ctx the station context.
+ * \return the nid of the AVLN
+ */
+u64
+cp_station_get_nid (cp_sta_t *ctx);
+
+/**
+ * Station set nid
+ *
+ * \param ctx the station context
+ * \param nid the nid
+ */
+void
+cp_station_set_nid (cp_sta_t *ctx, u64 nid);
+
+/**
+ * Station get TEI
+ *
+ * \param ctx the station context.
+ */
+u8
+cp_station_get_tei (cp_sta_t *ctx);
+
+/**
+ * Station get mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac_address_addr the buffer address to store the mac address.
+ */
+void
+cp_station_get_mac_address (cp_sta_t *sta, u8 *addr);
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \retun the number of distante stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta);
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta);
+
+/**
+ * Return the authentication status of the station
+ *
+ * \param sta the station context.
+ * \return the status.
+ */
+bool
+cp_station_is_authenticated(cp_sta_t *sta);
+
+/**
+ * Set the authenticated flag to one
+ *
+ * \param sta the station context
+ * \param auth boolean informing if the sta is authenticated or not
+ */
+void
+cp_station_set_authenticated (cp_sta_t *sta, bool auth);
+
+/**
+ * Set the authenticated flag to one
+ *
+ * \param sta the station context
+ * \param auth boolean informing if the sta is authenticated or not
+ */
+void
+cp_station_set_authenticated (cp_sta_t *sta, bool auth);
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta);
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf);
+
+/**
+ * Set the CCo tei.
+ *
+ * \param sta the sta context.
+ * \param stei the cco tei.
+ */
+void
+cp_station_set_cco_tei(cp_sta_t *sta, uint stei);
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta);
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip);
+
+/**
+ * Station set mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac the mac address.
+ */
+void
+cp_station_set_mac_address (cp_sta_t *sta, mac_t addr);
+
+#endif /* overide_cp_station_station_h */