aboutsummaryrefslogtreecommitdiffstats
path: root/src/csn1.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-03-16Fix issue in encoding CSN_RECURSIVE_ARRAYSaurabh Sharan1-0/+1
The remaining_bits_len is correctly decremented while encoding CSN_RECURSIVE_ARRAY for fixing the bug. Details of the bug is in https://projects.osmocom.org/issues/1641 During introduction of basic EGPRS feature new hex dump message PUASS, from a different working network log was used in Unit test. It exposed the issue of incorrect handling of recursive array encoding in osmo-pcu. Fixes: OS#1641
2016-03-15Fix encoding of padding bits to start with 0 bitSaurabh Sharan1-1/+6
This patch is for fixing encoding of padding bits according to the 3gpp spec 44.060 section 11, wherein it shall always start with 0 bit followed with spare padding bits. During introduction of basic EGPRS feature new hex dump messages from a different working network log were used in Unit test. These exposed the issue of incorrect handling of padding bits encoding in osmo-pcu. Corrections in the existing test vector of rlcmac is also updated. In testsuite tbf appropriate corrections for the Tbftest.err is also done.
2016-02-08edge: Handle EGPRS PACKET DOWNLINK ACK NACKJacob Erlbeck1-0/+1
Currently this message is ignored. Support decoding and handling of this message. Use a bitvec for the decoder that just represents a BSN sequence without any encoding details (first bit -> first BSN). Return the corresponding BSN range (snsmod(bsn_begin + bits_in_bitvec) = bsn_end), so snsmod(bsn_end-1) is the last BSN if there is at least 1. If bsn_begin == bsn_end, no BSNs has been added. Note that this bitvec is not yet used for RBB handling. It just calls the old rcvd_dl_ack with a faked (all bits are 1) RBB map. Sponsored-by: On-Waves ehf
2014-06-04csn1: Add spaces between string literal and identifierDaniel Willmann1-2/+2
This is required by C++11 csn1.cpp:1147:44: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] LOGPC(DCSN1, LOGL_NOTICE, "%"PRIu64"|", bitvec_read_field(vector, readIndex, bits_to_handle)); Sponsored-by: On-Waves ehf
2014-01-15Set csnStream direction *after* csnStreamInitDaniel Willmann1-1/+1
Fixes a bug introduced in commit 402cdc. That commit sets direction to zero so setting it to 1 should be done after the call to csnStreamInit(). This issue was discovered by the rlcmac test.
2013-12-30Fix warnings in gsm_rlcmac.cppIvan Kluchnikov1-0/+1
1. ar.direction variable was not initialized 2. overrunning array "data->RLC_DATA" of 20 bytes at byte offset 22 using index "i" (which evaluates to 22)
2013-08-02csn1: Fix various printf/format issues pointed out by gccHolger Hans Peter Freyther1-4/+6
This might clash with C++11 and literal values but we will see that once the compilers enable that by default. Fixes: csn1.cpp: In function 'gint16 csnStreamDecoder(csnStream_t*, const CSN_DESCR*, bitvec*, unsigned int&, void*)': csn1.cpp:864:17: warning: format '%d' expects argument of type 'int', but argument 8 has type 'guint64 {aka long unsigned int}' [-Wformat] csn1.cpp:1144:15: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Wformat] csn1.cpp:1150:15: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Wformat] csn1.cpp: In function 'gint16 csnStreamEncoder(csnStream_t*, const CSN_DESCR*, bitvec*, unsigned int&, void*)': csn1.cpp:2119:17: warning: format '%d' expects argument of type 'int', but argument 8 has type 'guint64 {aka long unsigned int}' [-Wformat]
2013-08-02csn1: Remove unused code from the fileHolger Hans Peter Freyther1-38/+0
Fixes: csn1.cpp:124:20: warning: 'CSN_DESCR_type' defined but not used [-Wunused-variable]
2013-03-01Fixed decoding and encoding of CSN_RECURSIVE_TARRAY, CSN_RECURSIVE_TARRAY_1, ↵Ivan Kluchnikov1-4/+4
CSN_RECURSIVE_TARRAY_2. We should offset pointer to data after each iteration.
2012-10-10Ported fixes and improvements from Wireshark for RLC/MAC control block ↵Ivan Kluchnikov1-30/+125
decoding. Part 1. Generic improvements to the csn.1 dissector include: • Added a flag to the type descriptor structure so that any type can (potentially) flagged as xxx_OR_NULL. This was specifically needed for UINT_OR_NULL for the ms capabilities struct. • Changed the CSN_SERIALIZE so that the length of the length field can be specified. • For CSN_NEXT_EXIST removed the requirement that the next type be CSN_END, to allow truncation of multiple IEs. • For CSN_LEFT_ALIGNED_VAR_BITMAP corrected the handling of bit_offset. • Added a new type CSN_PADDING_BITS to make inspection of padding bits more convenient. • Improved the CSN_RECURSIVE_TARRAY_1 to show the array index. Improvements to the gsm_rlcmac dissector include: • Rework the definition of EGPRS Ack/Nack Description so that the length IE (and absence thereof) is handled correctly. • Added Padding Bits definitions to all PDUs • Change the Multislot_capability_t and Content_t definitions to allow truncation at any IE
2012-06-15Removed all size_t variables. Fixed type of readIndex and writeIndex variables.Ivan Kluchnikov1-6/+6
We use unsigned int type for readIndex and writeIndex parameters in bitvec_read_field() and bitvec_write_field() functions.
2012-06-14move everything to src/ subdirectoryHarald Welte1-0/+2603
The code corresponds to commit a9aa4777cc1144897a77dfb6c5c3d7325705251e in openbts-p2.8.git (Tue Jun 12 18:14:49 2012 +0400)