Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I5280b6431b18ec36c3186460bebeb6321996c35f
|
|
in their infinite wisdom, GlobalPlatform made GET DATA a command that can be either APDU
case 2 or case 4. As the specify Le must be 0x00, we can conclude that P3 == 0x00 must be
Le, while P3 != 0x00 must be Lc and hence case 4 */
Change-Id: Ic8a17921f5a42d227791f1de39f90b4967c2e1b6
Related: SYS#6865
|
|
In their infinite wisdom, GlobalPlatform re-defined the CLA 8x / INS F2 command
alreay specified by ETSI TS 102 221. This wouldn't be as bads if they
had the same "Case". However, ETSI has case 2 while GP has case 4.
Lucikly, the P1 coding of ETSI [so far] states all the four upper bits
must be 0, while GP always has one of those bits set.
Before this patch, it is possible that a Modem/Phone will send an 8xF2
command and intends it as a GlobalPlatform command (with Lc > 0 and
command data portion), while this code assumes it is an ETSI UICC
command with Lc=0 and hence no command data portion. This will make
communication break when using simtrace2 'cardem'.
Change-Id: I8dd317ef8f942542e412b18c834a0467c51291c3
Related: SYS#6865
Related: https://lists.osmocom.org/hyperkitty/list/simtrace@lists.osmocom.org/thread/HPRTPGPZITHHASCJISCBAKHGBFZCFANP/
|
|
Change-Id: If29f86e09715f849847081edd8821cdc5acd3949
|
|
Allow using arbitrary length data as hashtable key:
Copy jhash.h implementation from the linux kernel.
Apply osmo_ prefix to all global symbols.
Add jhash_test to ensure the code import works as intended.
First application will be a hashtable keyed by umts_cell_id in
osmo-hnbgw.git.
Related: SYS#6773
Change-Id: I0c9652bbc9e2a18b1200e7d63bb6f64ded7d75fa
|
|
Previous patches add definitions of GSM0808_IE_THEMWI_RTP_EXTENSIONS
and RSL_IE_OSMO_RTP_EXTENSIONS to BSSMAP and RSL; this new header file
provides definitions for individual bits in the single value octet
of the new IE.
Related: OS#6448
Change-Id: I0eccfe5ddcf44f8f20440acb01e2d4870ec0cd91
|
|
This addition to Abis RSL is an Osmocom-specific IE, intended for
Osmocom flavor of Abis over IP. It requests the use of non-standard
enhanced RTP transport formats. Complete description of this new IE
is contained in this Technical Memorandum:
https://www.freecalypso.org/specs/tw-tm-004-v010001.txt
Related: OS#6448
Change-Id: I9ac692062e05f859ba56235375bdc10f212cb2c0
|
|
TW-TS-001 and TW-TS-002 (Themyscira Wireless Technical Specifications)
are enhanced RTP payload formats that replicate the functionality and
semantics of 3GPP TS 48.060 and 48.061 (respectively) over IP transport.
Companion spec TW-TS-003 defines a BSSMAP extension whereby the CN
tells the BSS that it wishes to use these otherwise non-standard RTP
formats - but these RTP extensions need to originate at the BTS, as
their main purpose is to pass along information that is otherwise lost
in RTP transport with standard payload formats.
Define feature flags whereby OsmoBTS can tell OsmoBSC that it supports
these RTP extensions.
Related: OS#6448
Change-Id: Ia2cd1d5fa37e9d10927ca5d6cad79ec538fd0a11
|
|
Themyscira Wireless Technical Specification TW-TS-003 adds
a non-standard IE to GSM 08.08 BSSMAP whose purpose is to signal
the use of enhanced RTP payload formats that go against the
stipulations of TS 26.102 (referenced from 48.103 for AoIP),
but allow an IP-based GSM network implementation to mimic
the workings of TDM-based GSM more faithfully.
Spec reference:
https://www.freecalypso.org/specs/tw-ts-003-v010002.txt
Related: OS#6448
Change-Id: Idd6f1838bdc0cd71a2f6357e9b6d8b8fa4f7c46c
|
|
Change-Id: I2fb70b684978fa8a591d1d9e3cace919d590d1ef
|
|
Without a space the logging looks like this:
iofd(virt-rnc0-0)Cancelling read
Change-Id: I84d305ce6cfc69352a64cb9e42229f88f09893c0
|
|
This command generates a state transitions graph for the given FSM.
The output format is DOT/Graphviz, which can be rendered using offline
or online (web) tools. It's useful for quickly getting a graphical
representation of the FSM states and their interconnections.
https://en.wikipedia.org/wiki/DOT_(graph_description_language)
https://graphviz.org/doc/info/lang.html
Change-Id: I09ee0a8c3fc4b1aa991ab5c93c0b654fccd7ea4c
|
|
See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.
Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
|
|
Not only we call this function from vty_read_config_file(), but
also from config_write_file_cmd. Thus we leak memory when doing
'write file FILE' in the VTY.
Change-Id: I356818aae3addab6db39de9a625453b7435b7cc1
|
|
This way the naming is consistent with existing tests and
matches the 'tests/*/*_test' pattern in .gitignore.
Change-Id: I280fc0cc1bda9ba445af71f00bc8f1ccfd2b2091
|
|
When running 'make check' in-tree ($builddir == $srcdir), those
*.cfg files end up in tests/ and show up as git-add candidates.
Instead of copying them, just let the test binaries know where
to find those files via the cmdline parameters.
Change-Id: I74e428f0548418fdecada3d25049d6e110e790fe
|
|
Add functions to pass struct osmo_sockaddr to the
osmo_sockaddr_str_{to,from}* API directly.
So far the interface to osmo_sockaddr_str_ is:
osmo_sockaddr_str_from_sockaddr(&my_sa_str, &my_osa->u.sas);
I'm working a lot with osmo_sockaddr at the moment, and the cumulated
time of forgetting to add 'u.sas' and having another compilation cycle
because of those is justifying this additional API.
Change-Id: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91
|
|
see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
Change-Id: I52d8c7cece35337eb33325146eccc8db005c55e3
|
|
This reverts commit 7f1fb3ea817578f3f2f63e8065aa50f8355caa3b - slightly
amended with the new log_cache_enalbe() function. The cache is hence
disabled by default, and applications can enable it, if they wish to
benefit from it.
Reason for the original revert was: some fallout expected due to log
manipulation in test code
Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
|
|
Related: OS#5751
Change-Id: I82db9a15bc483a5447d86352512afaafa2bcfbb6
|
|
There are situations (like multicast datagram transmit) where we don't
really care about the result of a write operation, and hence don't need
a write completion callback.
As the completed message buffer is free'd by core osmo_io, there is no leak
in doing so.
Change-Id: I0c071a29e508884bac331ada5e510bbfcf440bbf
|
|
* introduce a new "Osmocom I/O interface" group to show up in API docs
* expand the documentation to turn it into something useful for somebody
wanting to write an application using it.
Change-Id: I6315cfc7ff34a0f8971517edf035e1efcef3ed5c
|
|
osmo_io (unlike its io_uring backend) is not linux specific, so putting
it in an "#ifdef __linux__" block is plain wrong.
A side-effect is that all our doxygen comments are not processed as
__linux__ is not set while doxygen parses the source file.
Change-Id: I260443ba3cd0bb81dade434208dea4ea70fe8ad8
|
|
Fix Change-Id I03752c0114cc6fad0c31fff6fff43072f36a50a7
Change-Id: Ie085c7cb3eb57e0da10485be8f90208cb41b0073
|
|
Change-Id: I43df86cdbd3e52d4f8f7bc0e48478b6f9b288e9f
|
|
check all operations in osmo_iofd_uring_init() and panic if any of them
fails.
Change-Id: I03752c0114cc6fad0c31fff6fff43072f36a50a7
|
|
"Assert failed 0 osmo_io_uring.c:94" is rather useless in terms of an
error message. Let's improve upon that.
Change-Id: I0ac9ae59e99c3704b3ce33919c9e7d11024476e3
|
|
This allows identifying precisely an AF_UNIX socket.
Change-Id: Ic465e557ea49de8e044d1ef6d91fc3c852c88ff2
|
|
Right now stream_cli/srv print "<error-in-getsockname>" when using an
AF_UNIX socket. This commit fixes the problem.
Change-Id: I224c3712a029ee338ee1209a67d820b887170910
|
|
In Change-Id Ic81af56e7ea6921ba39168727ef64c308e9c6754 we removed
the duplicate declaration of ctrl_cmd_send(), which was declared
both in control_if.h and in control_cmd.h. Unfortunately this broke
legacy openbsc.git, so let's re-introduce it.
Change-Id: I1d415c5e80cfb7ef9e11d33c0c3eaece40ebb1da
|
|
This was done for read error in a previous patch. This is required
because osmo_io_uring does not support errno, instead it uses the
result code. To have a unified API, set the result code equally.
Related: OS#5751
Change-Id: I405094449a6644db37534757f2fbccbcff982f23
|
|
Both of our back-ends have a register_fd and unregister_fd back-end.
Let's simplify the code by not treating them as optional, which
introduces code paths that we never take, adds small runtime overhead
and makes the code harder to follow.
Should we ever introduce more backends which might not need those
call-backs, we can either have empty functions or think about how to
make them optional.
Change-Id: I0077151eb676f61320b3fa2124448852aa8fd4a9
|
|
There's only one way to set the osmo_iofd_ops, which is by environment
variable during the constructor time at shared library load time.
There's hence no point in doing OSMO_ASSERT() on each and every call to
osmo_iofd_notify_connected() at runtime. We can move those kind of
asserts to the one-time load-time constructor instead.
At the same time, we can extend those asserts to all the mandatory
call-backs to be provided by the backend.
Change-Id: Id9005ac6bb260236c88670373816bf7ee6a627f1
|
|
Let's not pretend we support backends without a close_cb. In such
situations nobody would actually close(2) the file descriptor,
but we would set iofd->fd to -1, effectively creating a file descriptor
leak.
Both of our two back-ends provide a close_cb, and we don't need to
consider hypothetical future back-ends that would not like to register
such a call-back.
Related: OS#6393
Change-Id: Id285f1d7b73ae5805aa618897016ae8b73bf892d
|
|
Change-Id: I50ba6a76c0144f249d67488874a6c4edf01ec6f2
|
|
Let's return an error if both osmo_iofd_setup() and osmo_iofd_register()
are called with an invalid file descriptor like -1. Either one of them
must have been called with a valid file descriptor.
Change-Id: Ie4561cefad82e1bf5d37dd1a4815f4bc805343e6
|
|
osmo_iofd_setup()
Setting ioops is optional when calling osmo_iofd_setup(). If it is not
set, do not call check_mode_callback_compat() to check for
compatibility.
Closes: Coverity CID#349578
Change-Id: I1e25f3e420f25a44cbf73a4da9a498b7561e9ddd
|
|
This call-back can for example be used as segmentation call-back
for libosmo-netif stream_cli/stream_srv or directly for osmo_io.
Related: OS#5755
Change-Id: I5e922c54b3431d759b38e81e55076125c5a34008
|
|
ctrl_cmd_send() should always have taken a 'struct ctrl_connection'
as argument, not directly its write_queue member.
Let's offer a ctrl_cmd_send2() which fixes the problem, and deprecate
the old ctrl_cmd_send().
Related: OS#5751
Change-Id: Ic81af56e7ea6921ba39168727ef64c308e9c6754
|
|
If it fails, do not set the IOFD_FLAG_NOTIFY_CONNECTED flag and log an
error message.
Closes: Coverity CID#349579
Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1
|
|
All TX messages are moved from iofd instance to the user's context.
iofd may be destroyed, but the message is still available to the user.
To prevent a use-after-free bug, the context name must be changed from
iofd->name to a constant that does not belong to iofd.
Change-Id: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b
|
|
This function can be used by user code to obtain the currently-set io
operations, it's the inverse of osmo_io_set_ioops().
Change-Id: I03398c811b9534f50c6644b21eea89a04be29fb0
|
|
Change-Id: I6ba88cd7bbd5b5ef42eb460679696f105c9158cb
|
|
iofd_handle_send_completion()
msghdr must be detached, because subsequent callback at
iofd_handle_send_completion() may destroy the iofd (which in turn
frees this msghdr, if still attached) and frees the msghdr, causing a
double free.
Related: OS#5751
Change-Id: Ia349f73de2145fa360b20dd40deb73a8ffc71f07
|
|
There is always a completion after cancelling a uring request.
Because uring requests use msghdr pointer as user data, we cannot just
free the msghdr after cancelling. Upon completion (received after
cancelling), the user data still points to the msghdr. To prevent a
use-after-free bug, msghdr is not freed, but detached from iofd
instance. Then upon completion, the msghdr (if it was detached from
iofd) is freed.
Additionally it is not required to keep IOFD_FLAG_IN_CALLBACK set
anymore, if there is a msghdr attached to iofd. As described above,
all msghdr get detached, if iofd is freed (uring request get cancelled)
during callback.
Related: OS#5751
Change-Id: Ic253f085dd6362db85f029f46350951472210a02
|
|
Related: OS#5751
Change-Id: Ida63b74feecddf96bab7b2ade4e9ad216fe56e06
|
|
io_uring will reject to transmit messages with length of 0.
Change-Id: I94be5ec7344d92157f7853c6c0ddf7007513ba8e
Related: OS#5751
|
|
In order to receive a connect notification from SCTP socket,
poll/select event must be used instead of a write notification via
io_uring completion event.
Once the connect notification has been received, subsequent write
notifications via io_uring are used.
Change-Id: I4eca9ea72beb0d6ea4d44cce81ed620033f07270
Related: OS#5751
|
|
Add support osmo_io operations resembling sendmsg() and recvmsg() socket
operations. This is what will enable the implementation of higher-layer
functions like equivalents of sctp_recvmsg() and sctp_send() in
libosmo-netif and/or other users.
Change-Id: I89eb519b22d21011d61a7855b2364bc3c295df82
Related: OS#5751
|
|
This relocation is necessary as the backend (osmo_io_fd or
osmo_io_uring) requires a different approach in handling connect
notifications. As a result, a function call has been introduced to
struct iofd_backend_ops.
In a subsequent patch, the process for the osmo_io_uring backend will
be modified to handle SCTP connect notifications using poll/select.
If connect notification is requested using poll/select, the file
descriptior must be registered to osmo_fd, using osmo_fd_register. If
read / write notification is requested by application, the file
descriptior must be registered also. A flag is used prevent calling
osmo_fd_register / osmo_fd_unregister multiple times, which would cause
a crash.
Change-Id: I905ec85210570aff8addadfc9603335d04eb057a
Related: OS#5751
|