aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2021-07-01WIP: Support ANR procedures on MS with active TBFpespin/anrnextPau Espin Pedrol1-0/+4
TODO: * General clean up * Find out and fix why MS not resetting Neighbour List to BA(GPRS) when empty NC_Frequency_List is sent in Packet Measurement Order. * Fix MS most of the time not sending Neighbour report for cells not present in SI2, probably due to waiting not enough time (increasing NC_REPORTING_PERIOD_T may help, but then problem in previous point above may show up more). Also maybe waiting for several reports before continuing may also help. * Configurable/dynamic chunk list size currently hardcoded to 5. Improvements/optimizations: * Use FREQUENCY_DIFF in Add_Frequency for NC_Frequency_List to make it smaller and hence require less PAcketMeasurementOrder messages. * Support Enchanced Packet Report message (need to signal support for it too). Related: SYS#5303 Change-Id: I051d4fa90fe4ccc44ea691f8a3a487e97868e52c
2021-05-19tbf: Move existing tbf_state implementation to osmo_fsmPau Espin Pedrol1-0/+2
This is only an initial implementation, where all state changes are still done outside the FSM itself. The idea is to do the move in several commits so that they can be digested better in logical steps and avoid major break up. Related: OS#2709 Change-Id: I6bb4baea2dee191ba5bbcbec2ea9dcf681aa1237
2021-03-15Replace PollController with newly added PDCH UL ControllerPau Espin Pedrol1-2/+0
TbfTest is updated to submit empty blocks to have somehow meaningful output (at least as meaningful test results as before, not much). That's because we must update bts->curr_fn to have polls expire. Related: OS#5020 Change-Id: I683ca738ce5a133c49c36a1d94439a942d64a831
2021-03-15Add new PDCH UL Controller, drop SBAllocator classPau Espin Pedrol1-1/+3
Right now we handle different types of UL allocations in different classes like PollAllocator and SBAllocator, and they usually don't take into account the other one in most cases. Furthermore, those objects are usually per-BTS object, instead of per PDCH object. This is a first step towards having a unified per-PDCH controller which takes care of controlling what is scheduled and hence expected on the uplink. Each PDCH has a UL Controller which keeps track of all reserved uplink frame, be it SB, RRBP poll or USF assigned, all under the same API. As a first step, only the SBA part is fully implemented and used (being it the easiest part to replace); TBF poll+usf will come in follow-up patches later on. As a result, the SBAllocator per-BTS class dissappears but some of its code is refactored/reused to provide more features to the gprs_rlcmac_sba object, which is also further integrated into the new UL Controller. Related: OS#5020 Change-Id: I84b24beea4a1aa2c1528f41435f77bd16df2b947
2021-01-29Introduce NACC supportPau Espin Pedrol1-1/+7
A new nacc_fsm is introduced per MS object, with its partner priv structure struct nacc_fsm_ctx, which exists and is available in the MS object only during the duration of the NACC procedure. The NACC context is created on an MS whenever a Pkt Cell Change Notification is received on Uplink RLCMAC, which asks for neighbor information of a given ARFCN+BSIC. First, the target ARFCN+BSIC needs to be translated into a CGI-PS (RAC+CI) address. That's done by asking the BSC through the Neighbour Resolution Service available in osmo-bsc using the CTRL interface. Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO request against the SGSN (which will route the request as needed), and wait for a response containing the SI bits from the target cell. After the SI are received, the scheduler is instructed to eventually poll a TBF for the MS originating the CCN, so that we can send the SI encapsulated into multiple Packet Neighbor Cell Data messages on the downlink. One all the SI bits are sent, the scheduler is instructed to send a Packet Cell Change Continue message. Once the message above has been sent, the FSM autodestroys itself. Caches are also introduced in this patch which allows for re-using recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO respectively. Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-22Initial handling support for RIM messagesPau Espin Pedrol1-0/+2
This code doesn't do anything yet app-related with the received RIM messages, but already provides the initial infrastructure to handle them in the future, and does first checkings. Related: SYS#5103 Change-Id: Ia0ade0e97ea781ec655439c008b6cefaf3e90dec
2021-01-19Convert osmo_bts_sock.cpp to CPau Espin Pedrol1-1/+1
There's no real point in using C++ there, and using C++ makes the compiler fail to use llist_head in multi-bts patches added later due to: """ 'offsetof' within non-standard-layout type is conditionally-supported """ Change-Id: I8965b5cc5a713e64788b5b6aa183d3035341ddbb
2021-01-19Convert gprs_bssgp_pcu.cpp to CPau Espin Pedrol1-1/+1
There's no real use of C++ in that file, and it causes problems when using llist_head entry macros in future patches adding initial support for multiple BTS in PCU object, so let's move it to plain C. Change-Id: Ic771a89fd78b5e66151a5384f0ff6a8895589466
2021-01-19Get rid of unused gsm_timer.{cpp,h}Pau Espin Pedrol1-2/+0
Those files are not really being used other than for calling get_current_fn() which is just a placeholder to call bts_current_frame_number on the global bts object. Change-Id: I6d50a8c15c1de5e2a308a24b313a7776f94ae54f
2021-01-18Split PCU global PCU object from BTS objectPau Espin Pedrol1-0/+2
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold both PCU global fields and BTS specific fields, all mangled together. The BTS is even accessed in lots of places by means of a singleton. This patch introduces a new struct gprs_pcu object aimed at holding all global state, and several fields are already moved from BTS to it. The new object can be accessed as global variable "the_pcu", reusing and including an already exisitng "the_pcu" global variable only used for bssgp related purposes so far. This is only a first step towards having a complete split global pcu and BTS, some fields are still kept in BTS and will be moved over follow-up smaller patches in the future (since this patch is already quite big). So far, the code still only supports one BTS, which can be accessed using the_pcu->bts. In the future that field will be replaced with a list, and the BTS singletons will be removed. The cur_fn output changes in TbfTest are actually a side effect fix, since the singleton main_bts() now points internally to the_pcu->bts, hence the same we allocate and assign in the test. Beforehand, "the_bts" was allocated in the stack while main_bts() still returned an unrelated singleton BTS object instance. Related: OS#4935 Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-05Convert GprsMS and helpers classes to CPau Espin Pedrol1-1/+1
As we integrate osmo-pcu more and more with libosmocore features, it becomes really hard to use them since libosmocore relies heavily on C specific compilation features, which are not available in old C++ compilers (such as designated initializers for complex types in FSMs). GprsMs is right now a quite simple object since initial design of osmo-pcu made it optional and most of the logic was placed and stored duplicated in TBF objects. However, that's changing as we introduce more features, with the GprsMS class getting more weight. Hence, let's move it now to be a C struct in order to be able to easily use libosmocore features there, such as FSMs. Some helper classes which GprsMs uses are also mostly move to C since they are mostly structs with methods, so there's no point in having duplicated APIs for C++ and C for such simple cases. For some more complex classes, like (ul_,dl_)tbf, C API bindings are added where needed so that GprsMs can use functionalitites from that class. Most of those APIs can be kept afterwards and drop the C++ ones since they provide no benefit in general. Change-Id: I0b50e3367aaad9dcada76da97b438e452c8b230c
2020-05-20Get rid of class GprsCodingSchemePau Espin Pedrol1-2/+0
We have same kind of object splitted into two layers, in coding_scheme and gprs_coding_scheme. Let's merge them together and get rid of the class, which is not really useful because it's only a set of functions operating on one enum value. This change also fixes gcc 10.1.0 error about memseting a complex type in rlc.h init(). Change-Id: Ie9ce2144ba9e8dbba9704d4e0000a2929e3e41df
2020-03-30Move gsm_rlcmac.cpp -> .cPau Espin Pedrol1-2/+3
Original file from wireshark.git (packet-gsm_csn1.c) is being built and maintained as a C file. There's no real need for us to maintain it as a C++, and doing so will make both files derive over time (as already happened). Let's keep it as a C compiler (which btw seems to be more strict) to make it easier to port patches back and forth wireshark.git. Take the chance to move some declarations we added to csn1.h to be able to build it out of wireshark. Let's keep those in a separate header file to ease looking for differences. Change-Id: I818a8ae947f002d35142f9f5473454cfd80e1830
2020-02-17csn1: get rid of C++ specific code, compile with GCCVadim Yanitskiy1-1/+1
The implementation of CSN.1 codec was taken from Wireshark, where it's implemented in pure C. For some reason it was mixed with C++ specific features, mostly using references in parameter declaration. Not sure what are the benefits. Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a
2019-09-25Move out tbf subclasses from tbf.h to their own headersPau Espin Pedrol1-0/+2
It's a good start towards clearing current mess between parent and the 2 children classes. Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
2019-09-14Forward ETWS Primary Notification to MSOliver Smith1-1/+2
Receive an Application Information Request from the BTS via PCU interface. Construct a Packet Application Information message from it (3GPP TS 44.060 11.2.47) and send it to all MS with active TBF. The TTCN-3 test infrastructure to test this feature is not quite ready yet, so I've added C unit tests instead. Related: OS#4048 Change-Id: Ie35959f833f46bde5f2126314b6f96763f863b36
2019-03-27Initial commit for OC-2G support.Jean-Francois Dionne1-0/+24
From-Commit: b77fd00608dd From-Remote: https://gitlab.com/nrw_noa/osmo-pcu Change-Id: I7cd89a549c9463e81893ca7dd925299f728e4453
2019-03-19MCS: move HeaderType enum outside of class definitionMax1-0/+1
Move functions which compute number of blocks or bits depending on header type and corresponding enum outside of GprsCodingScheme class. This will allows us to use standard libosmocore value_sting functions in upcoming patches for IA Rest Octet encoding/decoding. Change-Id: Id0873f85e1f16a72e17e7fbc4ad76b194917067f
2019-03-12MCS: move Coding Scheme enum outside of class definitionMax1-0/+1
Move generic MCS enum to C header file to simplify further modifications to GprsCodingScheme class in follow-up patches. This also allows us to use standard libosmocore value_sting functions in upcoming patches for IA Rest Octet encoding/decoding. Related: OS#3014 Change-Id: I993b49d9a82b8c7ad677d52d11003794aeabe117
2019-02-14Don't install pcuif_proto.h headerMax1-3/+0
Both OsmoBTS and OsmoBSC use their own copies of this header nowadays so we can simplify our installation slightly by making it local only. Change-Id: I4a87395d4ab7212fe2fc055dae0a737e10d20c69
2018-02-19Move PDCH-related functions into separate filesMax1-0/+2
The PDCH class and corresponding functions are rather self-contained and independent from BTS implementation. Let's move them into separate file to make bts.cpp more manageable. As additional benefit it allow us to somewhat untangle all the different cross-dependent includes. Change-Id: Ie05e25361e6741a81b024679f9675c98d4923683 Related: OS#1539
2018-01-17Allow specifying sysmocom headers explicitlyMax1-1/+1
The headers for LC1.5 are specified explicitly. Add corresponding option to specify sysmoBTS headers location and use it in jenkins build. While at it, unify header fixup code with the one used in OsmoBTS. Change-Id: I5248e8b389fd240b4d5a0bcf6c954d6115262462
2017-11-21Move multislot table to separate fileMax1-0/+2
To facilitate testing and addition of support for new multislot classes, hide multislot class struct internals: * introduce mslot_class_get_*() functions * use those functions instead of direct access to array of structs * use ms_class as a parameter to find_multi_slot() instead of entire object Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6
2017-06-11lc15: further fixes regarding --with-litecell15Harald Welte1-1/+1
The fix in 0fb294a8dd45a86b8f9eb93211b69b6dbf0a6853 was only partially valid, as it unconditionally used $includedir, without any prefix. This polluted the include path with host include files in cross-compiling builds. Let's take a different approach and simply define LITECELL15_CFLAGS (similar to what pkgconfig does), which makes the "-I" go away if no --with-litecell15 has been specified. Change-Id: I63393decfe42a24dab56c7654f716c1580416ab2
2017-05-15remove pcu own bitvector implementationAlexander Couzens1-2/+0
The osmocore bitvec is exact the same, but use a pointer instead of a reference. Change-Id: Id8f797631d89aa12b6e48efb2dc153a3e2f059f7
2016-11-17Install the pcuif_proto.h header fileHarald Welte1-2/+4
So far, we used to keep a copy of the header file around in both osmo-pcu and osmo-bts projects. Before we start introducing a third copy in openbsc, let's have the osmo-pcu install the header file and make the other programs use that. Change-Id: I60976c9be5488256d1ff55fdc5aa548e3705400d
2016-10-17EGPRS: Add EPDAN CRBB Tree based decodingPravin Kumarvel1-2/+4
Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce
2016-05-20Add support for NuRAN Wireless Litecell 1.5 BTSYves Godin1-0/+24
Layer 1 compatibility with previous generation or NuRan GSM product, therefore the support for the Litecell 1.5 uses its own sources instead of using tons of ifdef/endif. Max's amendments: * make headers path configurable * use configured TRX instead of hardcoded value * split subdir-objects into separate commit * cosmetic changes Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Fixes: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/61 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-17Enable subdir-objects automake optionYves Godin1-0/+1
Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/60 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-05-17Restructure sourcesMax1-20/+29
Move hardware-spicefic files into subdirectory similar to the way it's done in OsmoBTS to make adding new hardware support easier. Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/58 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-04-22Rename define for direct hw accessMax1-1/+1
2015-12-15edge: Add GprsCodingScheme classJacob Erlbeck1-2/+4
Currently the coding scheme is checked and compared at different places which makes in cumbersome to extend it for EGPRS. This class encapsules the coding scheme and provides required meta information like sizes as well as helper methods. Sponsored-by: On-Waves ehf
2015-11-13remove obsolete OpenBTS PCU interface supportHarald Welte1-8/+1
This OpenBTS socket interface was originally added to enable GPRS capabilitie with a forked version of OpenBTS, at a time when the public OpenBTS release didn't yet have any GPRS support. Meanwhile, the later OpenBTS releases included their own version of GPRS, without any external PCU/SGSN/GGSN, so this interface is no longer needed. This also means that the OsmoBTS socket interface is now the default at compilation time. There is no other interface.
2015-11-12rename sysmo_sock.cpp to osmobts_sock.cppHarald Welte1-2/+2
This also renames the --enable-sysmbts option to --enable-osmobts This socket interface was nevery sysmoBTS specific, but it is a generic socket interface to any OsmoBTS supported layer1/hardware. So it was a mis-nomer so far.
2015-07-21llc: Add CoDel AQM implementationJacob Erlbeck1-2/+4
This commit adds an implementation of the CoDel algorithm based on the reference pseudocode presented in http://queue.acm.org/appendices/codel.html. Instead of abstracting the queue itself, the implementation provides a time stamp based automaton which is invoked after a package has been dequeued. Note that the modifications of the algorithm shown in https://tools.ietf.org/html/draft-ietf-aqm-codel-01 are not yet applied. Sponsored-by: On-Waves ehf
2015-06-22build: Add -lrt to AM_LDFLAGSJacob Erlbeck1-0/+1
This is needed to link programs using clock_gettime and related functions when compiling with older glibc versions. This should fix the Jenkins build. Nevertheless fixing this in configure.ac were probably nicer. Sponsored-by: On-Waves ehf
2015-06-08vty: Add a file for C++ functionsJacob Erlbeck1-0/+2
Currently the pcu_vty.c doesn't compile with C++. Thus C++ object cannot be access directly there. This commit adds a helper C++ file that exports all functions with C calling conventions and naming to work around that limitation until the transition of pcu_vty.c is completed. Sponsored-by: On-Waves ehf
2015-05-28tbf: Remove TimingAdvance storageJacob Erlbeck1-2/+0
Currently the TA storage stores up to 30 TLLI->TA mappings, if more entries are created the oldest one is dropped. In theory this can lead to missing TA information if many MS are present. This commit removes the TimingAdvance class completely, since the TA value is now stored in the GprsMs objects. Note that the GprsMs objects are currently not kept after the TBFs have detached from them, so the TA values are now kept for a shorter time than before. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-05-20ms: Add MS storage classJacob Erlbeck1-0/+2
Currently the MS objects are contained in the TBF objects only. To allow for an extended life time after the TBF objects have been freed and to find them based on TLLI, a container for the MS objects is needed. This commit adds the container class and also adds the corresponding m_list member to GprsMs. Further integration into the PCU code is not yet done. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-05-20llist: Add a C++ wrapper for linux_listJacob Erlbeck1-1/+2
This commit adds the LListHead class which is a wrapper around the linuxlist. It adds an additional member to refer to the container, since the container_of macro doesn't work properly with C++ classes. All functions and macros from linuxlist.h are support except for the entry macros (e.g. llist_entry, llist_for_each_entry, ...). To access the container (entry), an entry() method is provided instead: llist_for_each(pos, &elems) { pos->entry()->do_something(); } Sponsored-by: On-Waves ehf
2015-05-20ms: Add GprsMs class to hold per-MS informationJacob Erlbeck1-0/+2
Currently only TBF objects are used to handle the data flow between the MS and the SGSN. MS specific data (e.g. pending LLC frames, TLLI) is copied between successive TBFs. If all TBFs (uplink and downlink) are idle for some time, all information about the MS is discarded in the PCU. This makes the implementation of some features more difficult, e.g. proper TLLI and timing advance handling, connection based CS selection, and proper management of multiple TBF. This commit adds the GprsMs class that is intended to hold information directly related to the MS and to keep references to the active TBFs. The class is not yet integrated with the other PCU code. A GprsMs object container and MS specific fields (TA, CS) will be added in later commits. Note that calling detach_tbf() can possibly delete the MS object depending on the callback implementation. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-03-29pcu: Add pcu_utils.h to Makefile.amJacob Erlbeck1-1/+2
Addresses: src/gprs_rlcmac_sched.cpp:26:23: error: pcu_utils.h: No such file or directory Sponsored-by: On-Waves ehf
2014-08-12tbf: Split out UL/DL TBF methods into separate filesDaniel Willmann1-0/+2
tbf_ul.cpp for UL TBF methods tbf_dl.cpp for DL TBF methods This commit contains no code changes. Ticket: SYS#389 Sponsored by: On-Waves ehf
2013-11-19rlc: Start to move things out of the tbf into the rlcHolger Hans Peter Freyther1-1/+2
Add remarks of possible broken behavior inside the tbf routines. Move the preparation (and init) into the new rlc.cpp file.
2013-11-07llc: Move the llc structure to a new header fileHolger Hans Peter Freyther1-1/+2
2013-11-07llc: Move the llc code out of the tbf.cpp into a new dedicated oneHolger Hans Peter Freyther1-1/+2
2013-10-30tbf: Move gprs_rlcmac_send_data_block_acknowledged into tbfHolger Hans Peter Freyther1-1/+0
We can now remove the gprs_rlcmac_data as the code has been moved into the tbf, pdch and bts.
2013-10-30pdch/tbf: Move gprs_rlcmac_rcv_data_block_acknowledged into the pdchHolger Hans Peter Freyther1-2/+5
Move the method into the PDCH. Extract the finding of TLLI into a new class called Decoding. Move the assemble and forward LLC frames into the TBF as it is poking in the internals of the TBF.
2013-10-30sba: Create a SBAController that will manage the sbas for a BTSHolger Hans Peter Freyther1-1/+2
The PollController is a friend of the SBAController and is allowed to access the internal list. The list is hidden from everyone else. This is done because the calculation of timeout should belong into the PollController and not into the SBAController.
2013-10-30sba: Move the sba code to a dedicated fileHolger Hans Peter Freyther1-1/+2
Move the code around and then turn it into an object...