summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorGuillaume2008-04-22 13:37:10 +0000
committerGuillaume2008-04-22 13:37:10 +0000
commit45737453f0d0e88d863d7ad054ff328192a192a8 (patch)
tree05b6a513924b39423c59c539cf6317d7b4e71ca1 /cesar
parentaf1bd22aec192bc4c1ef1cd3a1765ac451042301 (diff)
add documentation
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1871 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/cp2/cl_interf/doc/cp_cl_interf.odtbin0 -> 102411 bytes
-rw-r--r--cesar/cp2/msg/doc/cp_msg.odtbin0 -> 101611 bytes
-rw-r--r--cesar/cp2/msg/msg.h6
-rw-r--r--cesar/cp2/secu/secu.h4
-rw-r--r--cesar/cp2/sta/event_handler/station_event_handler.h74
5 files changed, 79 insertions, 5 deletions
diff --git a/cesar/cp2/cl_interf/doc/cp_cl_interf.odt b/cesar/cp2/cl_interf/doc/cp_cl_interf.odt
new file mode 100644
index 0000000000..7194a56641
--- /dev/null
+++ b/cesar/cp2/cl_interf/doc/cp_cl_interf.odt
Binary files differ
diff --git a/cesar/cp2/msg/doc/cp_msg.odt b/cesar/cp2/msg/doc/cp_msg.odt
new file mode 100644
index 0000000000..ae1ea7a76b
--- /dev/null
+++ b/cesar/cp2/msg/doc/cp_msg.odt
Binary files differ
diff --git a/cesar/cp2/msg/msg.h b/cesar/cp2/msg/msg.h
index e222968b22..db8821f6c7 100644
--- a/cesar/cp2/msg/msg.h
+++ b/cesar/cp2/msg/msg.h
@@ -62,13 +62,13 @@ cp_msg_dispatch(cp_t *ctx, cp_mme_rx_t *mme);
*
*/
cp_mme_tx_t *
-cp_msg_init_mme (cp_t *ctx, tei_t d_tei);
+cp_msg_init_mme (cp_t *ctx, cp_mme_header_t *header);
/**
* initialize the buffer for an encrypted message.
*
* \param ctx the cp context
- * \param d_tei
+ * \param d_tei destination tei of the MME
* \param pid protocol id
* \param peks encryption key
* \return context of the mme (with the header, pointer to the buffer etc)
@@ -81,7 +81,7 @@ cp_msg_init_mme (cp_t *ctx, tei_t d_tei);
*
*/
cp_mme_tx_t *
-cp_msg_init_encrypted_mme (cp_t *ctx, tei_t d_tei, pid, peks);
+cp_msg_init_encrypted_mme (cp_t *ctx, cp_mme_header_t *header, pid, peks);
/**
* send the message through the cp_cl_interf api.
diff --git a/cesar/cp2/secu/secu.h b/cesar/cp2/secu/secu.h
index 8ee67c700f..46f6d1468c 100644
--- a/cesar/cp2/secu/secu.h
+++ b/cesar/cp2/secu/secu.h
@@ -125,11 +125,11 @@ cp_secu_pbkdf1 (u8 input[], int input_len, u8 salt[], int salt_len, int it_count
/**
* generate AES key (NEK, NMK or TEK).
* \param
- * \return error code or 0 if success
+ * \return the AES key
*
* see 7.10.7.2 for details
*/
-void
+u8 *
cp_secu_gen_aes_key(void);
/*
diff --git a/cesar/cp2/sta/event_handler/station_event_handler.h b/cesar/cp2/sta/event_handler/station_event_handler.h
new file mode 100644
index 0000000000..94523af473
--- /dev/null
+++ b/cesar/cp2/sta/event_handler/station_event_handler.h
@@ -0,0 +1,74 @@
+#ifndef EVENTHANDLER_H_
+#define EVENTHANDLER_H_
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/sta/event_handler/event_handler.h
+ * \brief event handler for the fsm events...
+ * \ingroup cp/station
+ *
+ * « long description »
+ */
+
+
+#include "cp/msg/inc/msg_const.h"
+#include "cp/interf/inc/interf_types.h"
+#include "cp/vstate_fsm/src/SEMTypes.h"
+#include "cp/station/station.h"
+#include <cyg/kernel/kapi.h>
+
+#define EVENT_QUEUE_SIZE (INTERF_NB_BUFFER * 3)
+
+#if (INTERF_NB_BUFFER > EVENT_QUEUE_SIZE)
+ #error "event queue size too small."
+#endif
+
+
+typedef struct event_t
+{
+ SEM_EVENT_TYPE event_type;
+ VS_VOIDPTR mme_address;
+} event_t;
+
+typedef enum ev_err_code_t
+{
+ EV_OK = 0,
+ EV_QUEUE_FULL,
+ EV_QUEUE_EMPTY
+} ev_err_code_t;
+
+
+/**
+ * \brief initialize the event handler
+ * \param
+ * \return
+ */
+void
+cp_station_initialize_handler(void);
+
+/**
+ * \brief add an event to the event stack
+ * \param event_type : the event type. They are defined in main_fsmData.h
+ * \param mme_address : if necessary, pointer to a mme,
+ * or beacon address if the event is related to a beacon
+ * \return error code or 0 if success
+ */
+ev_err_code_t
+cp_station_add_event(const SEM_EVENT_TYPE event_type, const VS_VOIDPTR mme_address);
+
+/**
+ * \brief retrieve an event from the event stack
+ * \param event : the retieved event
+ * \return error code or 0 if success
+ */
+ev_err_code_t
+cp_station_get_event(event_t *event);
+
+
+
+#endif /*EVENTHANDLER_H_*/