summaryrefslogtreecommitdiff
path: root/cesar/cp/conn
diff options
context:
space:
mode:
authorschodet2008-08-29 14:39:45 +0000
committerschodet2008-08-29 14:39:45 +0000
commit1b5b41d79cf71a1d5a784576aa1fa9d9bd704a71 (patch)
treeb19ce8222f66f70325ab45e03ba99a1b5a1a4d63 /cesar/cp/conn
parentabdbc9f21c94b14339fe65720efb161c9ae601b4 (diff)
* cp:
- removed old CP. * test_general: - removed station-cp-dp - removed cp_beacon-dp * other clean up. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2797 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp/conn')
-rw-r--r--cesar/cp/conn/Module1
-rw-r--r--cesar/cp/conn/conn.h29
-rw-r--r--cesar/cp/conn/inc/conn_actions.h17
-rw-r--r--cesar/cp/conn/inc/conn_defs.h118
-rw-r--r--cesar/cp/conn/inc/conn_priv.h39
-rw-r--r--cesar/cp/conn/src/conn.c113
6 files changed, 0 insertions, 317 deletions
diff --git a/cesar/cp/conn/Module b/cesar/cp/conn/Module
deleted file mode 100644
index 124dd907ce..0000000000
--- a/cesar/cp/conn/Module
+++ /dev/null
@@ -1 +0,0 @@
-SOURCES := conn.c \ No newline at end of file
diff --git a/cesar/cp/conn/conn.h b/cesar/cp/conn/conn.h
deleted file mode 100644
index e60f4a8bf1..0000000000
--- a/cesar/cp/conn/conn.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef CONN_H_
-#define CONN_H_
-
-#include "cp/conn/inc/conn_defs.h"
-
-
-void
-cp_conn_init(void);
-
-/**
- * \brief create a new connection on the init side of it.
- *
- * \param osa : original source address
- * \param oda : original destination address
- * \param req_id : request id provided by the HLE, or 0 if the
- * connection is created by the Auto Connect Service
- * \param cspec :
- * \param classifier_rules :
- *
- * \return void
- */
-void
-cp_conn_create_init(mac_address_t osa,
- mac_address_t oda,
- u16 req_id,
- cspec_t cspec,
- classifier_rules_t classifier_rules);
-
-#endif /*CONN_H_*/
diff --git a/cesar/cp/conn/inc/conn_actions.h b/cesar/cp/conn/inc/conn_actions.h
deleted file mode 100644
index 02be22d17c..0000000000
--- a/cesar/cp/conn/inc/conn_actions.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2007 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/conn/inc/conn_actions.h
- * \brief actions of the conn fsm
- * \ingroup cp_conn
- */
-
-#ifndef CONN_ACTIONS_H_
-#define CONN_ACTIONS_H_
-
-#endif /*CONN_ACTIONS_H_*/
diff --git a/cesar/cp/conn/inc/conn_defs.h b/cesar/cp/conn/inc/conn_defs.h
deleted file mode 100644
index 4884f89500..0000000000
--- a/cesar/cp/conn/inc/conn_defs.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2007 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/conn/inc/conn_types.h
- * \brief basics types for the conn module
- * \ingroup cp_conn
- */
-
-#ifndef CONN_TYPES_H_
-#define CONN_TYPES_H_
-
-#include "cp/cp_types.h"
-#include "mac/common/defs.h"
-#include "lib/blk.h"
-
-/*
- * max number of BLE intervalle for a link
- */
-#define MAX_NB_BLE_INT 10
-/*
- * max number of available connexions
- */
-#define MAX_NB_CONN (MAC_TEI_STA_NB * MAC_LLID_NB)
-
-// TODO : move this structure to the LINK module
-typedef struct link_t
-{
- u8 tl_flag; // 11.5.35
- tei_t stei;
- tei_t dtei[MAX_STA_NB];
- u8 lid;
-} link_t;
-
-typedef enum conn_status_t
-{
- CONN_FREE,
- CONN_WAIT,
- CONN_ECTED
-} __attribute__ ((packed)) conn_status_t;
-
-typedef enum mac_service_type_t
-{
- CONN_CONTENTION_FREE = 0,
- CONN_CONTENTION_BASED = 1,
- CONN_CONTENTION_FREE_PREFERED = 2
-} __attribute__ ((packed)) mac_service_type_t;
-
-typedef struct cinfo_t // table 7-145
-{
- u8 valid;
- mac_service_type_t mac_service_type;
- u8 user_priority;
- u8 arrival_time_stamp;
- u8 smoothing;
-} cinfo_t;
-
-typedef struct qmp_t // table 7-147
-{
- u16 cf[0x1C];
- u32 cfl[4];
- u8 cdesc;
-} qmp_t;
-
-typedef struct cspec_t // table 7-144
-{
- cinfo_t cinfo_fw;
- cinfo_t cinfo_rv;
- qmp_t qmp_fw;
- qmp_t qmp_rv;
-} cspec_t;
-
-typedef struct ble_t // table 11-196
-{
- u16 end_time;
- u8 ble;
-} ble_t;
-
-typedef struct con_info_t
-{
- cspec_t cspec;
- u16 cid;
- mac_address_t init;
- mac_address_t term;
- ble_t ble_fw[MAX_NB_BLE_INT];
- ble_t ble_rv[MAX_NB_BLE_INT];
-} con_info_t;
-
-typedef struct classifier_rules_t // 6.3
-{
- u8 rule_id;
- u8 rule[16];
-} classifier_rules_t;
-
-#define NB_RULES (BLK_SIZE - (2*sizeof(link_t) + sizeof(con_info_t))) / sizeof(classifier_rules_t)
-
-
-typedef struct connexion_t
-{
- link_t fl; // forward link
- link_t rl; // reverse link
- con_info_t con_info;
- classifier_rules_t rules[NB_RULES];
-} connexion_t;
-
-typedef struct conn_data_t
-{
- conn_status_t conn_status;
- connexion_t *connexion;
- u16 req_id; // the id given by HLE
-}conn_data_t;
-
-
-#endif /*CONN_TYPES_H_*/
diff --git a/cesar/cp/conn/inc/conn_priv.h b/cesar/cp/conn/inc/conn_priv.h
deleted file mode 100644
index fb28459ea2..0000000000
--- a/cesar/cp/conn/inc/conn_priv.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2007 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/conn/inc/conn_priv.h
- * \brief private functions for the conn module
- * \ingroup cp_conn
- */
-
-
-#ifndef CONN_PRIV_H_
-#define CONN_PRIV_H_
-
-
-
-/**
- * \brief convert the CID of a connexion to it index
- *
- * \param cid
- * \return index
- */
-u16
-cp_conn_cid_2_index(u16 cid);
-
-/**
- * \brief return an available connexion index
- * the CID can be calculated from this index
- * \param
- * \return index
- */
-u16
-cp_conn_get_new_conn_index(void);
-
-
-#endif /*CONN_PRIV_H_*/
diff --git a/cesar/cp/conn/src/conn.c b/cesar/cp/conn/src/conn.c
deleted file mode 100644
index febf31b806..0000000000
--- a/cesar/cp/conn/src/conn.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/conn/src/conn.c
- * \brief « brief description »
- * \ingroup « module »
- *
- * « long description »
- */
-
-#include "common/std.h"
-#include "cp/conn/inc/conn_defs.h"
-#include "cp/conn/inc/conn_priv.h"
-#include "lib/swap.h"
-#include <string.h>
-
-static conn_data_t conn_data[MAX_NB_CONN];
-
-/****************** private functions ************************/
-
-u16
-cp_conn_cid_2_index(u16 cid)
-{
- tei_t tei;
- u8 llid;
- u16 index;
-
- llid = cid & 0xFF;
- tei = cid >> 8;
- index = (llid - MAC_LLID_MIN) * MAC_TEI_STA_NB + tei - 1;
- dbg_assert(index < COUNT(conn_data));
- return index;
-}
-
-u16
-cp_conn_get_new_conn_index(void)
-{
- tei_t tei;
- u8 llid;
- u16 index;
-
- tei = cp_station_get_tei(NULL);
- for(llid = MAC_LLID_MIN ; llid < MAC_LLID_MAX ; llid ++)
- {
- index = (llid - MAC_LLID_MIN) * MAC_TEI_STA_NB + tei - 1;
- if(conn_data[index].conn_status == CONN_FREE)
- {
- return index;
- }
- }
- // all connexion are used !!!
- dbg_assert(0);
- return 0;
-}
-
-
-/****************** public functions ************************/
-
-void
-cp_conn_init(void)
-{
- u32 i;
- for(i=0 ; i < COUNT(conn_data) ; i++)
- {
- conn_data[i].conn_status = CONN_FREE;
- conn_data[i].connexion = NULL;
- conn_data[i].req_id = 0;
- }
-}
-
-bool
-cp_conn_is_multicast(mac_address_t ad)
-{
-
-}
-
-void
-cp_conn_create_init(mac_address_t osa,
- mac_address_t oda,
- u16 req_id,
- cspec_t cspec,
- classifier_rules_t classifier_rules)
-{
- u16 index;
-
- // check if the connection is compliant with the current network mode (5.2.3.1)
- // TODO
- // do the connection admission control procedure (7.8.3)
- if(cspec.cinfo_fw.mac_service_type != CONN_CONTENTION_BASED)
- {
- // TODO
- }
- index = cp_conn_get_new_conn_index();
- if(index)
- { // create the new connection
- // record the CSPEC
- conn_data[index].connexion = blk_alloc_zero();
- memcpy(&conn_data[index].connexion->con_info.cspec, &cspec, sizeof(cspec));
- // record the connection info
- memcpy(conn_data[index].connexion->con_info.init, osa, sizeof(mac_address_t));
- memcpy(conn_data[index].connexion->con_info.term, oda, sizeof(mac_address_t));
- memcpy(&conn_data[index].connexion->rules, &classifier_rules, sizeof(classifier_rules_t));
- conn_data[index].req_id = req_id;
- // send the connexion request to the other station(s)
- conn_data[index].conn_status = CONN_WAIT;
-
- }
-}