This adds a --enable-systemtap configure option, which will then
add static tracepoints to the generated libosmocore binary.
At this point, only two tracepoints are supported: log_start
and log_done. They can be used to trace the amount of time
a libosmocore-using application spends in potentiall blocking calls to
log to stderr or to files.
Related: OS#4311
Change-Id: I7e1ab664241deb524c9582cbd1bec31af46c747e
All bind function should work in the same way.
Also fixing a null pointer assignment if no **result is giving.
Change-Id: Idd0c2190d2af39804c18c4786a997079db9a4330
ST_ALIVE isn't quite clear. This state means this NS-VC is still dead.
ST_ALIVE is used for NS-VC with vc_mode ALIVE (e.g. UDP NS-VC). It's
the first state when the remote hasn't yet answered or when
the NS-VC lost ALIVEs.
Related: OS#4958
Change-Id: I0b29e8ce6444546d90bde68b1f957f1013238784
There's no point in sending NS-RESET (or any other) messages to the
underlying FR layer if the FR DLC has not been marked as
available/active yet.
Change-Id: Id4e7565ba166ca1d12f8800c643d9f2bc4d66873
Closes: OS#4999
There are use cases in which the NS-VC FSM should go back to
unconfigured _without_ being re-started immediately. Let's permit
the caller to do that.
Change-Id: I31fe695a83d38ea1f10f5444e840633d7fa68442
If we receive messages for a DLC which has not yet reported as being
available by Q.933 LMI, drop the incoming message. Otherwise we would
dispatch it to the user, and the user wants to respond - but then
we reject the transmission due to the inactive DLC.
Change-Id: Ia4a045fdf165b526f429f4617e0fdc76036480bd
Related: OS#4999
Using 'uint8_t' for the length argument is definitely a bad idea.
Because of this, packing more than 255 septets would not work as
expected. Deprecate the old function and use 'size_t' instead.
Change-Id: Ib1aac538afeb0a5c76a1df472d555139a496e12e
If we are the 'user' side of FR and a link has just recovered,
we should ensure the next STATUS is for "full status". This way
we learn about the present DLCs as quickly as possible, saving up
to 10 seconds of further delay in link recovery.
Related: OS#4999
Change-Id: I6f905a18a7d130a3c02b4a3e7a2a2dc24afc0ea1
Log the NS-STATUS primitives from within the library, so we don't have
to keep related code in each and every application.
Change-Id: I368883acfc8ea76529befcd429bf8f2445a60a94
ENOSPC is used with non-volatile (disk) storage, while ENOMEM is
customarily used for RAM allocation failures.
Change-Id: Ia4c16d8278dc30c7cc69169b18428cda5272738d
Avoid code duplication between three different drivers by sharing
the "core" of the bind initialization in a new, shared ns2_bind_alloc().
Change-Id: I535fc68e94fcd695de827dd922706adc1c5a2cb7
The counters had all been lost in the ns -> ns2 configuration,
let's try to implement some more of them: LOST_ALIVE, BLOCKED,
LOST_RESET.
Change-Id: I75d8637bd142722fdf9a162a2369aa9cdc980a57
When the FR code decides to drop a packet (ENOBUFS from the AF_PACKET
socket for non-signaling packet), let's report that back via the
frame_relay code into the generic NS2 code.
This way the generic NS2 code always knows if a packet was actually
successfully transmitted, or if it was dropped for some reason.
Change-Id: I4bb517fd04af69dbe6da628b132d57994ab3e5a4
Don't call the function pointer of the underlying transport
directly, as we many still want to do some common processing,
such as statistics counting (see follow-up patches).
Change-Id: I8d14c7b8d3aacc2bed033072d7934dbd6aab41df
It's always a bad idea to have an array of descriptions that's indexed
by an enum, without using named initializers. It's too easy to get
inconsistencies.
Change-Id: Id0ebd2a202a465ca0298f4245f1fb5c495235fc8
AF_PACKET sockets cannot be written-to using select(), as they
will always return "writable" but then still fail with ENOBUFS.
This also means that we cannot use osmo_wqueue() as it assumes
that a writable socket can actually be written to.
As there's no way to figure out when exactly we can again perform
a successful write, we have no other option but to start a timer
and re-try at a later time.
We will scale that timer based on the estimated duration of transmission
for the just-failed PDU on the line rate of a 31TS E1 Line.
Furthermore, with this patch, we stop queueing anything but signaling
traffic (NS-BVCI=0) or Q.933 LMI. User data (NS-BVCI != 0) will
instead be dropped in order to avoid buffer-bloat.
Change-Id: I4f79a246236c94175ceffa5f3f556c8931c6bc62
Closes: OS#4995
gprs_bssgp and gprs_bssgp_util.c also contains code related to send and
receive RIM PDUs via BSSGP and also code to encode and decode RAN
INFORMATION PDUs. Lets move this to gprs_bssgp_rim.c
Change-Id: Icda279452962b06e552cb1361d2a27b7dc8a6b04
Related: SYS#5103
This feature is used by BSC to gain knowledge on whether a given BTS
supports GPRS Cell Change Notification (CCN) related procedures on PDCH,
and as a result enable or not by default the CCN_ACTIVE bit in SI13 to
announce the support it is allowed to use the feature.
Related: SYS#4909
Change-Id: I61991266b95d0c13d51b47906cc07846e9cf1390
Older commit adding the 2 bits for Rel-4 extension forgot to increase
the length field (see TS 44.060 Table 12.24.1)
Fixes: 946bb95af1
Change-Id: I20efb4403cdf6c5bc717502a7075630044142f17
The vty configuration was wrong when any other node was
in between the vty configuration (e.g. gb or ss7).
The vty code doesn't have a relation between parent and child node.
It wasn't detected because this only happened in the sgsn.
The pcu doesn't have any binds defined.
Change-Id: I8a3d67d41baca36b4d1a951a574cd41e556355c5
The gprs_ns2_vty_init_reduced() call initialized the ns2 vty without
configuration nodes (except timeout). The PCU can be only configured
by the BTS/BSC. It should not configured by vty.
Change-Id: I4437da74bd48ba64d3f16ea67afc26c45b6d3ac9
The call was only introduced as workaround for the first implementation
of vty. There is no need for this anymore. The configuration can
just add "accept-ipaccess" to the bind to allow creation of dynamic
ipaccess NSE.
Change-Id: Ie924ead6da17657f3da334068c8ada82c8845495
Drop the vty(1) code and replace it with vty2. The vty(1) was only
used as intermediate to not develop a vty while developing a new
code base behind. Users of gprs_ns2_ has to use the new vty code.
API change which must be synchronized with osmo-pcu,
osmo-gbproxy, osmo-sgsn.
Change-Id: Ic2059e75d8ede8e5c29c4fef6be608ed79c8a97c
This reverts commit b306094448.
It was merged too quickly and patches for projects using related
features are not yet prepared.
Change-Id: I8a2aaf74a47de8f4f0adb37d16426d199788e3fe
Drop the vty(1) code and replace it with vty2. The vty(1) was only
used as intermediate to not develop a vty while developing a new
code base behind. Users of gprs_ns2_ has to use the new vty code.
API change which must be synchronized with osmo-pcu,
osmo-gbproxy, osmo-sgsn.
Change-Id: I8c3f2afecc74b78f7f914f7dce166cbcb63444eb
All public enum should have the prefix GPRS_NS2_.
API change which must be synchronized with osmo-pcu,
osmo-gbproxy, osmo-sgsn.
Change-Id: I548ff12f7277cbb7e1a630a3dc02b738ce89be72
Whenever a RIM PDU is received, log to which RIM routing information
(address) it is going to and where it is comming from.
Change-Id: Ia08d3b162a4f6257cccaa7f0764fa7ea498355ef
Related: SYS#5103
The bssgp_rim_routing_info_discr_strs string list contains whitespaces,
when the whitespaces are replaced with a "-" the log output looks better
Change-Id: I26facd3dc160603da89dcd787cccf78b19a20f02
Related: SYS#5103
RIM routing formation structs can contain different variants of address
identifiers, so it is difficult for an API user to pick the _name()
function to generate a human readable string. Lets add
bssgp_rim_ri_name() and bssgp_rim_ri_name_buf() to make printing a
routing identifier easier.
Change-Id: Idca6bdccffe663aea71a0183ca3ea5bb5b59e702
Related: SYS#5103
All functions which are exposed by gprs_ns2_internal.h should not contain
the public prefix gprs_. Internal function should only contain ns2_ prefix.
Change-Id: Icecc5a918902cd10efac72bbac20780d39aab272