| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
For MI encoding, see 3GPP TS 24.008, 10.5.1.4 Mobile Identity. The 'odd' flag
indicates whether the last BCD nibble is used. Of course that flag should be
made sure to reflect the actual length.
Change-Id: Id6e695ebf9f86b295eaa7e2c6228989256f37e68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By using osmo_bcd2str(), ensure that the resulting string is always nul
terminated, and always return strlen()+1 whether truncated or not.
Still keep up the previous return value style, even if that isn't consistent at
all.
The difference between IMSI/IMEI and TMSI return values remains and is not part
of this patch.
Change-Id: I1b51b72a721e1cc9d69796b804ebda741ff0f36b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a standalone bcd-to-string conversion function with generic parameters.
Add a regression test in utils_test.c.
So far there is no single universal implementation that converts a BCD to a
string. I could only find gsm48_mi_to_string(), which also interprets
surrounding bytes, MI type and TMSI as non-BCD value.
The idea is to use this function from gsm48_mi_to_string() and similar
implementations in subsequent commits.
Root cause: in osmo-msc, I want to have an alternative MI-to-string function
for composing an FSM name, which needs the BCD part of gsm48_mi_to_string() but
not the TMSI part.
Change-Id: I86b09d37ceef33331c1a56046a5443127d6c6be0
|
|
|
|
| |
Change-Id: If5e7abd15dddf39cdfad8071f4cd5ca8244eabe0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment the all gsm0808 cause codes are encoded directly using the
tlv API directly to put a one byte TLV field. This works ok for most
situations where the cause code consists of a single byte. However,
gsm0808 specifies a two byte cause code model where cause codes may be
extended up to two bytes. Instead of implementing the encoding over and
over and again, let's rather have an encoder function we can call.
- Add an encoder function that can generate single byte and extended
cause codeds and makes the length decision automatically.
- Use only this function to append cause codes
Change-Id: I71d58fad89502a43532f60717ca022c15c73f8bb
|
|
|
|
|
|
|
|
|
| |
We already have some GSM29118 related definitions and functions in
libosmocore. Lets also add some functions to generate GSM29118 messages
(similar to those we have for GSM0808).
Change-Id: Ic87f8a771b87b52215d0a7451b67794557b80b8a
Related: OS#3615
|
|
|
|
|
|
|
| |
there is a whitespace between the * and osmo_apn_to_str(). Lets
remove this.
Change-Id: I094e6eb08eacf2d6459c47a7370837601aa92925
|
|
|
|
|
|
|
|
|
| |
It's similar to osmo_sockaddr_to_str_and_uint() but does not require odd
typecasting for AF_INET case. Make osmo_sockaddr_to_str_and_uint() into
wrapper around new function and make sure to check for address family
before typecasting. Also use proper return type.
Change-Id: Ie384483124d407a960ab6732e6a7fd90554389d2
|
|
|
|
|
|
|
|
|
| |
Since we have library-internal categories we don't have to force
application to supply its own categories. This is especially useful for
testing code inside libosmocore which only use internal categories
anyway.
Change-Id: I42159780b57684bff225789f036f28a4b25fc7b8
|
|
|
|
|
|
|
| |
We always use id = 0 when sending TRAP messages. Let's make this more
obvious by introducing appropriate define.
Change-Id: I33d7d4c6a1885a75a85d6f2f017430e0860b4126
|
|
|
|
|
|
|
|
| |
We currently have no generator function that can generate BSSMAP
HANDOVER PERFORMED messages. Lets add function for this.
Change-Id: I825106858bd89afc9837811b8fed2e8accc82441
Related: OS#3645
|
|
|
|
|
|
|
| |
glib < 2.17 doesn't support clock_gettime directly, it is available
via librt.
Change-Id: Ice853d85ffe859b1d4df48b91b050c24d85c861b
|
|
|
|
|
|
|
| |
This will be reused be several tests related to TS 48.008 and TS 29.205
in follow-up commits.
Change-Id: I4d8cc05b8df8e70c1f6257e53ae3acec7901681f
|
|
|
|
| |
Change-Id: I49bb613b416d549f554fd9d23cd37b63954324db
|
|
|
|
|
|
|
|
|
|
|
| |
* add spec reference
* remove LCLS note: CI parameter is optional but have nothing to do with
LCLS
It's pretty hard to decipher from the spec what CI is useful for and we
have not used it anyway so let's just keep it as "Optional" for now.
Change-Id: I5552732afcec48047d993ae6ffb73a3e5d7c9202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARFCNs are values in well defined ranges. Until this patch, ARFCNs not
belonging to any band were blindly assigned to DCS1800 by
gsm_arfcn2band, causing unnoticed bugs and misconfigurations in
osmo-bsc.
Previous API gsm_arfcn2band cannot accomodate this kind of check easily,
so let's deprecate it to tell people to use a new API gsm_arfcn2band_rc
which performs this kind of checks and allows callers to log failures,
misconfigurations, etc.
At the same time, modify implementation of gsm_arfcn2band to abort if an
invalid ARFCN is passed, this way users of this API can notice they are
passing wrong data to it that most probably will produce unexpected
results.
Related: OS#3063
Change-Id: I780d452dcebce385469e32ef2fd844df6033393a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 797558ea1768e464f9559c5f7a4f3f4285c5de25 we send the
NS_UNBLOCK_ACK message before dispatching the NS_UNBLOCK signal,
instead of afterwards.
Add comments which explain the intended order of events.
Suggested-by: Pau
Related: OS#2388
Change-Id: I4b93853c952a97302f8afc14f462f22c3e487564
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gprs_ns_process_msg(), we were dispatching the S_NS_UNBLOCK
signal before sending out the NS_POUT_UNBLOCK_ACK message.
Signal handlers might send messages to the other side, assuming
that NS is now unblocked. However, since such messages will arrive
before the UNBLOCK_ACK message the receiver might discard them.
This problem has been observed with our TTCN3 BSSGP_Emulation
as a peer to osmo-pcu.
This patch makes TTCN3 PCU TC_paging() test pass regardless of
whether the test or osmo-pcu is started first. Before this patch,
this test would only pass if the test was started before osmo-pcu.
A remaining problem is that the test does not yet keep passing
reliably unless osmo-pcu is restarted between test runs.
Change-Id: I3af54a14bb6bcfa167c9a9d9f67835e7f5b9f1bb
Related: OS#2890
Related: OS#2388
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add function to generate cipher mode reject with extended (2-byte)
Cause IE
* add function to get (extended) Cause value
* add corresponding (extended cause) test
* update existing (non-extended cause) test
* use enum as a parameter for existing non-extended version to make
interface more unified
Change-Id: Id5509b94a18180a44f45300caaa02b843c166fa3
Related: OS#3187
|
|
|
|
|
|
|
|
|
|
| |
The msgb_wrap_with_TL() is generally useful so it make sense to make it
public to facilitate code re-use.
Other helpers can be implemented as trivial wrappers over existing tlv.h
functions. Update headers and code accordingly.
Change-Id: I37e91d031fba28cf1c6735b8069b0265746f55e6
|
|
|
|
| |
Change-Id: Id8e3afff737211ded3c5689f2c83b1a544b42f9d
|
|
|
|
|
|
|
|
| |
Add values indicating that LCLS control/config/status value has not been
received yet.
Change-Id: I52dc6a52f5ee043ed2c1625ffecfd495e3c746b1
Related: OS#2487
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add Class definitions
* add helper to check for extended bit
* add helper to get Cause's Class
* use enum in gsm0808_cause_name() and gsm0808_create_cipher_reject() to
avoid confusion between class and cause
* update gsm0808_create_cipher_reject() comments
Change-Id: I31b31dfc22eb4b6b07089e1255246ac458125340
Related: OS#3187
|
|
|
|
|
|
|
| |
The api documentation of osmo_fsm_state_name() refers to an FSM
instance, but it really means the state of an FSM.
Change-Id: I88ddd6048426d380c49170e66f57b3843398c046
|
|
|
|
|
|
|
|
| |
The value strings for the SGSAP IEI are missing, lets add a set of value
strings and a function to retrieve them.
Change-Id: I2787303174f74ffba86675bce2c12f680d8ea708
Related: OS#3615
|
|
|
|
|
|
|
|
| |
Use INET6_ADDRSTRLEN (46) instead of 64 for IP address buffers, and 6
instead of 16 for port buffers (the highest possible port number is
65535).
Change-Id: Ia25e2f3277ad2f60df31c08d12f42c1e6d2a14a6
|
|
|
|
|
|
|
| |
The API documentation lacks the the description for the last parameter,
lets add a description for it.
Change-Id: Ibcd25d3a7ddd7075eb15daff6dba42236d14d945
|
|
|
|
|
|
|
|
| |
* add note about (yet) unsupported standard feature
* use enum constant instead of hex value
Change-Id: I5cc5fc1ae8d5474dbc8d3385a493adf6420a3c98
Related: OS#3187
|
|
|
|
|
|
|
|
|
| |
The function that generates the clear command takes a parameter
"reason", which is the cause code. Lets give it the name "cause" to have
a coherent naming scheme that matches the other functions and the 3gpp
specs.
Change-Id: I7b6c15e8fa8db13deef5041095944ca1c58fb99f
|
|
|
|
|
|
|
|
| |
The api documentation names a parametery by a different name than it is
listed in the parameter list of the function. Lets make the apidoc
coherent.
Change-Id: Id21ed1e920fb64522a734f206efbe2871ec05b06
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Show each rate counter group's index in the output of the
'show rate-counters' command, to provide some way of telling
apart distinct instances of the same rate counter group.
This is not a very user-friendly UI because these indices are
generated internally by libosmocore and/or applications, so
users cannot easily assign meaning to these indices. However,
the current rate counter implementation doesn't allow for more.
Change-Id: Ieb151239407e4b2f8859fefec8d0670f5ddf908a
Related: OS#3674
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When vty_out_rate_ctr_group_fmt() prints the description of a
counter group, it assumes this description should appear at
the beginning of a line. However, the caller might be printing
counters in an indented context. So just let the caller worry
about printing the group title if necessary (there is currently
only one known caller, which is updated in this commit).
Note that printing of the group title was an undocumented feature.
Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201
Related: OS#2660
|
|
|
|
|
|
|
| |
osmo_gen_mme_group_domain(), osmo_gen_mme_group_domain() and
osmo_gen_home_network_domain()
Change-Id: Ia882d9db05ec0037e593aeebea21bc31adb680bb
|
|
|
|
|
|
|
|
|
|
| |
Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.
Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
|
|
|
|
| |
Change-Id: I2184bf12398902d933f3744bc094418cc6961e86
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sending a statsd metric we need to specify a type which can be a
"g"auge, "c"ounter, "t"imer, "h"istogram, and "m"eter.
We used to just pass the stat_item unit into this field, but that is the
unit of the metric (Seconds for a timer, % for utilization, ...).
Change the type field so stat_items are sent as "g"auges. Note that
negative values don't seem to be supported by statsd.
Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
|
|
|
|
|
|
|
| |
Adjust wording so telnet command can be directly copy-pasted from the log to access
the interface without the need for further editing.
Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
|
|
|
|
|
|
|
| |
Missing (unset) type of to be encoded message is not a memory
allocation failure (-ENOMEM), this is definitely a mistake.
Change-Id: Ibbac18e2b68b765c17c2bc959c4c085037953a7f
|
|
|
|
| |
Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
|
|
|
|
| |
Change-Id: I07d105f4a810dd809fbf6feb5c04e7410020c887
|
|
|
|
|
| |
Change-Id: Ibd81f29fa22d53553bd73c055d6a1f5255a69bad
Fixes: Coverity CID#135238
|
|
|
|
|
| |
Change-Id: Ia2528cc3e3155bbc9cb32dee0e3af99cc6e1c654
Closes: Coverity CID#188853
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3GPP_TS_48.008, 3.2.2.103 Speech Codec List states the following:
"The length indicator (octet 2) is a binary number indicating the
absolute length of the contents after the length indicator.
The length depends on the number and type of Speech Codec Elements
to be included. The minimum length of one Speech Codec Element is 1
octet and the maximum length is 3 octets. The maximum number of
Speech Codec Elements within the Speech Codec List is not defined."
This clearly refers only to the length of a single speech codec
element but not on the overall list. So speech codec lists with
length 0 are indeed permitted by the spec.
- Remove the assertion that checks on zero length speech codec
lists.
Change-Id: I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6
Related: OS#3657
|
|
|
|
|
|
|
|
|
| |
In ctrl_handle_msg(), check for IPACCESS protocol messages and respond
to such messages in the same way as ipa_ccm_rcvmsg_base() does. This will
allow the TTCN3 IPA "chopped ping" test to pass on control interfaces.
Change-Id: I9d7137c830981ccad03806b30b776e2b1f1b4699
Related: OS#2010
|
|
|
|
|
|
|
|
|
| |
If we cannot bind the listening socket, reset related fields in
the osmo fd structure to NULL again. Otherwise our caller might
eventually try to use an uninitialized osmo fd.
Change-Id: Ia953b2eff54cac0bd980944291f75db14df09a34
Related: OS#3643
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We must explicitly check the return value of osmo_log_vty2tgt(), or may run
into a segfault. I wasn't aware of this and introduced numerous such cases in
I36f17c131cc70ce5a1aef62fd9693097de230cd4.
Reproduce: on the VTY, do not issue 'logging enable', invoke 'logging level
force-all LEVEL' first.
Show in logging_vty_test.vty that this situation is now again amended by
telling the user that logging was not enabled.
Related: OS#3611
Change-Id: Id11702d1801d6654ca5e5a51b597a0d802e2e8dd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unix(7) man page recommends that sun_path is NUL-terminated
when struct sockaddr_un is passed to a bind() or connect() call.
Non-NUL-terminated paths only need to be dealt with at the
receiving end of a UNIX domain socket.
Commit 896ff6d erroneously assumed otherwise.
This commit almost reverts 896ff6d: It only leaves the added
osmo_strlcpy() overflow check in place.
Change-Id: I6c4ac6b0a0eef4842beae4107f6f09f6cd29172a
Fixes: 896ff6db161465d506bb9bb5bee2cdeef220dd2e
Related: OS#2673
|
|
|
|
|
|
|
| |
We want to have well-formed config files that print exactly one space
per VTY/config node level, and not two.
Change-Id: Ia75c7067284ea225cffe13ca71bad05a7747ae66
|
|
|
|
|
|
|
|
| |
Add a function to convert S0-S15 bits to struct gsm48_multi_rate_conf,
which hold the codec settings for AMR.
Change-Id: I973736273c236eee84decf15868190e339c3fed4
Related: OS#3548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During 'show online help', the XML vty node dump, omit all commands marked
HIDDEN.
These commands were already hidden from the VTY reference prior to commit
I1f18e0e41da4772d092d71261b9e489dc1598923, because of broken/confusing bit and
boolean logic mixup. After that commit, HIDDEN commands end up in the doc. So
practically, this patch here brings back the status quo of before above commit,
even though the previous code clearly "intended" to list HIDDEN commands in the
reference but failed to have that effect.
AFAICT the complete list of commands currently hidden is:
* osmo-bsc: bts/"training_sequence_code <0-7>",
* osmo-bsc: ts/"phys_chan_config PCHAN" for uppercase pchans;
* osmo-bts: bts/"rtp bind-ip A.B.C.D" which actually says
vty_out(vty, "%% rtp bind-ip is now deprecated%s", VTY_NEWLINE);
* osmo-sgsn: 'reset sgsn state' used for SGSN testing.
Note that the osmo-sgsn build was broken by including hidden commands in the
vty reference, since one of its hidden commands had missing doc strings and
made osmotestconfig.py signal failure. This would fix that from the
hide-hidden-commands angle, and so would osmo-sgsn commit
I8b6e8615e409266910f2f76a10ced9ab33e4de91 from the fix-the-doc-strings angle.
Change-Id: I92c3c66ff69c186234276c64478d6342e061d25e
|