The implementation cleary replaces sep_chars instead of keeping them.
Adjust the doc to clarify that.
It seems to me that the intention was to *allow* sep_chars instead of
replacing them, especially when looking at sep_chars of
osmo_separated_identifiers_valid(). But we're stuck with that now.
Change-Id: Ia842a7eeb46b49ee364be55c1194e463ebcaf392
It is not be obvious on the first look that ->prev actually points to the last
element of a list, lets add a macro for that to make the API easier to use
Change-Id: Icf455bf6ba9d60bd311af17c9e80febaa42cacc9
Related: SYS#4971
If the NSVCI is valid, there is no signalling or data weight defined (internally this is 1).
For NSVC with NSVCI don't print the signalling or data weight.
For NSVC without NSVCI, don't print NSVCI at all.
Related: OS#5180
Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc
gprs_ns2_free_bind() takes care of all required steps to clean up a bind.
The driver->free_bind() operation only cleans up the driver internal state
but not NSVCs and other generic things.
Fixes a crash when free'ing a bind from the vty which has active NSVCs.
Related: OS#5195
Change-Id: I0a2ad22905bcacb929b9b5f5b034af0da3081826
The log line should describe what's reported towards the NS user
and not the NSE MTU itself
Related: OS#5192
Change-Id: I3f5445a1ba8c89c4023ff48be15a80569a128528
When the MTU changes for any fr device, all
NSE will recalculate their MTU. If any NSE is alive,
libosmocore will crash.
Related: OS#5192
Change-Id: I31ba5cefea7bbb0b74060d6664b42c58815ee2a1
This feature signals support to configure Osmocom Dynamic Timeslot type
as SDCCH8, on top of historically supported TCH/H and TCH/F.
The idea is that when unneeded, the TS is configured as PDCH, and as
soon as there's need for an SDCCH and there's none available, the TS is
dynamically reconfigured to SDCCH8. Once all logical channels in the
dynamic TS are released and hence becomes free, the BSC will reconfigure
it to PDCH.
Related: SYS#5309
Change-Id: Ifc0ca8916bd3e93e5a60a7dd7391d2588fdb5532
They will gain support to be activated as SDCCH/8 soon too. Since new
name would start to be too large, use a more generic naming for it.
Related: OS#5309
Change-Id: I56dcfe4d17899630b17f80145c3ced72f1e91e68
The NSE wasn't notified when a NSVC went into the BLOCKED state from
an UNBLOCKED state.
Related: OS#5182
Change-Id: I09634e414e9bb966e6b5809b7de1b59fbabd413d
When configuring multiple NSE/BINDs the order of the configuration
should be keeped.
Related: OS#5181
Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
Prepare for A5/4 support in osmo-msc.
Add new function gsm0808_create_cipher2() which takes a struct as
argument instead of individual fields. This is akin to e.g.
gsm0808_create_handover_request() below in the file, and allows
backwards compatibly extending the argument list without needing a new
function signature every time.
Add struct gsm0808_cipher_mode_command, as argument list for
gsm0808_create_cipher2(), with kc128 included.
Encode the Kc128 IE in gsm0808_create_cipher2().
Implement gsm0808_create_cipher() by calling gsm0808_create_cipher2().
Change-Id: Ib3906085e0c6e5a496a9f755f0f786238a86ca34
Certain control interface commands also may require to verfy a range in
their verify function. cmd_range_match() from the VTY does exactly that
and the range can be specified as string, the same way as we would
specify it in the VTY.
Change-Id: I53fc207677f52b1dc748b01d58424839cdba807c
related: SYS#5369
Allow telling osmo_select_main* to only service pending writes (shutdown
mode). Introduce API fuctions to indicate a shutdown request, and find
out whether shutdown is complete.
Some osmo programs have a curious sleep of few seconds upon receiving
SIGTERM. The idea presumably was to finish off pending writes before
halting the program. But a sleep() on program exit is annoying,
especially when there usually are no pending writes, and when osmo-bsc
is launched numerous times for tests.
Change-Id: Ib94d4316924103459577087c2214188679db2227
Use section for all counter headings, the idea is that the generated doc
is included below a chapter describing the implemented counters which
can optionally describe individual items.
If not osmo_counters are present simply omit the whole section to tidy
up the manual. Those are deprecated anyway and not used in the osmo-*
projects that I checked.
Change-Id: I126b39cb9458e0f62efa338967e07151a0eece0f
Related: SYS#5005, OS#4523
osmo_wqueue has support for it, so simply handle it correctly in the
callback (updating buffer and returning -EAGAIN).
Related: OS#5169
Change-Id: I6cbc7ec6ae6832e61cddf4402332ba09b142a7d4
This commit fixes crash when response is more than ~4096 chars.
Furthermore, we now allocate only the required memory, not 4096 for all
messages, which usually don't require it.
Test needs to be adapted since it assumed there was more available space
at the end of the msgb.
Related: OS#5169
Change-Id: I0b8f370f7b08736207f9efed13a0663b5e482824
gss->family (and gss->ip) was never set.
So IPv6 should have never worked.
Fixes: e769f5226b ("gprs_ns2_sns: rework IP-SNS initial remote")
Related: OS#5036
Change-Id: I4e39dc5c7f766a7040645ceb62afdf6a9cfad00f
Reduces the code as the conversion between address family (bind)
and ns2_sns_type is not needed anymore.
Related: OS#5036
Change-Id: I1bcdd43af34c926d4b88491d00669422c299bef7
Underlaying APIs (msgb_alloc) use a uint16_t as a type, which means
until now passing a value > 2^16 would succeed providing a msgb with
less space than requested.
Since those are static inline, there's no symbols used by apps, so we
should be safe enough changing the type to be uint16_t, since change
would only be applied at re-compile time.
Change-Id: I83c8222484e4856c68134a1a9d8cf96eb91af1b8
This feature provides the BSC with information on whether the BTS talks
the IPAC_PROTO_EXT_PCU osmocom extension over the underlying IPA
multiplex of the OML link.
Related: SYS#5303
Change-Id: Id62421f7f5540875ac877a187757f2cf0556bd02
This new extension protocol is used to forward Osmocom PCUIF messages
BSC<->BTS<->PCU.
It will be sent re-using the IPA multiplex of the OML link between
BSC and BTS. BTS is responsible for forwarding the message over the unix
socket to the PCU.
Related: SYS#5303
Change-Id: I68b04def49946b6915dbd4e476999f249751cd28
generic sha code from git://w1.fi/hostap.git commit
5ea93947ca67ba83529798b806a15b247cdb2e93 which also happens
to be the source of our milenage code.
Related: SYS#5324
Change-Id: Ibf2e49edada944d91ceba62bd0d6b6ce69261fcd
The IPv4/IPv6 elemens are the same for local and remote.
Refactor the entries into a struct to use function to manipulate
them with a single function.
Related: OS#5036
Change-Id: I05e053a9eb3328655502dfe2981c8f402104e292
Some combination of IPv4 and IPv6 result in incomplete
combination.
E.g. IPv6 binds, but only IPv4 endpoints and vice versa.
Related: OS#5036
Change-Id: I2fcf67bc2431ddac23c4ae23cebbb29771e573f1
Use the new stats API to set a meaningful name for its stats group too,
so that they are easily to identify when reported.
Example on VTY "show stats":
"""
NSVC Peer Statistics (0)('UDP-NSE01800-NSVC01800'):
ALIVE response time : 0 ms
NS Bind Statistics:
Transmit backlog length: 0 packets
"""
Example reporting to statsd:
"""
my-stats-reporter-prefix.ns.nsvc.UDP-NSE01800-NSVC01800.alive.delay:0|g
"""
Related: SYS#5456
Change-Id: I4c696c615ba3416f8524d0797ce06c0ecd3a18f2
This patch adds a new field "name" to the rate_ctr and osmo_stat_item_group
structs, together with an API to set it. This new field allows for easy
identification of specific group instances when several of them exists,
rather than using a sometimes random/increasing index value.
If set, this name (string) is used instead of the index by the stats
reporter.
The name, if set, is also printed during "show stats" VTY commands.
It's up to the user or application to set up unique or meaningful names
to fullfill one's needs.
WARNING: this commit breaks ABI and possibly creates unexpected behavior
when run with non-rebuilt apps which use the modified structs directly
to get the coutners, or if use the static inline API rate_ctr_inc2().
Existing users of these structs should migrate to use new APIs
introduced in follow-up commits instead of accessing the field directly.
Related: SYS#5456
Change-Id: I0dc510783dd9ae8436dae8005a7b3330e80d36f3
Ensure all nsvcs ids are unique as UDP ids might not be unique when
multiple NSVCs connect to the same remote endpoint (multiple binds).
Change the format of all ids to look similiar.
FR: NSE11-NSVC23-FR-fr0-DLCI13.
UDP: NSE11-NSVC-UDP-10.0.0.1:23000-192.168.1.1:24000
UDP: NSE11-NSVC23-UDP-10.0.0.1:23000-192.168.1.1:24000
UDP: NSE11-NSVC66-UDP-[fd01::1]:23000-[fd03::2]:24000
Change-Id: I618e263e73fcc64d4e46b57aa3a2cb2783837907
Applying and reverting this mask allows one to quickly convert
between VAMOS and non-VAMOS variants of Bm/Lm C-bits.
Change-Id: Ia0bd8695a3f12331b696fe69117189cdd48b584d
Related: SYS#4895, OS#4941, SYS#5315, OS#4940
Having this API and forcing apps to use it will allow easily adding new
members to the group structure without having so much impact in users of
this struct.
Related: SYS#5456
Change-Id: Iebbf401f11e36645f8964d389460918eb9e0910e
This is required to reset and close a card under software control
after opening it with osim_card_open()
Change-Id: Ie9ec66db4d54fdb1331f4ae05ca3ca4274912e9d