Split csn1.c into common, enc and dec files

The CSN1 encoder/decoder code is already lengthy and complex enough,
there's no need to keep it in the same file, specially because when
debugging, only is interested in one of the 2 functions, and they both
look really similar (long spaghetti switches).

Change-Id: I7d1b1f7e6d7f89b052b3fd73a960419bb2673020
changes/27/25827/3
Pau Espin 1 year ago committed by pespin
parent fef3da24ae
commit c90e6f8de1
  1. 4
      debian/copyright
  2. 2
      src/Makefile.am
  3. 2630
      src/csn1.c
  4. 14
      src/csn1.h
  5. 1390
      src/csn1_dec.c
  6. 1305
      src/csn1_enc.c

4
debian/copyright vendored

@ -81,7 +81,9 @@ Copyright: 2012 Andreas Eversberg <jolly@eversberg.eu>
License: GPL-2.0+
Files: src/csn1.h
src/csn1.cpp
src/csn1.c
src/csn1_dec.c
src/csn1_enc.c
src/gsm_rlcmac.cpp
src/gsm_rlcmac.h
Copyright: 2011 Vincent Helfre

@ -41,6 +41,8 @@ noinst_LTLIBRARIES = libgprs.la
libgprs_la_SOURCES = \
gprs_debug.cpp \
csn1.c \
csn1_dec.c \
csn1_enc.c \
gsm_rlcmac.c \
gprs_bssgp_pcu.c \
gprs_bssgp_rim.c \

File diff suppressed because it is too large Load Diff

@ -592,4 +592,18 @@ typedef gint16 (*CsnCallBackFcn_t)(void* pv ,...);
#define CSNDESCR(_FuncType) CSNDESCR_##_FuncType
#define pvDATA(_pv, _offset) ((void*) ((unsigned char*)_pv + _offset))
#define pui8DATA(_pv, _offset) ((guint8*) pvDATA(_pv, _offset))
#define pui16DATA(_pv, _offset) ((guint16*) pvDATA(_pv, _offset))
#define pui32DATA(_pv, _offset) ((guint32*) pvDATA(_pv, _offset))
#define pui64DATA(_pv, _offset) ((guint64*) pvDATA(_pv, _offset))
/* used to tag existence of next element in variable length lists */
#define STANDARD_TAG 1
#define REVERSED_TAG 0
gint16 ProcessError_impl(const char *file, int line, unsigned *readIndex,
const char* sz, gint16 err, const CSN_DESCR* pDescr);
#define ProcessError(readIndex, sz, err, pDescr) \
ProcessError_impl(__FILE__, __LINE__, readIndex, sz, err, pDescr)
#endif /*_PACKET_CSN1_H_*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save