summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* timer: Add compatibility header with timer helpersSylvain Munaut2011-10-213-0/+82
| | | | | | Some of these are not always present, especially when cross compiling Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core: Fix include path to use top_builddir as well for generated headersSylvain Munaut2011-10-211-1/+1
| | | | | | | With the new generated headers for the CRC code, we need to include the builddir as well in case we're building out of tree. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* timer: Simplify osmo_timers_nearest even moreSylvain Munaut2011-10-181-4/+4
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* timer: Fix implementation of osmo_timers_nearest causing high CPU loadSylvain Munaut2011-10-171-4/+2
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Merge branch 'pablo_timer'Harald Welte2011-10-177-120/+758
|\
| * bump major library version / breaking the ABI with the rb_tree timersHarald Welte2011-10-171-1/+1
| |
| * tests: add new torture test for timer infrastructurePablo Neira Ayuso2011-10-171-33/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new test for the timer infrastructure. It basically consists of adding 2^N timers per step (where N is the number of step) that expire in (random() % 10) + 1 seconds. Moreover, we randomly delete timers that fulfill (random() % 100) < 10 everytime one timer expires. The default number of steps is 16, the test also allows to check for timer imprecisions (currently, defaulting to 10ms as aceptable). The list-based implementation crashes or it seems loop forever with this test (I guess due to some memory corruption). BTW, this patch contains one cosmetic clean up since we go back to 8-chars per indentations, which seems to be the policy in osmocom.
| * timer: add scalable RB-tree based timer infrastructurePablo Neira Ayuso2011-10-172-84/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds RB-tree based timers which scales better than the previous list-based implementation. It does not require any API changes. It breaks ABI because the osmo_timer_list structure has changed though (to avoid this in the future, we can put internal data in some private structure). The following table summarizes the worst-case computational complexity of this new implementation versus the previous one: rb-tree list-based ------- ---------- calculate next timer to expire O(1) O(n) insertion of new timer O(log n) O(n) deletion of timer O(log n) O(1) timer-fired scheduler O(log n) O(3n) The most repeated cases are: * the calculation of the next timer to expire, that happens in every loop of our select function. * the timer-fired scheduler execution. This new implementation only loses in the deletion of timer scenario, this happens because we may need to rebalance the tree after the removal. So I think there is some real gain if we have some situation in which we have to handle lots of timers.
| * add rb-tree implementation to libosmocorePablo Neira Ayuso2011-10-174-2/+551
|/ | | | | | | | | This patch adds red black trees implementation to libosmocore. This data structure is very useful to search for elements in ordered sets in O(log n) instead of O(n) that lists provide. The first client of this code will be one follow up patch that implements rbtree-based timer scheduler.
* build: resolve link failure when --disable-talloc is usedJan Engelhardt2011-10-101-0/+2
|
* add header file containing UMA/GAN protocol definitionsHarald Welte2011-10-102-1/+154
|
* update .gitignore (crc*gen.[ch], some autotools stuff)Harald Welte2011-10-101-0/+5
|
* update LIBVERSION to reflect new API additionsHarald Welte2011-10-102-2/+2
|
* Added defines to use primitive/operation tuples in switch/case statementsAndreas Eversberg2011-10-102-58/+23
|
* LAPD: Moved timer handling into seperate functionsAndreas Eversberg2011-10-101-72/+87
|
* Split of LAPDm into a core part and a GSM specific partroot2011-10-106-1670/+2631
| | | | | | | | | | | | | | Instead of mixing together the GSM layer 1 interface and RSL interface with the implementation of LAPD, the core function of LAPD is now extracted from LAPDm. The core implementation is now in lapd_core.c and lapd_core.h respectively. The lapd_core.c implements exactly one datalink instance for one SAP. The surrounding implementation "lapdm.c" codes/decodes the layer 2 headers and handles multiplexing and datalink instances, as well as translates primitives from/to RSL layer. lapd_core.c can now be used for other LAPD implementations. (ISDN/ABIS)
* Changed logging of LAPD from DLLAPDM to DLLAPDroot2011-10-102-4/+4
|
* gsmtap: Add type/subtypes for GMR-1 protocolSylvain Munaut2011-10-091-0/+23
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* GSMTAP: Add comments to explain how to make GSMTAP changesHarald Welte2011-10-081-0/+24
|
* GSMTAP: Import changes from WiresharkHarald Welte2011-10-081-0/+11
| | | | | | | | There have been some changes in the wireshark source code that have never been submitted to gsmtap.h GSMTAP_CHANNEL_PACCH has been defined in an incompatible way in mainline wirshark :(
* vty: Provide documentation for all logging facilitiesHolger Hans Peter Freyther2011-10-031-1/+10
| | | | Document all facilities in the log syslog command.
* vty: Provide logging set-log-mask, deprecate set log maskHolger Hans Peter Freyther2011-10-031-2/+12
| | | | | | There are no other commands on the set, log and mask level, create a simple set-log-mask command and deprecate the old way.
* core/serial: Fix typoSylvain Munaut2011-09-281-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: support custom baud rates on OS XSylvain Munaut2011-09-281-2/+22
| | | | | | Thanks to Richard James <xyzzy@mm.st> for the patch Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsmtap: Fix doxygen doc for the recent additionsSylvain Munaut2011-09-261-2/+22
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsmtap: Add a _ex version of gsmtap_{makemsg,send} to specify content typeSylvain Munaut2011-09-262-4/+30
| | | | | From: iZsh <izsh@fail0verflow.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* bring gsmtap.h in sync with recent wireshark additionsHarald Welte2011-09-261-0/+4
|
* core: Add generic CRC functions (templates expended to 8 16 32 64 bits)Sylvain Munaut2011-09-165-2/+232
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* update .gitignoreAlexander Huemer2011-09-051-0/+1
|
* correct declaration of osmo_sitype2rslAlexander Huemer2011-09-051-1/+1
|
* add missing declarations of cfg_description_cmd to vty/vty.hHarald Welte2011-09-041-0/+3
|
* LAPDm: Fix encoding of RLL ERROR IEHarald Welte2011-09-031-1/+0
|
* core/serial: Add utilities to deal with serial portsSylvain Munaut2011-09-025-0/+269
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* build/include: Only install headers for enabled optionsSylvain Munaut2011-09-021-1/+9
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* build: Remove docdir, don't comment itSylvain Munaut2011-09-021-1/+0
| | | | | | | The revision control is there to show the history, no point in leaving commented out bits Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/gsm48_ie: Fix other range format decodingAndreas.Eversberg2011-09-021-66/+63
| | | | | | | | As it turns out, the other range were affected too, so Anreas wrote the fix for them as well. Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* RSL: add rsl_ipac_msg_name() for ipa specific RSL extension namesHarald Welte2011-09-022-0/+37
|
* Added autoconf option for utilities and embeddedjob2011-09-022-0/+27
|
* Adapted configure options to autoconf default behaviourjob2011-09-022-15/+15
|
* gsm/gsm48_ie: Fix Range 256 format decodingSylvain Munaut2011-09-011-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the mail: --- appended is another patch for fixing a bug in the calculation of the frequency lists. This time the patch is for the "Range 256 format". The problem is that the operand for the "smod" operation might be negative, in this case the simplified version won't work as expected. In the patch I introduced a separate function for "smod" which takes care of the sign. I have not yet checked if the other formats are also affected, this would be the case if the "smod" operand can be negative. There might be other solutions to fix the problem without the need for a separate function, however I have not thought further about it. A test vector is the following frequency list ("Range 256 format", first byte is the length): 09 8b 1c 83 8c 15 ef 02 2d 30 The correct ARFCNs are 569 571 576 578 586 608 712 715 719 The uncorrected version would instead return: 444 457 460 464 569 576 578 586 608 This means four ARFCNs are wrong which will cause problems if for example the frequency list contains the ARFCNs for hopping. ---- Written-by: Dieter Spaar <spaar@mirider.augusta.de> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* logging: include stdarg.h for va_listChristoph Fritz2011-09-011-0/+1
| | | | | | | | | | fixes tiny compile error: CC socket.lo In file included from socket.c:13: ../include/osmocom/core/logging.h:31: error: expected declaration specifiers or ‘...’ before ‘va_list’ make[3]: *** [socket.lo] Error 1
* add functions for bit-reversalHarald Welte2011-09-016-1/+128
| | | | | Sometimes we need stuff like reversing every bit in each byte (but not the byte-order).
* logging: add osmo_vlogp() as vararg / va_list compatible functionHarald Welte2011-08-312-4/+8
|
* doxygen: Add main page for all three librariesHarald Welte2011-08-303-0/+113
|
* signal: Fix compiler warning about signedness of constantHolger Hans Peter Freyther2011-08-221-2/+2
| | | | | | | Use the u suffix to mark the constant as unsiged integer. This fixes: warning: this decimal constant is unsigned only in ISO C90
* update .gitignore with Doxyfile.coreHarald Welte2011-08-201-1/+1
|
* add script to generate http://www.osmocom.org/doc tree structureHarald Welte2011-08-201-0/+14
|
* Make sure 'make distclean' works for doxygenHarald Welte2011-08-201-0/+3
|
* consistent Doxyfile namingHarald Welte2011-08-203-4/+4
|
* update makefile.am to support out-of-tree buildsHarald Welte2011-08-201-5/+5
| | | | | | Conflicts: Makefile.am