summaryrefslogtreecommitdiff
path: root/cesar/cl/inc/cl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cl/inc/cl.h')
-rw-r--r--cesar/cl/inc/cl.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/cesar/cl/inc/cl.h b/cesar/cl/inc/cl.h
new file mode 100644
index 0000000000..1b3cdbd2ce
--- /dev/null
+++ b/cesar/cl/inc/cl.h
@@ -0,0 +1,71 @@
+#ifndef CL_INC_CL_H_
+#define CL_INC_CL_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/inc/cl.h
+ * \brief private function for the CL
+ * \ingroup cl/inc
+ *
+ */
+
+#include "cl/cl_mactotei.h"
+#include "cl/inc/context.h"
+
+/**
+ * Init the MME module of the CL.
+ *
+ * \param ctx the mme context.
+ */
+void cl_mme_init (cl_mme_t *ctx);
+
+/**
+ * Swith the old mactotei table with the new one.
+ *
+ * \param cl the convergence layer context
+ * \param table the table to switch
+ */
+void cl_mactotei_switch_table (cl_t *cl, cl_mactotei_table_t *table);
+
+/**
+ * Find a mac address in the table using a dichotomy search
+ *
+ * \param cl the convergence layer context.
+ * \param mac the mac address to find
+ * \return the tei corresponding to the mac address if known otherwise it
+ * returns 0xff a broadcast tei (see HPAV section 5.3.1.2)
+ */
+uint cl_mactotei_table_find_tei_from_mac (cl_t *cl, mac_t mac);
+
+/**
+ * Search for the lid in the classifier
+ *
+ * \param cl CL context
+ * \param bcast put true if the link is a bcast one, false otherwise.
+ * \param tei the tei found previously by the mactotei table.
+ * \param acs put true if the link should be process by the acs
+ * \param drop put true if the data should be drop.
+ */
+uint cl_classifer_get_lid (cl_t *cl, uint tei, bool *bcast, bool *acs,
+ bool *drop);
+
+
+
+/**
+ * Send a data once the TEI has been find.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer containing the data to send.
+ * \param length the buffer data length.
+ * \param tei the tei found from the cl_mactotei list.
+ */
+void
+cl_data_send_with_tei (cl_t *cl, u8 *buffer, uint length, uint tei);
+
+#endif /*CL_INC_CL_H_*/