summaryrefslogtreecommitdiff
path: root/cp/conn/src
diff options
context:
space:
mode:
authorGuillaume2008-02-15 15:27:57 +0000
committerGuillaume2008-02-15 15:27:57 +0000
commitf11f137b88f019e49a13326c0971661ebeccfc15 (patch)
tree8525d6b1dded67c4565b1a870d829878636ec952 /cp/conn/src
parent1a1e87e2d181ce8615e4703f690078277feb3d1f (diff)
working on module conn.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1420 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cp/conn/src')
-rw-r--r--cp/conn/src/conn.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/cp/conn/src/conn.c b/cp/conn/src/conn.c
index e69de29bb2..9dd5ae089f 100644
--- a/cp/conn/src/conn.c
+++ b/cp/conn/src/conn.c
@@ -0,0 +1,47 @@
+/* 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"
+
+static conn_data_t conn_data[MAX_NB_CONN];
+
+/****************** private functions ************************/
+u16
+cp_conn_cid_2_index(u16 cid)
+{
+ u16 index;
+ index = swap16(cid);
+ dbg_assert(index < COUNT(conn_status));
+ return index;
+}
+
+
+
+/****************** public functions ************************/
+
+void
+cp_conn_init(void)
+{
+ u32 i;
+ for(i=0 ; i < COUNT(conn_status) ; i++)
+ {
+ conn_data[i].conn_status = CONN_FREE;
+ conn_data[i].connexion = NULL;
+ }
+}
+