aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
AgeCommit message (Collapse)AuthorFilesLines
2012-06-17libgb: make sure all BSSGP functions have bssgp_ prefixHarald Welte4-6/+6
We change the minority of functions employing the gprs_bssgp_ prefix to match with the majority without gprs_ in front.
2012-06-17libgb/gprs: don't use log_info from libcommon anymoreHarald Welte2-4/+93
2012-06-17libgb: prefix all NS related functions with gprs_Harald Welte2-3/+3
2012-06-17libgb: don't call directly into GMM / LLC layerHarald Welte3-2/+35
Instead of direct function calls to individual functions, we now generate primitives (osmo_prim) and send them to one application-provided function "bssgp_prim_cb()"
2012-06-17libgb: remove dependency of BSSGP to include sgsn/gmm internal structsHarald Welte1-2/+22
2012-06-16libgb: Remove dependency to openbsc/debug.hHarald Welte2-0/+5
2012-06-16libgb: remove dependencies to openbsc/vty.h and openbsc/gsm_data.hHarald Welte2-2/+2
Rather than using openbsc internal data/functions, we now use only internal and libosmocore-provided ones.
2012-06-16libgb: Use library SS_L_NS instead lf local SS_NSHarald Welte3-3/+3
which removes some further dependencies of libgb to openbsc internal code and data.
2012-06-16libgb: move GPRS specific msgb CB definitions to separate headerHarald Welte1-3/+3
2012-06-16split libgb into a separate library for outside useHarald Welte10-15/+21
This also removes the dependency to osmo_sock() inside libcommon and replaces it with osmo_sock_* from libosmocore
2012-03-01misc: Use msgb_free for freeing the messagesHolger Hans Peter Freyther3-3/+3
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-2/+3
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther1-2/+3
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known, or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have V(UR) == 511 and this frame is dropped, we would ignore N(U)'s 0 to 510. Calculate the delta. The code is based on Jonathan Santos's "LLC UI window" fix but the issue was discovered independly.
2011-11-06sgsn: Make sure each parameter has some sort of documentationHolger Hans Peter Freyther1-5/+8
2011-11-06gb_proxy: Make sure each parameter has some sort of documentationHolger Hans Peter Freyther1-1/+3
2011-10-16GPRS GMM: When we receive a RA UPD REQ, we are NORMAL even after SUSPENDHarald Welte1-0/+3
There is no explicit BSSGP RESUME in case the MS sends a RA UPD REQ after being in SUSPEND previously.
2011-10-16GPRS LLC: fix compiler warningHarald Welte1-1/+1
2011-10-16GPRS GMM: Send LLGMM-RESET.req when talking to unknown MSHarald Welte1-0/+5
In case a MS (of which we have no MM context) sends us anything but a GMM ATTACH REQUEST, we need to send it a LLC XID RESET (by means of issuing LLGMM-RESET.req). Otherwise the phone will expect us to send a specific unacknowledged sequence number that we don't know. Thanks to Holger for pointing this bug out to me. It seems to commonly occur when a MS is doing network re-selection and (erroneously) sends a RA UPD REQ instead of an ATTACH REQ. The RA UPD REJ that we sent was never seen by the GMM entity in the MS, as the LLC entity discarded it due to sequence number mis-match.
2011-10-16LLC: Add minimal LLGMM-RESET.req implementationHarald Welte1-11/+67
Using LLGMM-RESET.req, the GMM can request the LLC of the MS to reset all its parameters, particularly the sequence numbers. We don't yet do XID RESET retransmissions, and we don't yet generate a LLGMM-RESET.conf primitive back to GMM.
2011-10-16misc: Linking fixes for Ubuntu 11.10 CompilerHolger Hans Peter Freyther1-3/+5
Ubuntu 11.10 has changed some linker/compiler flags. Some fixes for this can be seen here[1]. In general the to be linked libs need to be moved into the LDADD section of parameters. This is with the old BFD linker (not gold). This is likely to end in some ping-pong with other versions of the linker. [1] https://bugs.launchpad.net/ubuntu/+source/nis/+bug/771034 Errors: /usr/bin/ld.bfd.real: bsc_hack.o: undefined reference to symbol 'osmo_init_ignore_signals' /usr/bin/ld.bfd.real: note: 'osmo_init_ignore_signals' is defined in DSO /home/ich/install/openbsc/lib/libosmocore.so so try adding it to the linker command line /home/ich/install/openbsc/lib/libosmocore.so: could not read symbols: Invalid operation ... ../../src/libbsc/libbsc.a(rest_octets.o):/home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:381: more undefined references to `bitvec_set_bit' follow ../../src/libbsc/libbsc.a(rest_octets.o): In function `rest_octets_si13': /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:382: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:383: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:385: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:402: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:403: undefined reference to `bitvec_set_uint'
2011-10-14gprs: Fix various compiler warningsHolger Hans Peter Freyther1-2/+2
2011-10-14gprs: Fix compiler warnings in the codeHolger Hans Peter Freyther2-2/+4
2011-10-14gprs_gmm: Fix various compiler warningsHolger Hans Peter Freyther1-4/+7
gprs_gmm.c:240:2: warning: passing argument 4 of ‘gprs_llc_tx_ui’ discards qualifiers from pointer target type ../../include/openbsc/gprs_llc.h:151:5: note: expected ‘void *’ but argument is of type ‘const struct sgsn_mm_ctx *’ gprs_gmm.c:349:11: warning: unused variable ‘ptsig’ gprs_gmm.c:601:5: warning: too many arguments for format gprs_gmm.c:987:25: warning: initialization discards qualifiers from pointer target type gprs_gmm.c:1010:6: warning: ‘rc’ may be used uninitialized in this function
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso2-2/+2
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-08-05GPRS: Fix the parsing/interpretation of the PDP CTX status IEHarald Welte1-8/+16
The byte ordering is a bit odd: The least significant byte is ahead of the most significant byte, different from everything else in GSM that seems to be big-endian. Thanks to Seungju Kim <admin@manateeshome.com> for repoerting the bug.
2011-07-27LLC: Fix format stringDieter Spaar1-1/+1
2011-07-27GPRS: Fix buffer overflow in case of very long MS RA CAP IEHarald Welte1-3/+9
The MS Radio Access Capability IE can be _very_ long in some recent high-end mobile phones, way beyond the old 14-byte limit. We increase our array to 52 bytes, and make sure not to overflow that buffer.
2011-07-18misc: Remove the osmocom/core/process.h includeHolger Hans Peter Freyther1-1/+0
The osmo_daemonize moved from process.h to application.h (that is already included), remove the process.h include.
2011-07-16sgsn_libgtp: remove bogus unreached second return statementHarald Welte1-2/+0
found by Smatch
2011-07-16sgsn_main: add comment about exit statement never reachedHarald Welte1-0/+1
2011-07-16gprs_gmm: ctx cannot be null, so remove checkHarald Welte1-1/+1
Detected by Smatch: /home/laforge/projects/git/openbsc/openbsc/src/gprs/gprs_gmm.c +757 gsm48_rx_gmm_att_req(133) warn: variable dereferenced before check 'ctx'
2011-05-12misc: Use the osmo_init code for signals and loggingHolger Hans Peter Freyther2-20/+14
Use the libosmocore code to ignore certain signals by default (e.g. SIGHUP, SIGPIPE) and use the new code to create a default stderr logging target and initialize it properly.
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso1-1/+1
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso2-3/+3
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso3-6/+6
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso3-11/+11
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther7-7/+0
These are not needed any more. We used them for u_int types but we now use uint which comes from stdint.h
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther3-4/+4
This was done with sed on the files.
2011-03-28src: include new file osmocom/vty/misc.h for vty_out_rate_ctr_group()Pablo Neira Ayuso1-0/+1
This uses the new include file for vty_out_rate_ctr_group() which available in libosmocore.
2011-03-23Fix build of bsc-nat and GPRS code after include path changeHarald Welte4-5/+5
The last patch changed the osmocore include paths, this fixes some build problems caused by it
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso13-48/+48
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23src: fix use of logging_vty_add_cmds() without log_info parameterPablo Neira Ayuso2-2/+4
This patch fixes: CC gb_proxy_main.o gb_proxy_main.c: In function ‘main’: gb_proxy_main.c:224: warning: implicit declaration of function ‘logging_vty_add_cmds’ And a similar problem in osmo-bsc_nat. This was introduced in by myself in patch: "bsc: change bsc_vty_init to take logging categories as parameter" Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-2/+5
... and make sure tests work again after restructuring
2011-03-03Move 'Gb' protocol stack into its own src/gb subdirectoryHarald Welte7-3025/+4
2011-03-03re-structure the OpenBSC directory layoutHarald Welte1-6/+4
The new structure divides the code into a number of libraries for the BSC core functionality, MSC core functionality, Abis transport, TRAU and other bits. This doesn't introduce any functional code change but simply moves around files and alters Makefile.am accordingly. Next step would be to disentangle a lot of the inter-library dependencies and make the individual bits of code more independent.
2011-02-24Use shorter vty_app_info->name for all appsHarald Welte2-2/+2
... as this is now used as SYSLOG ident
2011-02-19Install programs into $(prefix)/bin, not /sbinHarald Welte1-2/+2
At least in many configurations, there is no need to run any of our programs as root. Thus, we shouldn't install them in sbin.
2011-02-18LOGGING: make sure to make the 'logging filter' compatible with vty log cfgHarald Welte2-12/+10
Recent libosmocore introdues a way how log targets can be configured from the VTY. This commit makes the 'log filter (imsi|nsvc|bvc)' compatible with it.
2011-02-06[gb_proxy] vty: display the BVC BLOCKED status in 'show gbproxy'Harald Welte1-4/+6
2011-02-06[gb_proxy] make sure bssgp cell id is copied correctlyHarald Welte1-1/+3
When we copy a msgb, we need to make sure the msgb_cb->bssgp_cell_id pointer points to data in the new message, not in the old message. Thanks to Dieter Spaar for spotting this.