aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-02-12VTY: don't show HIDDEN or DEPRECATED vty commands in ? completionHarald Welte1-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.
2013-02-12vty/command.c: Cosmetic cleanupHarald Welte1-82/+81
this is just changing some of the code to reduce the way too high level of indentation and thus improve readability.
2013-02-10turn abis_nm_debugp_foh() into a macroHarald Welte1-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.
2013-02-01core/crc: Fix the 64 bits implementationSylvain Munaut1-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>
2013-01-15socket: fix osmo_sock_init with SOCK_RAW and IPPROTO_RAWPablo Neira Ayuso1-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.
2013-01-12Fix build on CygwinEvgeny Zverev1-1/+5
2013-01-11add some missing doxygen annotation for libosmocore functionsHarald Welte7-11/+75
2013-01-03vty: Do better filtering of arguments, optional args particularlySylvain Munaut1-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>
2013-01-03core/bits: Prevent osmo_revbytebits_buf stack trashingSylvain Munaut1-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>
2012-12-26lapd: Check in rslms_rx_rll() if lapdm context was initialized earlierDaniel Willmann1-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.
2012-12-12core: Fix missing include in msgfile.c for getlineSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut5-10/+5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-11gsm: Add method to find ARFCN based on frequencySylvain Munaut2-45/+66
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-06sms: Print 'network' or 'mobile' when creating the SMC/SMRHolger Hans Peter Freyther2-3/+4
2012-12-06gsm/a5: Return -ENOTSUP if the selected cipher is not supportedSylvain Munaut1-2/+6
Extracted from a patch by Max Suraev Max.Suraev@fairwaves.ru> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-11-26lapd: Use LOGL_ERROR for messgaes that are wrong in the given contextHolger Hans Peter Freyther1-14/+14
Log message that are either too big or have the C/R bit set as error.
2012-11-22misc: Use static const struct for LAPD and AbisHolger Hans Peter Freyther2-2/+2
2012-11-22sms: Mark the state dispatch table as static constHolger Hans Peter Freyther2-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.
2012-11-22sms: Fix typos in the comments and log messages.Holger Hans Peter Freyther2-5/+5
2012-11-22smr: Introduce an id and prefix all log messages with SMR(ID)Holger Hans Peter Freyther1-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.
2012-11-22smc: Introduce an id and prefix all log messages with SMC(ID)Holger Hans Peter Freyther1-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
2012-11-14smc: Fix a typo in the smc codeHolger Hans Peter Freyther1-1/+1
2012-11-11smc: Print the current state of the SMSHolger Hans Peter Freyther1-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.
2012-11-11sms: Remove the commented out code that was the default in OpenBSCHolger Hans Peter Freyther1-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.
2012-11-11sms: Reduce the logging level to debugHolger Hans Peter Freyther1-3/+3
<001c> gsm0411_smr.c:175 TX: MNSMS-REL-REQ adds little value so I am reducing it to a debug statement.
2012-11-05GSM48: Avoid unaligned access in gsm48_construct_raAndreas Eversberg1-1/+3
This avoids an unaligned access on platforms that don't support them, such as ARMv4/ARMv5.
2012-10-27Do not use --version-script linker flag on OSXTobias Engel2-2/+2
Add a check to not use --version-script linker flag if compiled on OSX since it doesn't exist there
2012-10-27Define struct iphdr for OSXTobias Engel1-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.
2012-10-22logging: Make sure to install standard "end" command in VTY nodeHarald Welte1-0/+2
When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.
2012-10-22logging: Don't forget to save "logging filter all 1"Harald Welte1-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.
2012-09-30Doc: Adding new parameter descriptions in gprs_bssgp_bss.cAndreas Eversberg1-1/+9
2012-09-30Fix: Correcting bssgp_tx_fc_bvc, bssgp_tx_fc_ms, bssgp_tx_ul_udAndreas Eversberg2-9/+28
2012-09-29Fix: gprs_ns_destroy() now frees all NSVCs and its timersAndreas Eversberg1-4/+14
Freeing memory of registered timers and file descriptors cause corrupt lists.
2012-09-27logging.c: Do not crash on empty category nameNico Golde1-5/+7
log_parse_category_mask(), skip log category name right away if name is NULL to prevent passing a NULL ptr to strlen.
2012-09-21gsm_utils.c: in 7bit decoding, first check if the last character was an ↵Nico Golde1-5/+5
extension character before doing anything else
2012-09-20gsm_utils: Fix up coding style in previous patchHarald Welte1-2/+2
'if' is not a function, so we have space before parenthesis.
2012-09-20gsm_utils.c: cleanup + do not use dynamic memory when decoding 7bit messagesNico Golde1-14/+13
2012-09-11logging: Introduce a print_filename flag for the logtargetHolger Hans Peter Freyther1-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.
2012-09-11vty: Address compiler warning about the const qualifierHolger Hans Peter Freyther1-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]
2012-09-11vty: Address compiler warning about tolowerHolger Hans Peter Freyther1-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]
2012-09-11gsm: Address compiler warning about unused variable 'z'Holger Hans Peter Freyther1-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]
2012-09-11logging: Mark the log_info_cat pointer as constsHolger Hans Peter Freyther1-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.
2012-09-10Gb: Add functions for sending flow control messages from BSS sideHarald Welte1-0/+105
2012-09-10Gb: Add header file for BSS-side BSSGP functionsHarald Welte1-0/+1
.. not sure how we could have missed that so far.
2012-09-08libosmogb: make build conditional, disable in embedded buildHarald Welte1-0/+2
when we build for osmocom-bb cross-compilation, we don't have sockets nor netinet/in.h and thus NS/BSSGP make no sense...
2012-09-08backtrace: don't use fprintf, but printf (for osmocom-bb)Harald Welte1-1/+1
2012-09-07BSSGP: print per-bvc flow control parameters on vtyHarald Welte1-1/+12
2012-09-07BSSGP: make bvc_ctx->fc a dynamic talloc allocationHarald Welte1-5/+7
this ensures that we can talloc the flow-control queue entries as siblings off the bvc_ctx.
2012-09-07BSSGP flow-control: various fixesHarald Welte2-10/+36
* add more comments on units of struct members * make sure to parsre FC-BVC message correctly * add error message in case user passes PDU larger than bucket size * add new function to initialize flow control struct
2012-09-07libosmogb: Port BSSGP flow control from openbsc/laforge/bssgp_fc branchHarald Welte2-4/+225
This code is supposed to implement the BSSGP flow control algorithm, both for the per-BSS and for the per-MS flow control. The code currently has no test cases, they will come in a separate commit.