summaryrefslogtreecommitdiff
path: root/cesar/interface/inc
diff options
context:
space:
mode:
authorsave2008-04-07 14:17:42 +0000
committersave2008-04-07 14:17:42 +0000
commit3d58a62727346b7ac1a6cb36fed1a06ed72228dd (patch)
treed7788c3cf9f76426aef0286d0202e2097f0fa0eb /cesar/interface/inc
parent095dca4b0a8d4924093bab424f71f588fdd84613 (diff)
Moved the complete svn base into the cesar directory.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1769 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/interface/inc')
-rw-r--r--cesar/interface/inc/context.h57
-rw-r--r--cesar/interface/inc/interface.h43
2 files changed, 100 insertions, 0 deletions
diff --git a/cesar/interface/inc/context.h b/cesar/interface/inc/context.h
new file mode 100644
index 0000000000..27d1eab5b0
--- /dev/null
+++ b/cesar/interface/inc/context.h
@@ -0,0 +1,57 @@
+#ifndef interface_inc_context_h
+#define interface_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file interface/inc/context.h
+ * \brief Interface context.
+ * \ingroup interface
+ *
+ */
+#include "hle/hle.h"
+#include "lib/circular_buffer.h"
+#include "mac/common/config.h"
+
+#include "interface/interface.h"
+
+/** module includes. */
+#include "interface/sniffer/sniffer.h"
+
+struct interface_t
+{
+ /** cl context. */
+ cl_t *cl;
+ /** sar context. */
+ sar_t *sar;
+ /** hle context. */
+ hle_t *hle;
+
+ /** sniffer context. */
+ interface_sniffer_t *sniffer;
+
+ /** Mac config. */
+ mac_config_t *mac_config;
+
+ /* callbacks functions. */
+ /** Callback to call on MME reception. */
+ interface_mme_recv_cb_t mme_recv_cb;
+ /** Callback on buffer add. */
+ interface_mme_buffer_add_cb_t buffer_add_cb;
+ /** Callback on beacon add. */
+ interface_beacon_add_cb_t beacon_add_cb;
+ /** Actor user data. */
+ void *actor_user_data;
+
+ /** Buffer management. */
+ u8 *buffer_list[INTERFACE_BUFFER_LIST_NUM_SLOTS];
+ circular_buffer_t buffers;
+
+ cyg_mutex_t buffer_mutex;
+};
+
+#endif /* interface_inc_context_h */
diff --git a/cesar/interface/inc/interface.h b/cesar/interface/inc/interface.h
new file mode 100644
index 0000000000..aec0877ff4
--- /dev/null
+++ b/cesar/interface/inc/interface.h
@@ -0,0 +1,43 @@
+#ifndef interface_inc_interface_h
+#define interface_inc_interface_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file interface/inc/interface.h
+ * \brief Interface private functions.
+ * \ingroup interface
+ *
+ */
+
+#include "interface/interface.h"
+
+/**
+ * The buffer shall be provided to the CP.
+ * \param ctx the interface context.
+ * \param buffer the buffer to add.
+ */
+void
+interface_buffer_add (interface_t *ctx, u8 *buffer);
+
+/**
+ * Add a buffer to its own list.
+ * \param ctx the interface context.
+ * \param buffer the buffer to add
+ */
+void
+interface_buffer_work_add (interface_t *ctx, u8 *buffer);
+
+/**
+ * Get a buffer from the list.
+ * \param ctx the interface context.
+ * \return the buffer to use, NULL if no buffer is available.
+ */
+u8*
+interface_buffer_work_get (interface_t *ctx);
+
+#endif /* interface_inc_interface_h */