| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example encode_auth_info() from gsup.c calls
msgb_tlv_put(msg, iei, 0, NULL)
to put a tag and len with content data following later.
However, this would cause a memcpy() from a NULL pointer, in tlv_put(). Allow
passing NULL and len = 0 for cases like the above:
If val is NULL, use memset(0) instead of memcpy().
If len is zero, do not copy nor memset anything.
Hence make tlv_put() behave in a well-defined and valid way for any and all
input args; no negative fallout is possible from this patch.
Add proper API doc comment.
Fixes a sanitizer build failure in gsup_test:
../../../../src/libosmocore/include/osmocom/gsm/tlv.h:99:2: runtime error: null pointer passed as argument 2, which is declared to never be null
Helps fix sanitizer build on debian 9.
Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64
|
|
|
|
|
|
|
|
| |
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.
Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
|
|
|
|
|
|
|
|
|
| |
Similar APIs exist for opstate and availability status.
This patch does not break backward compatibility because osmo-bsc still
requires direct use of the structure in get_string_value().
Change-Id: Ieace734aaff3f07606113feddde65b75202d96d6
|
|
|
|
| |
Change-Id: I91920c69c86d6a1932172becacb76faff2d3eb1e
|
|
|
|
| |
Change-Id: I1e875991ae1dd93862f850f85d40b3dac61ece72
|
|
|
|
| |
Change-Id: Ieee6213dc5aad082a2d439c7418b51f281b80b1a
|
|
|
|
| |
Change-Id: I24c56ccb56d5b39cfb887808f91b715da54c0f8b
|
|
|
|
| |
Change-Id: I2fd24c86f9b52244073ec800a3287e3d38e660d9
|
|
|
|
|
|
| |
Let's hence not call the group "GSM L3 compatible TLV parser"
Change-Id: Ic53f9c0d5ee787f994f42cf2aff313c6e131fbe6
|
|
|
|
|
|
|
| |
We also have "A-bis OML" and it's a bit odd to have one with prefix
and the other without.
Change-Id: Ida325f8a9c40b40c1aeaa4edfd1123ced7cc92b8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function is a wrapper on top of getrandom() (if available via glibc) or
corresponding syscall. If neither is available than failure is always
returned.
It's intended to generate small random data good enough for session
identifiers and keys. To generate long-term cryptographic keys it's
better to use special crypto libraries (like GnuTLS for example)
instead.
As an example it's used to replace old insecure random number generator
in osmo-auc-gen utility.
Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048
Related: OS#1694
|
|
|
|
|
|
|
|
|
| |
Add GSM23003_IMSI_MIN_DIGITS definition.
Add regression test gsm23003_test.c to test the two new functions.
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
|
|
|
|
|
|
|
|
|
|
|
| |
In the Protocol Configuration Options IE (see 3GPP TS 24.008 10.5.6.3)
there is yet another new TLV format (derived from PPP IPCP/LCP/...)
which uses 16bit tag and 8bit length. Let's add functions so we can
generate related TLVs. Parsing is unfortunately not possible in our
existing structure as our tlv_parsed array only has 256 entries and
thus cannot cope with 16bit tags.
Change-Id: I9799130e2eba8fae8c4480fbb8a900c30232b694
|
|
|
|
|
|
|
|
|
|
|
| |
See also:
https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
https://gerrit.osmocom.org/#/c/3195/2/include/openbsc/osmo_msc.h@13
(change-id I639544a6cdda77a3aafc4e3446a55393f60e4050)
Change-Id: I4222e21686c823985be8ff1f16b1182be8ad6175
|
|
|
|
|
|
| |
The list should now be complete up to Releae 14
Change-Id: I693cabe1a3b00a8c4198f7a4a1c647c5d7dc6c41
|
|
|
|
| |
Change-Id: I8d2746eefe1f22dba5b19636ebc9444e458fc802
|
|
|
|
| |
Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b
|
|
|
|
|
|
|
| |
Convert a given frame number into a printable string that displays
the sub components of the frame number.
Change-Id: I8015d2ded3940b01b35df7b72fc35c70c25e9926
|
|
|
|
| |
Change-Id: I90113044460a6c511ced14f588876c4280d1cac7
|
|
|
|
|
|
| |
Used by osmo-bts, moved from osmo-bts l1sap.c:dump_gsmtime.
Change-Id: Ib5452e2c20f53006c0f6d197fb055728947125d8
|
|
|
|
|
|
|
|
|
| |
The PDP charging characteristics will be returned from the PDP
selection code and be used in the SGSN. It is following the same
approach as the QoS and PDP addr. It is a bit of a pity that we
have to define this in a different project.
Change-Id: I7815c5dfd7b7fb0ea78d816ebfb3abfbf0090afe
|
|
|
|
|
|
|
|
| |
These fields can be in the ISD and the PDP Context inofmration. Store
pointers to this IE in both cases. It needs to be used by the SGSN
when opening a PDP context.
Change-Id: Iedc7c02adcf77ca5c9545119e19c968dfbbb3e6b
|
|
|
|
|
|
|
| |
These fields are required in osmo-bts to do low link quality checks in a
generic way.
Change-Id: If4ae20c22b881e94585dad710f17b9e37f77bf82
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent commit 3149b0d076477303a38df735fe579b1b06ee17b2 adds function
gsm0808_chan_type_to_speech_codec() but adds a completely mismatching name in
libosmogsm.map, as well as a definition with a typo in the name.
Fix the entry in libosmogsm.map.
Add the missing 'c' in gsm0808_utils.h
Change-Id: I5a621fa5ef6b632eabbe224f3dd383eacaffb695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.
Many files now show a short description in the generated API doc that was so
far only available as C comment.
The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation
In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).
Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
|
|
|
|
|
|
|
|
|
|
| |
Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.
Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.
Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typically we don't place comments with the function declarations
in .h files. Not sure why this file has comments for each. The
API doc belongs in the .c file as proper doxygen comments,
and shouldn't be duplicated in the .h file.
In this particular case, doxygen comments are added in the
corresponding c file recently.
Change-Id: I5c4cb55be5ec59a6945b1720b875c5987f1cfaad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The contents of the speech codec element (struct gsm0808_speech_codec),
that is also used in the speech codec list element (struct
gsm0808_speech_codec_list) can be generated directly from the
permitted speech parameter in the channel type field (struct
gsm0808_channel_type) when full AoIP with compressed speech via
RTP/UDP/IP is assumed and when the codec configuration on the air
interface exactly matches the codec configuration on the IP backhaul.
This patch adds a function that can be used as a helper to fill
out spech codec fields by only giving a permitted speech parameter
as input.
Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
|
|
|
|
|
|
|
|
|
|
|
|
| |
The permitted speech field used in channel type element (struct
gsm0808_channel_type) uses a different representation as
the type field in the speech codec element (struct
gsm0808_speech_codec)
This patch adds a function to convert from permitted speech to
speech codec type.
Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
|
|
|
|
|
|
|
|
|
| |
In an AoIP scenario, the speech codec list field specifies the
codecs used in the RTP interface. This patch adds a table
with default codec configurations that match the codec
configurations that are also used on the air interface.
Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
|
|
|
|
|
|
|
|
|
|
| |
The implementation of the parser/generator for the speech codec
information element slightly wrong, making it impossible to use
it properly.
(See also: 3GPP TS 48.008, 3.2.2.103)
Change-Id: Idabb0f9620659557672e1c6b90c75481192e5c89
|
|
|
|
|
|
|
|
| |
The codec type to be set in member type in struct gsm0808_speech_codec
has its own coding scheme to reference the used codec types. This patch
declares an enum with valid speech codec types.
Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
|
|
|
|
|
|
|
| |
The constants in enum gsm0808_permitted_speech are not very expressive.
Add comments indicating each constant's corresponding codec.
Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
|
|
|
|
|
|
|
|
| |
3GPP TS 24.008 specifies two new speech versions for half rate and
two new speech modes for full rate. This patch adds the relevant
constants to enum gsm48_bcap_speech_ver in gsm_04_08.h
Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
|
|
|
|
|
|
|
| |
Add the information which GSM Speech codec version coresponds to
which bearer capability speech version.
Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
|
|
|
|
| |
Change-Id: I1f4fc2761b55a4f83544c1c3793ab67fec9fc120
|
|
|
|
| |
Change-Id: Ia699d3494b93b7f88c36338e4960b35c42a29b9c
|
|
|
|
|
|
|
|
| |
The distribution of the channel measurement calculations over
multiple timeslots (continous calculation) requires to keep
track of the frame number in struct info_meas_ind_param
Change-Id: I8c783b4a92ae2c3cc5d17936a146eb49d47eac37
|
|
|
|
| |
Change-Id: Id52ddd8358fd4af1ecc71142deb09f1e237021f3
|
|
|
|
| |
Change-Id: I60f5d4982cd96ab29f9924ec11b46bf56fbfc346
|
|
|
|
| |
Change-Id: I3749e1e4974742bc8c32722e0e998775b5394829
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add osmo_earfcn_bit_size_ext() function which allows to specify how many
EARFCNs we should skip when estimating required bit size for SI2quater
* make old osmo_earfcn_bit_size() into wrapper over newly added function
and mark it as deprecated
This is necessary to properly estimate necessary space for EARFCNs when
they are spread over several SI2q messages with different index.
Change-Id: I92e12e91605bdab9916a3f665705287572434f74
Related: RT#8792
|
|
|
|
|
|
|
|
|
|
|
|
| |
Table 10.5.157 in 10.5.6.6 of 3GPP TS 04.08 is badly formatted. The first
value 0x19 "LLC or SNDCP failure" is in the same line as the heading and has
not been included in the struct_value so far.
Table 10.5.157 in 10.5.6.6 of 3GPP TS 24.008 fixes this formatting issue and
also defines two more values 0x08 and 0x18 which are now added to the struct
value_string.
Change-Id: I5bcc52f739ff0677011d024448afcc2a54869638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data structure representing 3GPP TS 52.021 ยง9.4.62 SW Description
* function to serialize it into msgb
* function to deserialize it from buffer
* functions to extract/estimate buffer size for SW Description
* test harness (partially taken from OpenBSC)
There are several similar functions to deal with SW Description in
OpenBSC, there's also need to use similar functionality in
OsmoBTS. Hence it's better to put the code into common library with
proper tests and documentation.
Change-Id: Ib63b6b5e83b8914864fc7edd789f8958cdc993cd
Related: OS#1614
|
|
|
|
|
|
|
|
|
|
| |
The ipa.c file already contained code to parse an ID RESPONSE into the
'struct ipaccess_unit', but it didn't so far contain code to put
together an ID RESPONSE packet based on that structure. Let's change
that with ipa_ccm_make_id_resp() and a helper wrapper
ipa_ccm_make_id_resp_from_req().
Change-Id: Icbcd8827a75fd5f3393351c1ca372de85275ad35
|
|
|
|
|
|
|
|
|
|
| |
gsm0808.h/c lacks functionality to generate BSS_MAP_MSG_ASSIGMENT_RQST messages.
These messages are required if the code is used in an MSC implementation.
This commit adds a gsm0808_create_assignment() function, that generates an
A/AoiP BSS_MAP_MSG_PAGING message.
Change-Id: I4d1d455a1e1cf95407e23ded7b7defbcf2dd6ff0
|
|
|
|
|
|
|
|
|
|
| |
gsm0808.h/c lacks functionality to generate BSS_MAP_MSG_PAGING messages. These
messages are required if the code is used in an MSC implementation.
This commit adds a gsm0808_create_paging() function, that generates an A/AoiP
BSS_MAP_MSG_PAGING message.
Change-Id: I9afecf0109305ca5153bf081bb29cd94071dd2b7
|
|
|
|
|
|
|
|
|
|
| |
gsm0808.h/c lacks functionality to generate CIPHER MODE COMMAND messages. These
messages are required if the code is used in an MSC implementation.
This commit adds a gsm0808_create_cipher() function, that generates an A/AoiP
CIPHER MODE COMMAND message.
Change-Id: I8eb1c357860c3e740b0f5d17e1c256bc87920958
|
|
|
|
|
|
|
|
|
|
| |
The planned support for true A over IP requires the encoding of
the a Cell Identifier List element (see also BSS_MAP_MSG_PAGING).
This commt adds encoding/decoding functionality and tests for
the element mentioned above, however, it is not yet actively used.
Change-Id: I625245dd1dd396fc2bc189e8cd2c444a33042528
|
|
|
|
|
|
|
|
|
|
| |
The planned support for true A over IP requires the encoding of
the an Encryption Information element (see also BSS_MAP_MSG_CIPHER_MODE_CMD).
This commt adds encoding/decoding functionality and tests for
the element mentioned above, however, it is not yet actively used.
Change-Id: I8262050a9d9fd3f17462cfbb046c6e034dccc6fb
|