Age | Commit message (Collapse) | Author | Files | Lines |
|
This will disable the thread-safe use of many libosmo* featues,
but it seems even in 2020 there are still systems out there
wthat don't support thread-local-storage.
Related: OS#4456
Related: OS#4062
Change-Id: I9baa7047fc4ff1a595ee318dcdb1247f1460da1b
|
|
This function offers the highest level of API among all libosmousb
helper functions. It is intended as a one-stop shop for everything
related to grabbing an interface.
Change-Id: I748ded6cc7b73a73625588bd7a34a017a905b6bf
|
|
libosmosim contains a variety of definitions and utility fuinctions
useful when working with SIM card [protocol]. They can not only
be used with PC/SC readers but also in other contexts.
Change-Id: I741940d3dc2a5653c760e9d1597d7f08afb3b631
|
|
The table amr_len_by_ft represents the length of the raw AMR speech bits
in bytes. The table is based on the Table found in RFC 4867 §3.6, Table 1,
Column "Total speech bits". The number of bits is divided by 8 and then
rounded up to get the number of consumed octets.
An AMR SID frame (including STI and MI) takes up 39 bits, this will
result in 5 octets, not in 7. Lets correct this.
Related: OS#2978
Change-Id: Icf330450981b32be5d1cee5b10aa92bac4cb72f5
|
|
Change-Id: Ib52d22710020b56965aefcef09bde8247ace4a9c
Related: OS#2966
|
|
AMR SID update frames are protected using an 1/4 convolutional coder,
wich is similar to the one used with 6,7 kbit voice frames. Except that
there is no puncturing and the length is different.
Change-Id: Ia35ed4178a7f0d816052b7e5d6478b93a1d9744f
Related: OS#2978
|
|
AMR not only specifies a 6 bit CRC for regular voice information. It also
specifies a 14 bit CRC to protect the comfort noise updates contained in
the SID_UPDATE frames.
Change-Id: I5cfd8ca806aba8d42cb9787f69605cea7de6e900
Related: OS#2978
|
|
Change-Id: Id2d016939c3a6185cc3cfa8631da0c8d187a8c5a
|
|
* What we used to call TCH/F and TCH/H in gsmtap are actually only
FACCH/F and FACCH/H, i.e. the signaling part of Bm/Lm channels
* Give them proper names with backwards compatibility #define
* Split VOICE into VOICE_F and VOICE_H. If we don't differentiate this,
a receiver is not able to determine the RSL channel ID of a frame
without looking at external state/context. That in turn has been a
design feature of GSMTAP Um format so far, and programs like
osmo-bts-virtual rely on it.
Change-Id: I952044a17334f35712e087dc41781805000aebc1
Related: OS#2557
|
|
Related: OS#4441
Change-Id: I70ae237ea27972f6819fd217c3d5059dda009486
|
|
In Change-Id If223020933b083fe359a2e8ff5fab1ce64a363d8 we introduced
GSMTAP_CHANNEL_VOICE, but we didn't add it to gsmtap_gsm_channel_names[]
Change-Id: I7ab696d3e0edb13632e048a9e05be03612d3d28c
Related: OS#2557
|
|
We so far are only able to transmit signalling data inside GSMTAP,
but not actual voice / user plane payload data.
we cannot use the existing TCHF/TCHH sub-types, as those are already
used [without further discrimination] for FACCH + SACCH Data on those
channels.
Instead, we will introduce a new GSMTAP_CHANNEL_VOICE sub-type, which
then will have the first byte for a sub-sub-type specifying the payload
format in detail.
Change-Id: If223020933b083fe359a2e8ff5fab1ce64a363d8
Related: OS#2557
|
|
The variable struct tlv_parsed tp in dump_file() conditionally
initalized by tlv_parse() but later it is accessed under a different
condition without a check that makes sure that tp is only accessed when
tlv_parse() was called beforehand. Lets introduce a check that makes
sure tp can not be accessed when it is uninitalized.
Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce
Fixes: CID#208435
|
|
Change-Id: Ieebec5487f5d995a453d15bc024931299d5cf5bf
|
|
Change-Id: I24605c8616015b5f7d45297afc65d6a93d2edbaf
|
|
This adds missing entries for CBCH in the conversion between RSL-style
channel numbers and GSMTAP channel types.
Without this change, you will see tons of messages like
virtphy[19865]: Wed Feb 26 16:16:28 2020 DVIRPHY <0002> gsmtapl1_if.c:267 MS 0000: Ignoring unknown channel type UNKNOWN (0)
if running virtphy of osmocom-bb with a BTS that broadcasts CBCH.
Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f
|
|
All the fields of the structure are set explicitly anyway.
Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b
|
|
Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09
|
|
Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b
|
|
This function is supposed to return 0 on success or 1 in case of
error. However, it used to return 1 even in case of success. The
reason is that length of the input string was not taken into
account and sscanf() was failing on '\0'.
Let's use osmo_hexparse() and rely on its return value.
P.S. Funny that the unit test expectations were wrong too.
Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff
|
|
The aim of this unit test is to demonstrate the problem described
in OS#4388: bitvec_read_field() can never return negative value
on error (e.g. out of bounds access).
Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0
Related: OS#4388
|
|
If selection of ADF_USIM fails, let's fall-back to reading/dumping
a classic TS 11.11 (51.011) SIM card.
Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9
|
|
Don't just iterate over all files in the current working
directory (cwd), but also recurse through all sub-directories.
Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec
|
|
Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800
Related: CID#208181, CID#208179
|
|
Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f
|
|
If (!env_whitelist && addl_env), osmo_environment_append() would
access uninitialized memory. If both are false, execle() would
also deal with garbage values. Let's ensure that at least the
first element of new_env[] is initialized.
Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18
Fixes: CID#206571
|
|
Most likely, we should not assert() here, but let's at least log
an error message in case if osmo_fd_register() fails.
Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570
Related: CID#206572
|
|
A caller shall never pass NULL to osmo_conv_encode().
Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b
Fixes: CID#208174
|
|
Some osmo-* applications may need to use their own VTY node as a
parent for the timer configuration commands. Therefore it makes
more sense to use 'unsigned int' instead of 'enum node_type'.
Let's also clarify that osmo_tdef_vty_groups_init() accepts parent
node for configuration commands only: 'parent_node' -> 'parent_cfg_node'.
Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c
|
|
There's nothing really preventing a user from user negative values.
Otherwise if we keep it like this then g++ is not happy when passing eg.
{ -2, "foobar" } when initializing a value_string array.
Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab
|
|
Change-Id: I183882ff2eae82754d55189b154863fad9cce4aa
|
|
Found by clang with enabled LTO (Link Time Optimization).
Change-Id: Ibda4600b4d23b93cf79ff13bb934dfc396aa7d93
|
|
src/usb/Makefile.am:16: warning: variable 'libosmosim_la_LIBADD' is defined but no program or
src/usb/Makefile.am:16: library has 'libosmosim_la' as canonical name (possible typo)
src/usb/Makefile.am:15: warning: variable 'libosmosim_la_LDFLAGS' is defined but no program or
src/usb/Makefile.am:15: library has 'libosmosim_la' as canonical name (possible typo)
Change-Id: I062ea640a75f4521818ba71d5ffea2d08bf3052a
|
|
Change-Id: Ifc0133737627a8277635f8f3662b3f6e922be149
Closes: CID#207713
|
|
Thise two helper functions allow the user application to find
a unique match among the existing USB devices, using either a user-
provided iSerial string, or a user-provided physical USB path.
Change-Id: I8ff3fb3e1a77e10cb313473480ce5e7673749a93
|
|
In order to dissolve info_meas_ind_param in ph_data_param and
ph_tch_param we need to add the measurement related struct members to
ph_data_param and ph_tch_param as well so that those indications can
also carry measurement data.
Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42
Related: OS#2977
|
|
The script
osmo-ci/scripts/verify_value_string_arrays_are_terminated.py
is able to find .c/.h files in directory trees by itself.
Shorten the cmdline invocation of this script for libosmocore.
Change-Id: I888c20b9b19d777cd6581a541536842292f434b9
|
|
'make distcheck' distributes the generated .c files, but it is good GPL
practice to also distribute the template.
Change-Id: I988acd3bc629e98985a99780d3142112125d13f7
|
|
Change-Id: I6b2a90fd8f4b042a1e38dbf8e99414a94a290375
|
|
Change-Id: Ia6780221174070cee408625e24513f2c11cc9dfc
|
|
Change-Id: I2474bbe99bf0aa35aab046a1987047a8368beff6
|
|
Change-Id: I629e71242cb6bafa3c1b1d65ae7ec6687ec203d1
|
|
Change-Id: I5698bfe45467a8b0e44549105aaf27b8da500de8
|
|
Change-Id: I1a4aa5d6785aa7ff7dc454930a84d73fe1114726
|
|
Remove brackets and check for "(" after PKG_CHECK_MODULES to avoid
getting comments containing the keyword.
Change-Id: Ie2b9a65d42615aa3cce6906ddd53758bc3052942
|
|
In some situations, we want to execute an external shell command
in a non-blocking way. Similar to 'system', but without waiting for
the child to complete. We also want to close all file descriptors
ahead of the exec() and filter + modify the environment.
Change-Id: Ib24ac8a083db32e55402ce496a5eabd8749cc888
Related: OS#4332
|
|
In Change-Id I656a1a38cbb5b1f3a9145d2869d3b4d0adefcae3 we introduced
USB support and also updated debian pacakaging informatio for this
new package - however, I missed to add a realted Build-Depends line :(
Change-Id: Ib0446510c8ba49623914b6103ea9cfa88c208d50
Related: #4299
|
|
Those functions were originally developed as part of simtrace; let's
import them to libosmousb as they are truly generic.
Change-Id: I2c18b938e4e1ea5b8a521a386f00db3a7389e47a
Related: OS#4299
|
|
Osmocom applications typically use libosmocore select.[ch] event loop
code as their main event dispatch mechanism. When they want to deal
with libusb in a non-blocking/asynchronous way, they need to integrate
libusb into that select().
The new libosmousb is doing exactly that: Providing a shared utility
library for Osmocom programs that wish to use libusb. This is useful
for example in simtrace2 host utilitie as well as osmo-e1d.
Change-Id: I656a1a38cbb5b1f3a9145d2869d3b4d0adefcae3
Closes: OS#4299
|
|
gcc-9.2.1 issues the following errror when compiling with -Werror:
In function ‘tl16v_put’,
inlined from ‘tvlv_put’ at ../../include/osmocom/gsm/tlv.h:156:9,
inlined from ‘tvlv_put’ at ../../include/osmocom/gsm/tlv.h:147:24,
inlined from ‘msgb_tvlv_put’ at ../../include/osmocom/gsm/tlv.h:223:9,
inlined from ‘bssgp_tx_paging’ at gprs_bssgp.c:1250:2:
../../include/osmocom/gsm/tlv.h:131:2: error: ‘memcpy’ reading between 128 and 65535 bytes from a region of size 9 [-Werror=stringop-overflow=]
131 | memcpy(buf, val, len);
| ^~~~~~~~~~~~~~~~~~~~~
Unfortunately I've not been able to work around it with some nice GCC
#pragma GCC diagnostic ignored "-Wstringop-overflow"
Change-Id: I22a0c399c6c00eaf87277002096a82844c9e198e
|