edge: Add unified decoder methods for GPRS/EGPRS
This commit adds new RLC block decoder functions that support both
GPRS and EGPRS. The code path is selected based on the value of the
GprsCodingScheme cs object.
- rlc_parse_ul_data_header
parses the header of an RLC data block including the E and FBI/TI
flags (currently supported CS-1 - CS-4, MCS-1 - MCS-4).
- rlc_copy_to_aligned_buffer
copies an RLC data unit to a byte aligned buffer and returns
the unit's length.
- rlc_get_data_aligned
is a convenience wrapper around rlc_copy_to_aligned_buffer
that avoids copying if the data unit is already byte aligned.
Sponsored-by: On-Waves ehf
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 42b602c..9f5c61d 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -20,6 +20,8 @@
#include "bts.h"
#include "gprs_debug.h"
+#include <errno.h>
+
extern "C" {
#include <osmocom/core/utils.h>
}