summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* cygwin: Link many libraries with -no-undefined to create a dllHolger Hans Peter Freyther2013-03-034-5/+5
| | | | | | Only the Gb library relies on having undefined references to a symbol that needs to be provided by the host application. For all other libraries we can link with -no-undefined.
* codec: Fix the GSM 06.20 ordering tablesSylvain Munaut2013-03-011-41/+41
| | | | | | | | | | Seems the script I used to parse those had a bug where range of bits in the 'decreasing' direction ( like 6..0 ) were not processed properly. Thanks to Andreas for noticing this ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Follow up fix for the log level "everything"Holger Hans Peter Freyther2013-02-271-0/+3
| | | | | | | | | | | | Commit cd6ed82d1ff48f47ad9e33e6322df62896a76ed5 made "EVERYTHING" map to LOGL_DEBUG but when writing out the configuration the following would be written: logging level all unknown 0x0 This happend because no string was found for the value 0. Address it by adding a legacy check for 0 and write out the str from the index 0. Currently this is "EVERYTHING".
* Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi2013-02-274-6/+352
| | | | | | | The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
* Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther2013-02-274-351/+6
| | | | | | | I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
* Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi2013-02-274-6/+351
| | | | | | | The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
* Fix log level "everything" and make it equal to "debug"Harald Welte2013-02-191-1/+1
| | | | | | As Holger points out "logging level XXX everything" wasn't working, as it sets category->loglevel to 0, which is checked in osmo_vlogp() and will never get logged.
* misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi2013-02-1512-18/+19
| | | | | Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
* VTY: don't show HIDDEN or DEPRECATED vty commands in ? completionHarald Welte2013-02-121-0/+3
| | | | | | | This hides HIDDEN or DEPRECATED commands from showing up when the full list of commands is inquired with '?' at any given point in the command tree. Only if the hidden/deprecated command is already typed in partially, then it will still tab-complete.
* vty/command.c: Cosmetic cleanupHarald Welte2013-02-121-82/+81
| | | | | this is just changing some of the code to reduce the way too high level of indentation and thus improve readability.
* turn abis_nm_debugp_foh() into a macroHarald Welte2013-02-101-12/+10
| | | | | | this will avoid printing 'abis_nm.c' as the filename in the log, which is pretty useless during debugging. We want to know where abis_nm_debugp_foh() is being used from, not where it is implemented.
* core/crc: Fix the 64 bits implementationSylvain Munaut2013-02-011-2/+2
| | | | | | | We used 1ULL at one place and not the other ... at the same time, we now use (uintXX_t) so that the proper type is used each time. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* socket: fix osmo_sock_init with SOCK_RAW and IPPROTO_RAWPablo Neira Ayuso2013-01-151-3/+16
| | | | | | | | | | | | | getaddrinfo returns EAI_SERVICE (-8) if that combination is used. More information available in here: http://sourceware.org/bugzilla/show_bug.cgi?id=15015 Reported by Holger Hans Peter Freyther. While at it, this patch also removes hints.ai_flags = 0 as memset to zero already happened just a bit before that.
* Fix build on CygwinEvgeny Zverev2013-01-121-1/+5
|
* add some missing doxygen annotation for libosmocore functionsHarald Welte2013-01-117-11/+75
|
* vty: Do better filtering of arguments, optional args particularlySylvain Munaut2013-01-031-208/+143
| | | | | | | | This is essentially http://patchwork.diac24.net/patch/271/ forward ported to libosmovty Original-by: Paul Jakma <paul@quagga.net> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/bits: Prevent osmo_revbytebits_buf stack trashingSylvain Munaut2013-01-031-1/+1
| | | | | | | | | | | | The second loop in osmo_revbytebits_buf() in src/bits.c grabs 4 bytes each iteration, which can easily go past the supplied input in some cases. Compiled with -fstack-protector , I get a "stack smashing detected" in the bits test. From: Nils O. Selåsdal <noselasd@fiane.dyndns.org> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann2012-12-261-2/+18
| | | | | | | | | | | | | | | | | | This was found while implementing handover on a sysmobts. When we receive a channel release request for a channel that was never really activated (set_lapdm_context() was not called) we segfault in lapd_recv_dlsap(). We now return early with -EINVAL in rslms_rx_rll() if we receive a message that assumes set_lapdm_context() was already called. These are: * RSL_MT_UNIT_DATA_REQ * RSL_MT_DATA_REQ * RSL_MT_SUSP_REQ * RSL_MT_REL_REQ A test case was added to trigger the issue.
* core: Fix missing include in msgfile.c for getlineSylvain Munaut2012-12-121-0/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut2012-12-115-10/+5
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm: Add method to find ARFCN based on frequencySylvain Munaut2012-12-112-45/+66
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* sms: Print 'network' or 'mobile' when creating the SMC/SMRHolger Hans Peter Freyther2012-12-062-3/+4
|
* gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut2012-12-061-2/+6
| | | | | | Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* lapd: Use LOGL_ERROR for messgaes that are wrong in the given contextHolger Hans Peter Freyther2012-11-261-14/+14
| | | | Log message that are either too big or have the C/R bit set as error.
* misc: Use static const struct for LAPD and AbisHolger Hans Peter Freyther2012-11-222-2/+2
|
* sms: Mark the state dispatch table as static constHolger Hans Peter Freyther2012-11-222-4/+4
| | | | | | GCC 4.7.2 was already smart enough to see that the table is const so there is no change in the generated assembly code. For some reason the dispatch is still going through one relocation.
* sms: Fix typos in the comments and log messages.Holger Hans Peter Freyther2012-11-222-5/+5
|
* smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther2012-11-221-31/+68
| | | | | | | | | | When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMR instance. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMR(ID). This change is ABI and API incompatible with previous versions of libosmogsm.
* smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther2012-11-221-30/+60
| | | | | | | | | | | | | | When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMC. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMC(ID). This change is ABI and API incompatible with previous versions of libosmogsm. Example: SMC(100) instance created SMC(100) message MNSMS-EST-REQ received in state IDLE
* smc: Fix a typo in the smc codeHolger Hans Peter Freyther2012-11-141-1/+1
|
* smc: Print the current state of the SMSHolger Hans Peter Freyther2012-11-111-1/+3
| | | | | | When the connection may not released print the name of the current state to ease with debugging and verification that this is not a valid state transition.
* sms: Remove the commented out code that was the default in OpenBSCHolger Hans Peter Freyther2012-11-111-1/+0
| | | | | This code got copied from OpenBSC and we used the network specific and private numbering plan. Remove it as it can be easily set.
* sms: Reduce the logging level to debugHolger Hans Peter Freyther2012-11-111-3/+3
| | | | | <001c> gsm0411_smr.c:175 TX: MNSMS-REL-REQ adds little value so I am reducing it to a debug statement.
* GSM48: Avoid unaligned access in gsm48_construct_raAndreas Eversberg2012-11-051-1/+3
| | | | | This avoids an unaligned access on platforms that don't support them, such as ARMv4/ARMv5.
* Do not use --version-script linker flag on OSXTobias Engel2012-10-272-2/+2
| | | | | Add a check to not use --version-script linker flag if compiled on OSX since it doesn't exist there
* Define struct iphdr for OSXTobias Engel2012-10-271-1/+1
| | | | | | | | | | Use FreeBSD struct iphdr definition for OSX also. From the commentary in the source file: On BSD the IPv4 struct is called struct ip and instead of iXX the members are called ip_XX. One could change this code to use struct ip but that would require to define _BSD_SOURCE and that might have other complications. Instead make sure struct iphdr is present on FreeBSD.
* logging: Make sure to install standard "end" command in VTY nodeHarald Welte2012-10-221-0/+2
| | | | | When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.
* logging: Don't forget to save "logging filter all 1"Harald Welte2012-10-221-0/+4
| | | | | | | Prior to this fix, a persistent file or syslog log configuration didn't work across an application re-start, as the "logging filter all 1" was never saved and thus no messages were logged.
* Doc: Adding new parameter descriptions in gprs_bssgp_bss.cAndreas Eversberg2012-09-301-1/+9
|
* Fix: Correcting bssgp_tx_fc_bvc, bssgp_tx_fc_ms, bssgp_tx_ul_udAndreas Eversberg2012-09-302-9/+28
|
* Fix: gprs_ns_destroy() now frees all NSVCs and its timersAndreas Eversberg2012-09-291-4/+14
| | | | | Freeing memory of registered timers and file descriptors cause corrupt lists.
* logging.c: Do not crash on empty category nameNico Golde2012-09-271-5/+7
| | | | | log_parse_category_mask(), skip log category name right away if name is NULL to prevent passing a NULL ptr to strlen.
* gsm_utils.c: in 7bit decoding, first check if the last character was an ↵Nico Golde2012-09-211-5/+5
| | | | extension character before doing anything else
* gsm_utils: Fix up coding style in previous patchHarald Welte2012-09-201-2/+2
| | | | 'if' is not a function, so we have space before parenthesis.
* gsm_utils.c: cleanup + do not use dynamic memory when decoding 7bit messagesNico Golde2012-09-201-14/+13
|
* logging: Introduce a print_filename flag for the logtargetHolger Hans Peter Freyther2012-09-111-5/+17
| | | | | | Introduce a print_filename attribute for each logtarget. Initialize it with 1 to be backward compatible with earlier versions. The bit is taken from an existint bitfield. There were at least six bits left of the byte.
* vty: Address compiler warning about the const qualifierHolger Hans Peter Freyther2012-09-111-1/+1
| | | | | vty.c: In function 'vty_out_newline': vty.c:294:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
* vty: Address compiler warning about tolowerHolger Hans Peter Freyther2012-09-111-0/+1
| | | | | | | Include ctype.h to have a declaration of tolower. utils.c: In function 'vty_cmd_string_from_valstr': utils.c:95:6: warning: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
* gsm: Address compiler warning about unused variable 'z'Holger Hans Peter Freyther2012-09-111-3/+4
| | | | | | | | The comment explains why we don't care about the content of z, stop storing it. gsm_utils.c: In function 'gsm_7bit_encode': gsm_utils.c:253:13: warning: variable 'z' set but not used [-Wunused-but-set-variable]
* logging: Mark the log_info_cat pointer as constsHolger Hans Peter Freyther2012-09-111-2/+3
| | | | | | Applications should keep the log area in a static const area. Mark the pointer as const to address compiler warnings in OpenBSC, cast the const away for the osmo_log_info as it is not declared as const.