summaryrefslogtreecommitdiff
path: root/cesar/mac/sar/inc/sar_mfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/sar/inc/sar_mfs.h')
-rw-r--r--cesar/mac/sar/inc/sar_mfs.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/cesar/mac/sar/inc/sar_mfs.h b/cesar/mac/sar/inc/sar_mfs.h
new file mode 100644
index 0000000000..ab4a90514d
--- /dev/null
+++ b/cesar/mac/sar/inc/sar_mfs.h
@@ -0,0 +1,63 @@
+#ifndef SAR_MFS_H_
+#define SAR_MFS_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file sar_mfs.h
+ * \brief the function for the sar mfs.
+ * \ingroup mac/sar/inc
+ *
+ */
+
+#include "mac/pbproc/pbproc.h"
+#include "mac/sar/inc/sar_pb.h"
+
+/**
+ * Update last pb continuous on the mfs
+ *
+ * Verify the continuity of the chain from the first PB of the MFS to the last
+ * contiguous.
+ *
+ * If the counter of ssn had been reseted it verify the coninuity search the ssn
+ * 0 after the ssn 655535.
+ *
+ * \param mfs the MFS to update
+ * \param pb of the MFS from wich one it is needed to update
+ */
+void rx_mfs_update_last_contiguous_and_tail (mfs_rx_t *mfs, pb_t *pb);
+
+/**
+ * Verify if it is necessary to modify the ssn of the MFS according with the
+ * Homeplug AV norm.
+ *
+ * \param pb the pb to make the test.
+ * \param mfs the mfs to verify.
+ * \param pb_nb number of PBs in the mpdu given by the pbproc.
+ */
+void rx_mfs_resize_ssn (pb_t *pb, mfs_rx_t *mfs, uint pb_nb);
+
+/**
+ * Return the max ssn of the MFS
+ *
+ * \param mfs the mfs.
+ */
+u16
+rx_mfs_get_ssn_max (mfs_rx_t *mfs);
+
+/**
+ * Insert a PB after the PB this in the PBs chain
+ *
+ * \param this the pb which the new is the next
+ * \param new the Pb to insert
+ * \return the pb after new
+ */
+pb_t *
+rx_mfs_add_pb_after (pb_t *this, pb_t *new);
+
+#endif /*SAR_MFS_H_*/