Commit Graph

3766 Commits

Author SHA1 Message Date
Harald Welte d55cef9b07 osmo-bsc: correctly parse the TMSI in BSSAP paging from MSC
the TMSI is a uint32_t big-endian value and not a gsm 04.08 mobile
identity like the IMSI.
2012-01-20 17:21:36 +01:00
Holger Hans Peter Freyther 7d60bdb2c2 nat: Add VTY command for the TP-DA rewriting. 2012-01-18 20:40:01 +01:00
Holger Hans Peter Freyther 2718845967 nat: Fix the no sms-clear-tp-srr command 2012-01-18 20:34:08 +01:00
Holger Hans Peter Freyther 47b144b002 nat: Internationalize the TP-DA if it starts with a 00
Internationalize the number like we do it for Call Control. Update
the test result to match this new behavior.
2012-01-18 20:15:29 +01:00
Holger Hans Peter Freyther 8e60f629e2 nat: Prepare to rewrite the TP-DA number of a SMS submit.
Introduce number rewriting of SMS-SUBMIT. Introduce a new list,
move code around to help with finding a new number, somehow the
number encoding for TP-DA is borked, 03.40 references 04.11 but
the length appears to be strlen(number) without taken the type
field into account.
2012-01-18 20:14:58 +01:00
Holger Hans Peter Freyther be53012f9c nat: Print the sizes and the offending data in case of a failure 2012-01-18 17:20:23 +01:00
Holger Hans Peter Freyther 0354a80357 rsl: This is provided by libosmo-abis, remove it here 2012-01-17 16:14:23 +01:00
Holger Hans Peter Freyther 445d00543a mgcp: Fix warning about unused variable
mgcp_network.c:335:22: warning: variable ‘cfg’ set but not used [-Wunused-but-set-variable]
2012-01-17 16:00:08 +01:00
Holger Hans Peter Freyther 9592c45e34 mgcp: Provide documentation for the method, check sscanf return 2012-01-17 15:58:48 +01:00
Holger Hans Peter Freyther 523a99d3a6 bts: Convert the rsl_link to be a struct ipabis_link 2012-01-17 15:52:45 +01:00
Holger Hans Peter Freyther f95f2733e6 lchan: Close a possible still open RTP Socket
In case of a reset (loss of the BTS) close down all remaining
RTP Proxy sockets. In case of a lchan_free shout if the rtp
proxy is still open. I would prefer if the proxy code sits inside
the gsm subscriber connection.
2012-01-17 15:30:24 +01:00
Holger Hans Peter Freyther 1d7f7c8ca8 ho: Remove rtp_proxy.h include, no proxy code in here 2012-01-17 15:27:13 +01:00
Holger Hans Peter Freyther aa433d2d84 nat: Add the bsc_data.c file to the EXTRA_DIST 2012-01-15 17:55:50 +01:00
Holger Hans Peter Freyther 794e8f2649 abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflags
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-15 17:52:02 +01:00
Holger Hans Peter Freyther 9e7837a14d mncc: Include size and offsets of struct gsm_mncc in the hello
Increase the version number and send the sizeof of the gsm_mncc
and the gsm_data_frame structure. Include the offsets of some
members as well to maybe identify ABI problems.

The reason we go through this is that we want to benefit from
the native ABI and don't want to force packed structs.
2012-01-15 00:40:42 +01:00
Holger Hans Peter Freyther c0a6674614 channel: Review lchan_free calls and the state the channel is in
In case of a memory allocation failure in rsl_rx_chan_rqd we would
have left the channel in the LCHAN_S_ACT_REQ state. Move the state
change below the allocation.
2012-01-15 00:28:15 +01:00
Holger Hans Peter Freyther dfcfe65f24 lchan: Rename release_reason to release_mode
Use the name of GSM 08.58 for the release mode.
2012-01-15 00:03:19 +01:00
Holger Hans Peter Freyther ded0268a8d channel: Fix a typo in the lchan state documentation 2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther bbf2139fdc channel: The error timer and the lchan_deact_tmr are both running
In case a BTS does not send the RF Channel Release ACK and we are
closing the channel because of an error two timers are running to
set the state back to none.

Make lchan_deact_tmr_cb and rsl_rx_rf_chan_rel_ack behave the same
in regard to changing the state of the lchan. For the other direction
we are save, the error path will set the state to NONE and the timeout
will call lchan_free to set the channel type back to NONE, only then
the lchan may be allocated again.

The channel release procedure requires some more tweaking, some part
was started in the zecke/28c3 branch and needs to be tested/integrated
with the goal of having one common release path.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther c55f0a5415 Revert "libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONE"
In case of a failed channel we still want the channel to not be
re-allocated right away but keep it closed/unused for (T3109 + T311).

rsl_rx_rf_chan_rel_ack has a check to not set the channel to S_NONE in
case the channel is in the error state. Add the camp Harald added a timer
to set the channel back to the none state in case the RF Channel Release
is not acked.

This reverts commit fc462dd59e.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther 7173f63eed bsc: Fix "show lchan" for partially provided information
show lchan should be capable of showing all allocated lchans,
all of a given bts, a given trx, a given ts. This feature was
broken when I added the ability to show a more simple summary.

Restore the initial behavior by splitting out the for loops
for the bts/trx/ts and check if we have parsed all parameters
and then call and return the subroutine.
2012-01-15 00:02:54 +01:00
Holger Hans Peter Freyther 0977e0c4b8 nat: Add the line break after the '. 2012-01-11 11:23:25 +01:00
Holger Hans Peter Freyther 68368dd99a nat: Implement clearing of TP-SRR flags from TPDUs
Match IMSI and destination address against a set of entries, if it
is matching the header will be modified and no sender report will be
requested. Change the test case to request the sender report and then
verify that this bit is reset to 0.
2012-01-10 22:45:24 +01:00
Holger Hans Peter Freyther 50be1a9d7f nat: Reduce copy and paste in the test, create a verify_msg 2012-01-10 22:31:39 +01:00
Holger Hans Peter Freyther 951f34b885 nat: Use the link_id from the original message in the new DTAP message
SMS went from SAPI=3 to SAPI=0 and nobody notices on the NAT->MSC direction.
2012-01-10 22:29:35 +01:00
Holger Hans Peter Freyther c2c0ea700b nat: Compare the DTAP L3 size with the size of the msgb - dtap header 2012-01-10 22:27:43 +01:00
Holger Hans Peter Freyther 8c36fdb1d8 nat: Fix comment and mask for looking at TP-MTI 2012-01-10 14:33:27 +01:00
Holger Hans Peter Freyther 55466197f0 nat: SMS rewrite matching, empty list means match everything 2012-01-10 14:22:55 +01:00
Holger Hans Peter Freyther dec7387a22 nat: SMS comment updates 2012-01-10 14:13:43 +01:00
Holger Hans Peter Freyther 998a98185f nat: Move SMS creation into a new method, no functional change 2012-01-10 13:44:05 +01:00
Holger Hans Peter Freyther 5d2a30a83c nat: Access data_ptr after we have checked the length 2012-01-10 13:04:40 +01:00
Holger Hans Peter Freyther c5df08b388 nat: Move the finding of the number to a new method 2012-01-10 12:05:52 +01:00
Holger Hans Peter Freyther 93ef33edb6 tests: Use atlocal/atlocal.in to enable/disable the NAT test
Kill the hacking, use atlocal to remember if the NAT test should
be enabled and then skip the test (exit with 77).
2012-01-09 22:53:04 +01:00
Holger Hans Peter Freyther 03ff1c8477 Revert "tests: Make the test setup more abusive to fix the build"
This reverts commit 41b42c7229.
2012-01-09 21:49:47 +01:00
Holger Hans Peter Freyther 41b42c7229 tests: Make the test setup more abusive to fix the build
Paolo says I will need to use atconfig/atlocal, need to read up on
it first though.
2012-01-09 21:13:15 +01:00
Holger Hans Peter Freyther faf1f64a2d gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged information
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.
2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther 26d0fe3c89 gprs_sgsn.h: Include timer.h for the timer struct 2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther 6c88217c19 tests: Introduce running tests with GNU autotest in OpenBSC
The quality of the tests is of different value but it is good to
get started and improve from here.
2012-01-06 18:52:05 +01:00
Holger Hans Peter Freyther d5b3ca621b mgcp: Print message when the test is finished 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 300457b7d2 gsm0408: Print message when the test is done 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 45222a79e2 db: Fix the test code
* Initialize logging
* use a dummy net before calling subcr_put as the keep in ram
  option is going to be set.
2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 08e324fda7 channel: Make the test not crash again.
* Initialize logging
* The callback expects NULL or a subscriber connection
2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther f5ede52a22 nat: Log test output stdout using printf in prep for GNU autotest 2012-01-06 17:23:19 +01:00
Holger Hans Peter Freyther 40aac3f7f6 bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API
is doing an assignment underneath which is not handled by the code,
add dumy handlers to not crash, the right thing to do is to change
MNCC to have an assignment that can succeed/fail.

The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should
wait for an ack/nack but right now the call just continues.
2011-12-27 12:55:44 +01:00
Andreas Eversberg 3365cd1cfe RSL: Nokia BTS reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-24 11:49:05 +01:00
Andreas Eversberg 2957de9228 RSL: BS-11 reports TA in quarter-bits, not full bits.
We need to compensate accordingly...
2011-12-16 17:45:37 +01:00
Gus Bourg 1c5dd2c9bb Add NITZ (timezone) support as part of MM INFO
The UTC offset from the operating system will be used by default to
calculate the NITZ in MM INFO.  However,  a "timezone" vty command is
added at the BTS level, allowing BTS-specific overrides, e.g. in case
BTSs are distributed accross multiple timezones.
2011-12-02 10:18:17 +01:00
Alexander Huemer 6b8a56c365 fix two mistakes in AM_LDFLAGS 2011-11-25 09:43:45 +01:00
Harald Welte 511bd8e98c BSSGP: Add functions required for true BSS-side BSSGP implementation
The BSS-side of BSSGP requires quite a number of additional functions
for sending unidirectional messages that a SGSN never sends.

This is a first step into completing the BSSGP implementation and making
it ready to be used from osmo-bts and other BTS-side GPRS
implementations.
2011-11-25 08:58:40 +01:00
Harald Welte b52b4cfc48 BSSGP: add more doxygen comments 2011-11-25 08:15:42 +01:00