Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.
Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
The warning period encoding was wrong, resulting in way too short
warning periods being encoded than intended/specified by the caller.
Change-Id: Idf3cae48a6ab45550d7bbd937bb49a0e1a4e8aed
Even though the value is only between 0..120s, they didn't encode
it 1:1 in the uint8_t, but 3GPP chose to use the same encoding
as for the warning period (which has a much larger range).
Let's fix this in our implementation.
Before this patch, osmo-cbc wanted to send 30s keep-alive repetition
period, but a spec-compliant receiver actually decoded this as 80s.
Change-Id: I04baa6b6b99b092fa0512b3b6138a363c7f3a13d
We used to suppress/drop any "zero length" messages, but we didn't
include the header when computing the length. However, in CBSP there
are messages (at least KEEP-ALIVE-COMPLETE) which only consist of the
header without any information elements. We cannot simply drop such
messages.
This also fixes the return value of osmo_cbsp_recv_buffered() to be
the total number of received octets (including the header).
Change-Id: Ib620128a167cb77f061ee57e8f8ad707b96b1c0d
This is a fixed-length Tag-Value IE. Our decoder already parsed
it correctly, but the encoder encoded it as TLV, which is wrong.
Change-Id: I7e1d7eab8b8e51acd9a24c38e2d3d30bbf00847a
The user length is the first IE *in* the fixed-length TV, make sure
cbsp_dec_write_repl() respects that.
Change-Id: I864cafac2466a89a4bd9644bc73363fff2babd03
The CBSP code assumed that gsm0808_decode_cell_id_u() would return
the number of bytes it has consumed/parsed. But it actually always
returns '0', whcih makes us run in an endless loop :(
Change-Id: I5758af4ec11a827d4b888a3a16c4ec22de90a7d6
Rather than having the encoder/decoder library print some log
messages in case of encoding/decoding errors, let's provide something
akin to 'errno', but with a string instead of a numeric error code.
The 'osmo_cbsp_errstr' global variable (if set) contains a
human-readable string describing the most recent encoding/decoding error.
It exists separately for each thread and hence can be used safely in
multi-threaded environments.
Change-Id: Id9a5a595a76ba278647aee9470ded213d8464103
This introduces definitions as well as a parser+encoder for the
Cell Broadcast Service Protocol (CBSP) as specified in 3GPP TS 48.049.
CBSP is used on the interface between CBC and BSC.
Related: OS#3537
Change-Id: I5b7ae08f67e415967b60ac4b824db9e22ca00935