Commit Graph

1564 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther c63ed3f7c6 doxygen: Next try to fix the uninstall handling
Use /* to remove the files
2016-04-24 20:30:34 +02:00
Holger Hans Peter Freyther faaf2528b1 doxygen: Try to uninstall the search files as well
Try to fix this by putting the search directory first as I don't
know how to pass -r to the RM command.

rm -f doc/{core,gsm,vty,codec}/{html,latex}/* doc/html.tar doc/{core,gsm,vty,codec}/doxygen_sqlite3.db
rm: cannot remove ‘doc/core/html/search’: Is a directory
rm: cannot remove ‘doc/gsm/html/search’: Is a directory
rm: cannot remove ‘doc/vty/html/search’: Is a directory
rm: cannot remove ‘doc/codec/html/search’: Is a directory
2016-04-24 20:18:20 +02:00
Max 936151bbff Add static lib to -dev .deb package
According to https://www.debian.org/doc/debian-policy/ch-sharedlibs.html
and http://packaging.ubuntu.com/html/libraries.html that's where it
belongs.
2016-04-24 19:52:20 +02:00
Sylvain Munaut 610ef99e6d Doxygen: enable tagfile generation and usage for cross-project references
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-04-24 19:48:05 +02:00
Sylvain Munaut c7c582a95f Doxygen: Enable client-based search engine
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-04-24 19:48:05 +02:00
Max 27e8036d41 Fix unaligned access found by addr. sanitizer
gprs_bssgp.c:461:9: runtime error: load of misaligned address
0x62100001a66b for type 'uint32_t', which requires 4 byte alignment

gprs_ns.c:937:16: runtime error: load of misaligned address
0x61d00002a97f for type 'uint16_t', which requires 2 byte alignment
2016-04-24 11:12:41 +02:00
Max 8a5346ba2f Add function for appending range1024 to bitvec
Add convenience function to append range1024 encoded data (see 3GPP TS
44.018 Annex J) to a given bitvec.
2016-04-23 16:37:05 +02:00
Max 1f9d8183be Deprecate comp128
Mark function as deprecated to discourage its usage: people should use
generic API in osmocom/crypt/auth.h
2016-04-22 15:10:55 +02:00
Max fdb3d8ce78 Deprecate osmo_a5_1 and osmo_a5_2
Mark the functions as deprecated to discourage their use: people should
use unified osmo_a5 which supports all the A5/1-4 ciphers.
2016-04-22 15:10:53 +02:00
Max aead05da32 Improve code reuse
Use generic functions covered by testsuit for SQN calculations.
2016-04-22 15:09:49 +02:00
Max bf990bb8fd Update internal GPRS cipher API
Update internal API (for GPRS cipher implementors): make it compliant
with ETSI TS 155.22. External API left untouched.
2016-04-22 15:09:27 +02:00
Max 402b9b0555 Addditional classmark check against A5/4 support
Add classmark check function according to GSM 04.08 Chapter 10.5.1.7
Fix interface to use unsigned for unsigned value.
2016-04-22 15:09:09 +02:00
Max fbb8bfa514 Add function to get osmo_earfcn bit size
This function returns the number of bits necessary to pack osmo_earfcn
into Repeated E-UTRAN Neighbour Cells IE (3GPP TS 44.018 Table
10.5.2.33b.1).
2016-04-16 13:41:56 +02:00
Neels Hofmeyr da1b20cd4f logging.c: assert category_token allocation (CID #57871) 2016-04-16 13:31:15 +02:00
Holger Hans Peter Freyther 700297528c jenkins: Enable tracing and error handling in bash
Like jenkins we want to see what is actually being executed
and fail if a subcommand has failed.
2016-04-13 18:50:41 -04:00
Holger Hans Peter Freyther d16321801d jenkins: Add build script used by jenkins on our public CI
The actual script (removed unused and commented out handling) as
invoked by jenkins. This can be used to locally try to reproduce
the build.
2016-04-13 18:47:15 -04:00
Max d8fb14226f Add ubit <-> sbit convertors
Move functions for conversion between soft and unpacked bits to main
library as they are generally useful.
2016-04-12 10:10:44 -04:00
Max 93bc64f99d gb: Add bssgp_pdu_str to libosmogb namespace
[hfreyther: To be used by osmo-pcu]
2016-04-12 10:08:20 -04:00
Max b9bb0b02ac Add missing docs for bssgp bvc reset vty command
Fixes the build failure with extended tests enabled.
2016-04-07 12:38:12 +02:00
Max ea50732df2 Add vty command to explicitly reset given BVCI
It's useful for debugging and is similar to existing reset command for
nsvc.
2016-04-05 22:33:14 +02:00
Holger Hans Peter Freyther 793a2907d5 vty: Make a reservation for the osmo-sip-connector
The osmo-sip-connector is a new application and is a MNCC to SIP
bridge. It is not implementing transcoding or RTP proxying at all.
2016-03-31 16:59:23 +02:00
Holger Hans Peter Freyther 61f28880d5 select: Externalize fd_set filling and dispatch
To integrate with an external event loop (in this case glib) we
need to allow an application to get a filled out fd_set and then
dispatch it. osmo_fds and maxfds are static and I decided to keep
it that way and instead create two routines to fill the fdset and
then one to dispatch the result.

The public header file does not include sys/select.h and we can
compile the library without select, so I didn't want to require
having to include this file, and used void * for the parameter.

Mark the routines as inline to avoid a call from the select
function. I have confirmed that inlining has an effect on x86
using Debian's gcc-4.9.2-10 compiler
2016-03-31 16:56:51 +02:00
Max fb348eeff2 Export names for gsm_chan_t and gsm48_chan_mode
This can be used with get_value_string() to improve debugging output.
2016-03-30 21:50:44 +02:00
Holger Hans Peter Freyther 92c4ec293d sim: Fix compiler warning and by this fixing the test result 2016-03-21 11:29:16 +01:00
Harald Welte 932d2d4ce3 sim: make osim_reader_ops public 2016-03-19 21:18:40 +01:00
Harald Welte 6c33ae2605 Add new osmo_fd_get_by_fd() function
This function can be used to obtain the osmo_fd corresponding to a given
fd.  The latter can be useful when integrating libosmocore main loop
with other libraries.
2016-03-19 21:17:58 +01:00
Harald Welte 676e534462 sim: Add simplistic unit test for APDU class tables 2016-03-17 16:55:11 +01:00
Harald Welte 4acaa13433 sim: add class_tables / card profiles
The tables permit code to determine the APDU class of an APDU
based on it APDU/TPDU header (CLA/INS/P1/P2/P3).
2016-03-17 16:55:11 +01:00
Max 2c34ab4a80 Improve BSSGP debug output
Print string representation of Cause IE and PDU type instead of
numerical value.
2016-03-17 16:55:11 +01:00
Harald Welte 5bed23c6d2 add missing #include <stdbool.h> 2016-03-17 16:50:50 +01:00
Max ea345cdaaa Rename struct to better match libosmocore conventions 2016-03-17 16:49:15 +01:00
Harald Welte c79b3972fa Revert "gsm48: move to hex TMSI representation"
This reverts commit f451ce66eb.
2016-03-17 14:43:02 +01:00
Vadim Yanitskiy f451ce66eb gsm48: move to hex TMSI representation
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2016-03-17 14:13:18 +01:00
Max 03309b57e8 Add basic EARFCN support
Add structure representing group of EARFCNs with common priority,
threshold etc.
Add functions to populate this structure.
2016-03-17 14:07:19 +01:00
Max d4793212b5 Add function to add bits from array to bitvec
Add function which adds specified number of bits from each element of
array to the bit vector prefixing each addition with one and finishing
entire sequence with adding 0. This is very common patter for various
repetitive data structures described with CSN.1 in 3GPP standards.

Corresponding test vectors and doxygen headers are added too.
2016-03-17 14:07:19 +01:00
Neels Hofmeyr bdccc1b144 gsm48: factor out MCC+MNC BCD parsing for re-use in UMTS
For 3G, I need a BCD composer/parser similar to gsm48_generate_lai()/
gsm48_decode_lai(). Those functions also handle a trivial extra
member (lac) which I don't need in this way for 3G.

So create new functions to take on the MCC+MNC BCD handling and call those
from gsm48_generate_lai() and gsm48_decode_lai(). In this way, the 3G code
in openbsc can use only the BCD functionality without code duplication.
2016-03-15 14:30:41 +01:00
Neels Hofmeyr da7bf4d55a 04.08: add inline funcs for transaction id bits
Various users of gsm48_hdr apply the same hardcoded shifts/bitmasks to obtain
the transaction ID encoded in the upper nibble of the protocol discriminator.
Centralize. Patch for openbsc.git will follow.
2016-03-15 14:11:49 +01:00
Neels Hofmeyr c656faed12 04.08: switch to r99 msg type bitmasks by default
[hfreyther: Separated from the previous patch to allow an easy
revert]
2016-03-15 14:11:13 +01:00
Neels Hofmeyr 282e908434 04.08: add inline funcs for pdisc + msg type bitmasks
Add inline functions for both release <= 98 and release >= 99 as well as a
default define. Use the release 98 by default since the current code base uses
the r98 bitmasks.

These inline functions relieve callers of the decision on masking bits of the
protocol discriminator and message type octets.

Also add a define for the protocol discriminator extension to one octet length
(GSM48_PDISC_EXTEND).

Apply new pdisc function in gsm0480.c.

[hfreyther: Make the hdr param const]
2016-03-15 14:10:45 +01:00
Max c0d9a6c083 Add helper function to convert numerical BSSGP PDU type to string 2016-03-11 22:29:39 +07:00
Max e859aec952 Add support for SI2quater messages
Add basic data structure for System information Type 2quater.
2016-03-11 22:09:21 +07:00
Harald Welte 5ffb50371e rename osim_file_find_* to osim_file_desc_find_*
they return an osim_file_desc, and not an osim_file, so fix the naming
2016-03-11 22:05:25 +07:00
Harald Welte c28f4cdd6d sim: Add osim_file_find_{fid,sfid}() functions
We don't always want to look-up by name, but the latter is the only
implemented 'find' function so far.  Let's change that.
2016-03-11 22:05:25 +07:00
Harald Welte 1cc66f093f merge_doc.xsl: Don't copy the 'descripiton' element of commands
If a vty_additions.xml file contained a <description> element inside a
command> element, then the description was copied twice (once during the
<node> copy, and once during the <command> copy).  Let's avoid one of
the two copies.
2016-03-11 22:05:25 +07:00
Holger Hans Peter Freyther 57f253a792 debian: Make sure that libtalloc-dev is installed
This way libosmo-abis, libosmo-sccp, openggsn, openbsc does not
need to install it.
2016-03-05 08:36:26 +01:00
Holger Hans Peter Freyther ed0ce47fa9 logging: Remove unused variable after recent changes
The variable is not used anymore as the decision is done in the
newly added check_log_to_target method.
2016-02-29 14:41:12 +01:00
Holger Hans Peter Freyther 5dd3f1dd67 Merge branch 'sysmocom/shared/log-speed' 2016-02-29 14:34:34 +01:00
Holger Hans Peter Freyther 79599acd66 logging: Move the filter check up as well
There doesn't seem to be a reason not to check the filter. Update
and extend the test. Currently the filter function will be called
once for the log check and once for the output of it.
2016-02-29 14:30:14 +01:00
Holger Hans Peter Freyther e0dc6a1c7c logging: Remove some code duplication
Extract the mapping of the subsystem number and the checking for
the loglevel to a inline method that is shared between the new
and old.
2016-02-29 14:30:14 +01:00
Jacob Erlbeck 64e0eb56fd log/test: Extend test case for log_check_level
This commit adds OSMO_ASSERTs for mandatory conditions related to
log_check_level, and fprintfs for optional conditions, since it is
always safe for log_check_level to return != 0.

Sponsored-by: On-Waves ehf
2016-02-29 14:30:14 +01:00